-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathjiaozifs.gen.go
12842 lines (10120 loc) · 399 KB
/
jiaozifs.gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Package api provides primitives to interact with the openapi HTTP API.
//
// Code generated by github.com/deepmap/oapi-codegen/v2 version v2.0.1-0.20231120160225-add3126ee845 DO NOT EDIT.
package api
import (
"bytes"
"compress/gzip"
"context"
"encoding/base64"
"encoding/json"
"fmt"
"io"
"net/http"
"net/url"
"path"
"strings"
"github.com/getkin/kin-openapi/openapi3"
"github.com/go-chi/chi/v5"
"github.com/oapi-codegen/runtime"
openapi_types "github.com/oapi-codegen/runtime/types"
)
const (
JiaozifsAccessKeyIdScopes = "JiaozifsAccessKeyId.Scopes"
SignatureScopes = "Signature.Scopes"
SignatureMethodScopes = "SignatureMethod.Scopes"
SignatureVersionScopes = "SignatureVersion.Scopes"
TimestampScopes = "Timestamp.Scopes"
Basic_authScopes = "basic_auth.Scopes"
Cookie_authScopes = "cookie_auth.Scopes"
Jwt_tokenScopes = "jwt_token.Scopes"
)
// Defines values for ArchiveType.
const (
Car ArchiveType = "car"
Zip ArchiveType = "zip"
)
// Defines values for ChangeAction.
const (
N1 ChangeAction = 1
N2 ChangeAction = 2
N3 ChangeAction = 3
)
// Defines values for LoginConfigRBAC.
const (
External LoginConfigRBAC = "external"
Simplified LoginConfigRBAC = "simplified"
)
// Defines values for RefType.
const (
RefTypeBranch RefType = "branch"
RefTypeCommit RefType = "commit"
RefTypeTag RefType = "tag"
RefTypeWip RefType = "wip"
)
// Defines values for SetupStateState.
const (
Initialized SetupStateState = "initialized"
NotInitialized SetupStateState = "not_initialized"
)
// Aksk defines model for Aksk.
type Aksk struct {
AccessKey string `json:"access_key"`
CreatedAt int64 `json:"created_at"`
Description *string `json:"description,omitempty"`
Id openapi_types.UUID `json:"id"`
SecretKey string `json:"secret_key"`
UpdatedAt int64 `json:"updated_at"`
}
// AkskList defines model for AkskList.
type AkskList struct {
Pagination Pagination `json:"pagination"`
Results []SafeAksk `json:"results"`
}
// ArchiveType defines model for ArchiveType.
type ArchiveType string
// AuthenticationToken defines model for AuthenticationToken.
type AuthenticationToken struct {
// Token a JWT token that could be used to authenticate requests
Token string `json:"token"`
// TokenExpiration Unix Epoch in seconds
TokenExpiration *int64 `json:"token_expiration,omitempty"`
}
// Branch defines model for Branch.
type Branch struct {
CommitHash string `json:"commit_hash"`
CreatedAt int64 `json:"created_at"`
CreatorId openapi_types.UUID `json:"creator_id"`
Description *string `json:"description,omitempty"`
Id openapi_types.UUID `json:"id"`
Name string `json:"name"`
RepositoryId openapi_types.UUID `json:"repository_id"`
UpdatedAt int64 `json:"updated_at"`
}
// BranchCreation defines model for BranchCreation.
type BranchCreation struct {
Name string `json:"name"`
Source string `json:"source"`
}
// BranchList defines model for BranchList.
type BranchList struct {
Pagination Pagination `json:"pagination"`
Results []Branch `json:"results"`
}
// Change defines model for Change.
type Change struct {
Action ChangeAction `json:"action"`
BaseHash *string `json:"base_hash,omitempty"`
Path string `json:"path"`
ToHash *string `json:"to_hash,omitempty"`
}
// ChangeAction defines model for Change.Action.
type ChangeAction int
// ChangePair defines model for ChangePair.
type ChangePair struct {
IsConflict bool `json:"is_conflict"`
Left *Change `json:"left,omitempty"`
Path string `json:"path"`
Right *Change `json:"right,omitempty"`
}
// Commit defines model for Commit.
type Commit struct {
Author Signature `json:"author"`
Committer Signature `json:"committer"`
CreatedAt int64 `json:"created_at"`
Hash string `json:"hash"`
MergeTag string `json:"merge_tag"`
Message string `json:"message"`
ParentHashes []string `json:"parent_hashes"`
RepositoryId openapi_types.UUID `json:"repository_id"`
TreeHash string `json:"tree_hash"`
UpdatedAt int64 `json:"updated_at"`
}
// CreateMergeRequest defines model for CreateMergeRequest.
type CreateMergeRequest struct {
Description *string `json:"description,omitempty"`
SourceBranchName string `json:"source_branch_name"`
TargetBranchName string `json:"target_branch_name"`
Title string `json:"title"`
}
// CreateRepository defines model for CreateRepository.
type CreateRepository struct {
// BlockstoreConfig block storage config url encoded json
BlockstoreConfig *string `json:"blockstore_config,omitempty"`
Description *string `json:"description,omitempty"`
Name string `json:"name"`
Visible *bool `json:"visible,omitempty"`
}
// FullTreeEntry defines model for FullTreeEntry.
type FullTreeEntry struct {
CreatedAt int64 `json:"created_at"`
Hash string `json:"hash"`
IsDir bool `json:"is_dir"`
Name string `json:"name"`
Size int64 `json:"size"`
UpdatedAt int64 `json:"updated_at"`
}
// Group defines model for Group.
type Group struct {
CreatedAt int64 `json:"created_at"`
Id openapi_types.UUID `json:"id"`
Name string `json:"name"`
Policies []openapi_types.UUID `json:"policies"`
UpdatedAt int64 `json:"updated_at"`
}
// LoginConfig defines model for LoginConfig.
type LoginConfig struct {
// RBAC RBAC will remain enabled on GUI if "external". That only works
// with an external auth service.
RBAC *LoginConfigRBAC `json:"RBAC,omitempty"`
// FallbackLoginLabel label to place on fallback_login_url.
FallbackLoginLabel *string `json:"fallback_login_label,omitempty"`
// FallbackLoginUrl secondary URL to offer users to use for login.
FallbackLoginUrl *string `json:"fallback_login_url,omitempty"`
// LoginCookieNames cookie names used to store JWT
LoginCookieNames []string `json:"login_cookie_names"`
// LoginFailedMessage message to display to users who fail to login; a full sentence that is rendered
// in HTML and may contain a link to a secondary login method
LoginFailedMessage *string `json:"login_failed_message,omitempty"`
// LoginUrl primary URL to use for login.
LoginUrl string `json:"login_url"`
// LogoutUrl URL to use for logging out.
LogoutUrl string `json:"logout_url"`
}
// LoginConfigRBAC RBAC will remain enabled on GUI if "external". That only works
// with an external auth service.
type LoginConfigRBAC string
// Member defines model for Member.
type Member struct {
CreatedAt int64 `json:"created_at"`
GroupId openapi_types.UUID `json:"group_id"`
Id openapi_types.UUID `json:"id"`
RepoId openapi_types.UUID `json:"repo_id"`
UpdatedAt int64 `json:"updated_at"`
UserId openapi_types.UUID `json:"user_id"`
}
// MergeMergeRequest defines model for MergeMergeRequest.
type MergeMergeRequest struct {
// ConflictResolve use to record the resolution of the conflict, example({"b/a.txt":"left"})
ConflictResolve *map[string]string `json:"conflict_resolve,omitempty"`
Msg string `json:"msg"`
}
// MergeRequest defines model for MergeRequest.
type MergeRequest struct {
AuthorId openapi_types.UUID `json:"author_id"`
CreatedAt int64 `json:"created_at"`
Description *string `json:"description,omitempty"`
Id openapi_types.UUID `json:"id"`
MergeStatus int `json:"merge_status"`
Sequence uint64 `json:"sequence"`
SourceBranch openapi_types.UUID `json:"source_branch"`
SourceRepoId openapi_types.UUID `json:"source_repo_id"`
TargetBranch openapi_types.UUID `json:"target_branch"`
TargetRepoId openapi_types.UUID `json:"target_repo_id"`
Title string `json:"title"`
UpdatedAt int64 `json:"updated_at"`
}
// MergeRequestFullState defines model for MergeRequestFullState.
type MergeRequestFullState struct {
AuthorId openapi_types.UUID `json:"author_id"`
Changes []ChangePair `json:"changes"`
CreatedAt int64 `json:"created_at"`
Description *string `json:"description,omitempty"`
Id openapi_types.UUID `json:"id"`
MergeStatus int `json:"merge_status"`
Sequence uint64 `json:"sequence"`
SourceBranch openapi_types.UUID `json:"source_branch"`
SourceRepoId openapi_types.UUID `json:"source_repo_id"`
TargetBranch openapi_types.UUID `json:"target_branch"`
TargetRepoId openapi_types.UUID `json:"target_repo_id"`
Title string `json:"title"`
UpdatedAt int64 `json:"updated_at"`
}
// MergeRequestList defines model for MergeRequestList.
type MergeRequestList struct {
Pagination Pagination `json:"pagination"`
Results []MergeRequest `json:"results"`
}
// ObjectStats defines model for ObjectStats.
type ObjectStats struct {
Checksum string `json:"checksum"`
// ContentType Object media type
ContentType *string `json:"content_type,omitempty"`
Metadata *ObjectUserMetadata `json:"metadata,omitempty"`
// Mtime Unix Epoch in seconds
Mtime int64 `json:"mtime"`
Path string `json:"path"`
PathMode *uint32 `json:"path_mode,omitempty"`
SizeBytes *int64 `json:"size_bytes,omitempty"`
}
// ObjectUserMetadata defines model for ObjectUserMetadata.
type ObjectUserMetadata map[string]string
// Pagination defines model for Pagination.
type Pagination struct {
// HasMore Next page is available
HasMore bool `json:"has_more"`
// MaxPerPage Maximal number of entries per page
MaxPerPage int `json:"max_per_page"`
// NextOffset Token used to retrieve the next page
NextOffset string `json:"next_offset"`
// Results Number of values found in the results
Results int `json:"results"`
}
// RefType defines model for RefType.
type RefType string
// Repository defines model for Repository.
type Repository struct {
CreatedAt int64 `json:"created_at"`
CreatorId openapi_types.UUID `json:"creator_id"`
Description *string `json:"description,omitempty"`
Head string `json:"head"`
Id openapi_types.UUID `json:"id"`
Name string `json:"name"`
OwnerId openapi_types.UUID `json:"owner_id"`
StorageAdapterParams *string `json:"storage_adapter_params,omitempty"`
StorageNamespace *string `json:"storage_namespace,omitempty"`
UpdatedAt int64 `json:"updated_at"`
UsePublicStorage bool `json:"use_public_storage"`
Visible bool `json:"visible"`
}
// RepositoryList defines model for RepositoryList.
type RepositoryList struct {
Pagination Pagination `json:"pagination"`
Results []Repository `json:"results"`
}
// SafeAksk defines model for SafeAksk.
type SafeAksk struct {
AccessKey string `json:"access_key"`
CreatedAt int64 `json:"created_at"`
Description *string `json:"description,omitempty"`
Id openapi_types.UUID `json:"id"`
UpdatedAt int64 `json:"updated_at"`
}
// SetupState defines model for SetupState.
type SetupState struct {
// CommPrefsMissing true if the comm prefs are missing.
CommPrefsMissing *bool `json:"comm_prefs_missing,omitempty"`
LoginConfig *LoginConfig `json:"login_config,omitempty"`
State *SetupStateState `json:"state,omitempty"`
}
// SetupStateState defines model for SetupState.State.
type SetupStateState string
// Signature defines model for Signature.
type Signature struct {
Email openapi_types.Email `json:"email"`
Name string `json:"name"`
When int64 `json:"when"`
}
// Tag defines model for Tag.
type Tag struct {
CreatedAt int64 `json:"created_at"`
CreatorId openapi_types.UUID `json:"creator_id"`
Id openapi_types.UUID `json:"id"`
Message *string `json:"message,omitempty"`
Name string `json:"name"`
RepositoryId openapi_types.UUID `json:"repository_id"`
Target string `json:"target"`
UpdatedAt int64 `json:"updated_at"`
}
// TagCreation defines model for TagCreation.
type TagCreation struct {
Message *string `json:"message,omitempty"`
Name string `json:"name"`
// Target target branch name or commit hex, first try branch and then commit
Target string `json:"target"`
}
// TagList defines model for TagList.
type TagList struct {
Pagination Pagination `json:"pagination"`
Results []Tag `json:"results"`
}
// UpdateMergeRequest defines model for UpdateMergeRequest.
type UpdateMergeRequest struct {
Description *string `json:"description,omitempty"`
Status *int `json:"status,omitempty"`
Title *string `json:"title,omitempty"`
}
// UpdateRepository defines model for UpdateRepository.
type UpdateRepository struct {
Description *string `json:"description,omitempty"`
Head *string `json:"head,omitempty"`
}
// UpdateWip defines model for UpdateWip.
type UpdateWip struct {
BaseCommit *string `json:"base_commit,omitempty"`
CurrentTree *string `json:"current_tree,omitempty"`
}
// UserInfo defines model for UserInfo.
type UserInfo struct {
CreatedAt int64 `json:"created_at"`
CurrentSignInAt *int64 `json:"current_sign_in_at,omitempty"`
CurrentSignInIp *string `json:"current_sign_in_ip,omitempty"`
Email openapi_types.Email `json:"email"`
Id openapi_types.UUID `json:"id"`
LastSignInAt *int64 `json:"last_sign_in_at,omitempty"`
LastSignInIp *string `json:"last_sign_in_ip,omitempty"`
Name string `json:"name"`
UpdatedAt int64 `json:"updated_at"`
}
// UserRegisterInfo defines model for UserRegisterInfo.
type UserRegisterInfo struct {
Email openapi_types.Email `json:"email"`
Name string `json:"name"`
Password string `json:"password"`
}
// VersionResult defines model for VersionResult.
type VersionResult struct {
// ApiVersion runtime version
ApiVersion string `json:"api_version"`
LatestVersion *string `json:"latest_version,omitempty"`
// Version program version
Version string `json:"version"`
}
// Wip defines model for Wip.
type Wip struct {
BaseCommit string `json:"base_commit"`
CreatedAt int64 `json:"created_at"`
CreatorId openapi_types.UUID `json:"creator_id"`
CurrentTree string `json:"current_tree"`
Id openapi_types.UUID `json:"id"`
RefId openapi_types.UUID `json:"ref_id"`
RepositoryId openapi_types.UUID `json:"repository_id"`
State int `json:"state"`
UpdatedAt int64 `json:"updated_at"`
}
// PaginationAmount defines model for PaginationAmount.
type PaginationAmount = int
// PaginationInt64After defines model for PaginationInt64After.
type PaginationInt64After = int64
// PaginationPrefix defines model for PaginationPrefix.
type PaginationPrefix = string
// PaginationStringAfter defines model for PaginationStringAfter.
type PaginationStringAfter = string
// LoginJSONBody defines parameters for Login.
type LoginJSONBody struct {
Name string `json:"name"`
Password string `json:"password"`
}
// DeleteObjectParams defines parameters for DeleteObject.
type DeleteObjectParams struct {
// RefName branch/tag to the ref
RefName string `form:"refName" json:"refName"`
// Path relative to the ref
Path string `form:"path" json:"path"`
}
// GetObjectParams defines parameters for GetObject.
type GetObjectParams struct {
// Type type indicate to retrieve from wip/branch/tag, default branch
Type RefType `form:"type" json:"type"`
// RefName branch/tag to the ref
RefName string `form:"refName" json:"refName"`
// Path relative to the ref
Path string `form:"path" json:"path"`
// Range Byte range to retrieve
Range *string `json:"Range,omitempty"`
}
// HeadObjectParams defines parameters for HeadObject.
type HeadObjectParams struct {
// Type type indicate to retrieve from wip/branch/tag, default branch
Type RefType `form:"type" json:"type"`
// RefName branch/tag to the ref
RefName string `form:"refName" json:"refName"`
// Path relative to the ref
Path string `form:"path" json:"path"`
// Range Byte range to retrieve
Range *string `json:"Range,omitempty"`
}
// UploadObjectMultipartBody defines parameters for UploadObject.
type UploadObjectMultipartBody struct {
// Content Only a single file per upload which must be named "content".
Content *openapi_types.File `json:"content,omitempty"`
}
// UploadObjectParams defines parameters for UploadObject.
type UploadObjectParams struct {
// IsReplace indicate to replace existing object or not
IsReplace *bool `form:"isReplace,omitempty" json:"isReplace,omitempty"`
// RefName branch/tag to the ref
RefName string `form:"refName" json:"refName"`
// Path relative to the ref
Path string `form:"path" json:"path"`
}
// GetFilesParams defines parameters for GetFiles.
type GetFilesParams struct {
// Pattern glob pattern for match file path
Pattern *string `form:"pattern,omitempty" json:"pattern,omitempty"`
// Type files to retrieve from wip/branch/tag/commit, default branch
Type RefType `form:"type" json:"type"`
// RefName branch/tag to the ref
RefName string `form:"refName" json:"refName"`
}
// ListPublicRepositoryParams defines parameters for ListPublicRepository.
type ListPublicRepositoryParams struct {
// Prefix return items prefixed with this value
Prefix *PaginationPrefix `form:"prefix,omitempty" json:"prefix,omitempty"`
// After return items after this value
After *PaginationInt64After `form:"after,omitempty" json:"after,omitempty"`
// Amount how many items to return
Amount *PaginationAmount `form:"amount,omitempty" json:"amount,omitempty"`
}
// DeleteRepositoryParams defines parameters for DeleteRepository.
type DeleteRepositoryParams struct {
IsCleanData *bool `form:"is_clean_data,omitempty" json:"is_clean_data,omitempty"`
}
// GetArchiveParams defines parameters for GetArchive.
type GetArchiveParams struct {
// ArchiveType download zip or car files
ArchiveType ArchiveType `form:"archive_type" json:"archive_type"`
// RefType ref type only allow branch or tag
RefType RefType `form:"refType" json:"refType"`
// RefName ref(branch/tag) name
RefName string `form:"refName" json:"refName"`
}
// DeleteBranchParams defines parameters for DeleteBranch.
type DeleteBranchParams struct {
RefName string `form:"refName" json:"refName"`
}
// GetBranchParams defines parameters for GetBranch.
type GetBranchParams struct {
RefName string `form:"refName" json:"refName"`
}
// ListBranchesParams defines parameters for ListBranches.
type ListBranchesParams struct {
// Prefix return items prefixed with this value
Prefix *PaginationPrefix `form:"prefix,omitempty" json:"prefix,omitempty"`
// After return items after this value
After *PaginationStringAfter `form:"after,omitempty" json:"after,omitempty"`
// Amount how many items to return
Amount *PaginationAmount `form:"amount,omitempty" json:"amount,omitempty"`
}
// GetCommitChangesParams defines parameters for GetCommitChanges.
type GetCommitChangesParams struct {
// Path specific path, if not specific return entries in root
Path *string `form:"path,omitempty" json:"path,omitempty"`
}
// GetCommitsInRefParams defines parameters for GetCommitsInRef.
type GetCommitsInRefParams struct {
// After return items after this value
After *PaginationInt64After `form:"after,omitempty" json:"after,omitempty"`
// Amount how many items to return
Amount *PaginationAmount `form:"amount,omitempty" json:"amount,omitempty"`
// RefName ref(branch/tag) name
RefName *string `form:"refName,omitempty" json:"refName,omitempty"`
}
// CompareCommitParams defines parameters for CompareCommit.
type CompareCommitParams struct {
// Path specific path, if not specific return entries in root
Path *string `form:"path,omitempty" json:"path,omitempty"`
}
// GetEntriesInRefParams defines parameters for GetEntriesInRef.
type GetEntriesInRefParams struct {
// Path specific path, if not specific return entries in root
Path *string `form:"path,omitempty" json:"path,omitempty"`
// Ref specific( ref name, tag name, commit hash), for wip and branchm, branch name default to repository default branch(HEAD),
Ref *string `form:"ref,omitempty" json:"ref,omitempty"`
// Type type indicate to retrieve from wip/branch/tag/commit, default branch
Type RefType `form:"type" json:"type"`
}
// RevokeMemberParams defines parameters for RevokeMember.
type RevokeMemberParams struct {
UserId openapi_types.UUID `form:"user_id" json:"user_id"`
}
// UpdateMemberGroupParams defines parameters for UpdateMemberGroup.
type UpdateMemberGroupParams struct {
UserId openapi_types.UUID `form:"user_id" json:"user_id"`
GroupId openapi_types.UUID `form:"group_id" json:"group_id"`
}
// InviteMemberParams defines parameters for InviteMember.
type InviteMemberParams struct {
UserId openapi_types.UUID `form:"user_id" json:"user_id"`
GroupId openapi_types.UUID `form:"group_id" json:"group_id"`
}
// ListMergeRequestsParams defines parameters for ListMergeRequests.
type ListMergeRequestsParams struct {
// After return items after this value
After *PaginationInt64After `form:"after,omitempty" json:"after,omitempty"`
// Amount how many items to return
Amount *PaginationAmount `form:"amount,omitempty" json:"amount,omitempty"`
State *int `form:"state,omitempty" json:"state,omitempty"`
}
// DeleteTagParams defines parameters for DeleteTag.
type DeleteTagParams struct {
RefName string `form:"refName" json:"refName"`
}
// GetTagParams defines parameters for GetTag.
type GetTagParams struct {
RefName string `form:"refName" json:"refName"`
}
// ListTagsParams defines parameters for ListTags.
type ListTagsParams struct {
// Prefix return items prefixed with this value
Prefix *PaginationPrefix `form:"prefix,omitempty" json:"prefix,omitempty"`
// After return items after this value
After *PaginationInt64After `form:"after,omitempty" json:"after,omitempty"`
// Amount how many items to return
Amount *PaginationAmount `form:"amount,omitempty" json:"amount,omitempty"`
}
// ChangeVisibleParams defines parameters for ChangeVisible.
type ChangeVisibleParams struct {
Visible bool `form:"visible" json:"visible"`
}
// DeleteAkskParams defines parameters for DeleteAksk.
type DeleteAkskParams struct {
Id *openapi_types.UUID `form:"id,omitempty" json:"id,omitempty"`
AccessKey *string `form:"access_key,omitempty" json:"access_key,omitempty"`
}
// GetAkskParams defines parameters for GetAksk.
type GetAkskParams struct {
Id *openapi_types.UUID `form:"id,omitempty" json:"id,omitempty"`
AccessKey *string `form:"access_key,omitempty" json:"access_key,omitempty"`
}
// CreateAkskParams defines parameters for CreateAksk.
type CreateAkskParams struct {
Description *string `form:"description,omitempty" json:"description,omitempty"`
}
// ListAksksParams defines parameters for ListAksks.
type ListAksksParams struct {
// After return items after this value
After *PaginationInt64After `form:"after,omitempty" json:"after,omitempty"`
// Amount how many items to return
Amount *PaginationAmount `form:"amount,omitempty" json:"amount,omitempty"`
}
// ListRepositoryOfAuthenticatedUserParams defines parameters for ListRepositoryOfAuthenticatedUser.
type ListRepositoryOfAuthenticatedUserParams struct {
// Prefix return items prefixed with this value
Prefix *PaginationPrefix `form:"prefix,omitempty" json:"prefix,omitempty"`
// After return items after this value
After *PaginationInt64After `form:"after,omitempty" json:"after,omitempty"`
// Amount how many items to return
Amount *PaginationAmount `form:"amount,omitempty" json:"amount,omitempty"`
}
// ListRepositoryParams defines parameters for ListRepository.
type ListRepositoryParams struct {
// Prefix return items prefixed with this value
Prefix *PaginationPrefix `form:"prefix,omitempty" json:"prefix,omitempty"`
// After return items after this value
After *PaginationInt64After `form:"after,omitempty" json:"after,omitempty"`
// Amount how many items to return
Amount *PaginationAmount `form:"amount,omitempty" json:"amount,omitempty"`
}
// DeleteWipParams defines parameters for DeleteWip.
type DeleteWipParams struct {
// RefName ref name
RefName string `form:"refName" json:"refName"`
}
// GetWipParams defines parameters for GetWip.
type GetWipParams struct {
// RefName ref name
RefName string `form:"refName" json:"refName"`
}
// UpdateWipParams defines parameters for UpdateWip.
type UpdateWipParams struct {
// RefName ref name
RefName string `form:"refName" json:"refName"`
}
// GetWipChangesParams defines parameters for GetWipChanges.
type GetWipChangesParams struct {
// RefName ref name
RefName string `form:"refName" json:"refName"`
// Path path
Path *string `form:"path,omitempty" json:"path,omitempty"`
}
// CommitWipParams defines parameters for CommitWip.
type CommitWipParams struct {
// Msg commit message
Msg string `form:"msg" json:"msg"`
// RefName ref name
RefName string `form:"refName" json:"refName"`
}
// RevertWipChangesParams defines parameters for RevertWipChanges.
type RevertWipChangesParams struct {
// RefName ref name
RefName string `form:"refName" json:"refName"`
// PathPrefix prefix of path
PathPrefix *string `form:"pathPrefix,omitempty" json:"pathPrefix,omitempty"`
}
// LoginJSONRequestBody defines body for Login for application/json ContentType.
type LoginJSONRequestBody LoginJSONBody
// UploadObjectMultipartRequestBody defines body for UploadObject for multipart/form-data ContentType.
type UploadObjectMultipartRequestBody UploadObjectMultipartBody
// UpdateRepositoryJSONRequestBody defines body for UpdateRepository for application/json ContentType.
type UpdateRepositoryJSONRequestBody = UpdateRepository
// CreateBranchJSONRequestBody defines body for CreateBranch for application/json ContentType.
type CreateBranchJSONRequestBody = BranchCreation
// CreateMergeRequestJSONRequestBody defines body for CreateMergeRequest for application/json ContentType.
type CreateMergeRequestJSONRequestBody = CreateMergeRequest
// UpdateMergeRequestJSONRequestBody defines body for UpdateMergeRequest for application/json ContentType.
type UpdateMergeRequestJSONRequestBody = UpdateMergeRequest
// MergeJSONRequestBody defines body for Merge for application/json ContentType.
type MergeJSONRequestBody = MergeMergeRequest
// CreateTagJSONRequestBody defines body for CreateTag for application/json ContentType.
type CreateTagJSONRequestBody = TagCreation
// RegisterJSONRequestBody defines body for Register for application/json ContentType.
type RegisterJSONRequestBody = UserRegisterInfo
// CreateRepositoryJSONRequestBody defines body for CreateRepository for application/json ContentType.
type CreateRepositoryJSONRequestBody = CreateRepository
// UpdateWipJSONRequestBody defines body for UpdateWip for application/json ContentType.
type UpdateWipJSONRequestBody = UpdateWip
// RequestEditorFn is the function signature for the RequestEditor callback function
type RequestEditorFn func(ctx context.Context, req *http.Request) error
// Doer performs HTTP requests.
//
// The standard http.Client implements this interface.
type HttpRequestDoer interface {
Do(req *http.Request) (*http.Response, error)
}
// Client which conforms to the OpenAPI3 specification for this service.
type Client struct {
// The endpoint of the server conforming to this interface, with scheme,
// https://api.deepmap.com for example. This can contain a path relative
// to the server, such as https://api.deepmap.com/dev-test, and all the
// paths in the swagger spec will be appended to the server.
Server string
// Doer for performing requests, typically a *http.Client with any
// customized settings, such as certificate chains.
Client HttpRequestDoer
// A list of callbacks for modifying requests which are generated before sending over
// the network.
RequestEditors []RequestEditorFn
}
// ClientOption allows setting custom parameters during construction
type ClientOption func(*Client) error
// Creates a new Client, with reasonable defaults
func NewClient(server string, opts ...ClientOption) (*Client, error) {
// create a client with sane default values
client := Client{
Server: server,
}
// mutate client and add all optional params
for _, o := range opts {
if err := o(&client); err != nil {
return nil, err
}
}
// ensure the server URL always has a trailing slash
if !strings.HasSuffix(client.Server, "/") {
client.Server += "/"
}
// create httpClient, if not already present
if client.Client == nil {
client.Client = &http.Client{}
}
return &client, nil
}
// WithHTTPClient allows overriding the default Doer, which is
// automatically created using http.Client. This is useful for tests.
func WithHTTPClient(doer HttpRequestDoer) ClientOption {
return func(c *Client) error {
c.Client = doer
return nil
}
}
// WithRequestEditorFn allows setting up a callback function, which will be
// called right before sending the request. This can be used to mutate the request.
func WithRequestEditorFn(fn RequestEditorFn) ClientOption {
return func(c *Client) error {
c.RequestEditors = append(c.RequestEditors, fn)
return nil
}
}
// The interface specification for the client above.
type ClientInterface interface {
// LoginWithBody request with any body
LoginWithBody(ctx context.Context, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
Login(ctx context.Context, body LoginJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// Logout request
Logout(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListRepoGroup request
ListRepoGroup(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteObject request
DeleteObject(ctx context.Context, owner string, repository string, params *DeleteObjectParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetObject request
GetObject(ctx context.Context, owner string, repository string, params *GetObjectParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// HeadObject request
HeadObject(ctx context.Context, owner string, repository string, params *HeadObjectParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// UploadObjectWithBody request with any body
UploadObjectWithBody(ctx context.Context, owner string, repository string, params *UploadObjectParams, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetFiles request
GetFiles(ctx context.Context, owner string, repository string, params *GetFilesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListPublicRepository request
ListPublicRepository(ctx context.Context, params *ListPublicRepositoryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteRepository request
DeleteRepository(ctx context.Context, owner string, repository string, params *DeleteRepositoryParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetRepository request
GetRepository(ctx context.Context, owner string, repository string, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateRepositoryWithBody request with any body
UpdateRepositoryWithBody(ctx context.Context, owner string, repository string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateRepository(ctx context.Context, owner string, repository string, body UpdateRepositoryJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetArchive request
GetArchive(ctx context.Context, owner string, repository string, params *GetArchiveParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteBranch request
DeleteBranch(ctx context.Context, owner string, repository string, params *DeleteBranchParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetBranch request
GetBranch(ctx context.Context, owner string, repository string, params *GetBranchParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateBranchWithBody request with any body
CreateBranchWithBody(ctx context.Context, owner string, repository string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateBranch(ctx context.Context, owner string, repository string, body CreateBranchJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListBranches request
ListBranches(ctx context.Context, owner string, repository string, params *ListBranchesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetCommitChanges request
GetCommitChanges(ctx context.Context, owner string, repository string, commitId string, params *GetCommitChangesParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetCommitsInRef request
GetCommitsInRef(ctx context.Context, owner string, repository string, params *GetCommitsInRefParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CompareCommit request
CompareCommit(ctx context.Context, owner string, repository string, basehead string, params *CompareCommitParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetEntriesInRef request
GetEntriesInRef(ctx context.Context, owner string, repository string, params *GetEntriesInRefParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// RevokeMember request
RevokeMember(ctx context.Context, owner string, repository string, params *RevokeMemberParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateMemberGroup request
UpdateMemberGroup(ctx context.Context, owner string, repository string, params *UpdateMemberGroupParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// InviteMember request
InviteMember(ctx context.Context, owner string, repository string, params *InviteMemberParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListMembers request
ListMembers(ctx context.Context, owner string, repository string, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListMergeRequests request
ListMergeRequests(ctx context.Context, owner string, repository string, params *ListMergeRequestsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateMergeRequestWithBody request with any body
CreateMergeRequestWithBody(ctx context.Context, owner string, repository string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateMergeRequest(ctx context.Context, owner string, repository string, body CreateMergeRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetMergeRequest request
GetMergeRequest(ctx context.Context, owner string, repository string, mrSeq uint64, reqEditors ...RequestEditorFn) (*http.Response, error)
// UpdateMergeRequestWithBody request with any body
UpdateMergeRequestWithBody(ctx context.Context, owner string, repository string, mrSeq uint64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
UpdateMergeRequest(ctx context.Context, owner string, repository string, mrSeq uint64, body UpdateMergeRequestJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// MergeWithBody request with any body
MergeWithBody(ctx context.Context, owner string, repository string, mrSeq uint64, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
Merge(ctx context.Context, owner string, repository string, mrSeq uint64, body MergeJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// DeleteTag request
DeleteTag(ctx context.Context, owner string, repository string, params *DeleteTagParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetTag request
GetTag(ctx context.Context, owner string, repository string, params *GetTagParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// CreateTagWithBody request with any body
CreateTagWithBody(ctx context.Context, owner string, repository string, contentType string, body io.Reader, reqEditors ...RequestEditorFn) (*http.Response, error)
CreateTag(ctx context.Context, owner string, repository string, body CreateTagJSONRequestBody, reqEditors ...RequestEditorFn) (*http.Response, error)
// ListTags request
ListTags(ctx context.Context, owner string, repository string, params *ListTagsParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// ChangeVisible request
ChangeVisible(ctx context.Context, owner string, repository string, params *ChangeVisibleParams, reqEditors ...RequestEditorFn) (*http.Response, error)
// GetSetupState request
GetSetupState(ctx context.Context, reqEditors ...RequestEditorFn) (*http.Response, error)