You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

777 lines
30 KiB

  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/devtools/sourcerepo/v1/sourcerepo.proto
  3. package sourcerepo // import "google.golang.org/genproto/googleapis/devtools/sourcerepo/v1"
  4. import proto "github.com/golang/protobuf/proto"
  5. import fmt "fmt"
  6. import math "math"
  7. import empty "github.com/golang/protobuf/ptypes/empty"
  8. import _ "google.golang.org/genproto/googleapis/api/annotations"
  9. import v1 "google.golang.org/genproto/googleapis/iam/v1"
  10. import (
  11. context "golang.org/x/net/context"
  12. grpc "google.golang.org/grpc"
  13. )
  14. // Reference imports to suppress errors if they are not otherwise used.
  15. var _ = proto.Marshal
  16. var _ = fmt.Errorf
  17. var _ = math.Inf
  18. // This is a compile-time assertion to ensure that this generated file
  19. // is compatible with the proto package it is being compiled against.
  20. // A compilation error at this line likely means your copy of the
  21. // proto package needs to be updated.
  22. const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
  23. // A repository (or repo) is a Git repository storing versioned source content.
  24. type Repo struct {
  25. // Resource name of the repository, of the form
  26. // `projects/<project>/repos/<repo>`. The repo name may contain slashes.
  27. // eg, `projects/myproject/repos/name/with/slash`
  28. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  29. // The disk usage of the repo, in bytes. Read-only field. Size is only
  30. // returned by GetRepo.
  31. Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
  32. // URL to clone the repository from Google Cloud Source Repositories.
  33. // Read-only field.
  34. Url string `protobuf:"bytes,3,opt,name=url,proto3" json:"url,omitempty"`
  35. // How this repository mirrors a repository managed by another service.
  36. // Read-only field.
  37. MirrorConfig *MirrorConfig `protobuf:"bytes,4,opt,name=mirror_config,json=mirrorConfig,proto3" json:"mirror_config,omitempty"`
  38. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  39. XXX_unrecognized []byte `json:"-"`
  40. XXX_sizecache int32 `json:"-"`
  41. }
  42. func (m *Repo) Reset() { *m = Repo{} }
  43. func (m *Repo) String() string { return proto.CompactTextString(m) }
  44. func (*Repo) ProtoMessage() {}
  45. func (*Repo) Descriptor() ([]byte, []int) {
  46. return fileDescriptor_sourcerepo_3c8790c27be2e283, []int{0}
  47. }
  48. func (m *Repo) XXX_Unmarshal(b []byte) error {
  49. return xxx_messageInfo_Repo.Unmarshal(m, b)
  50. }
  51. func (m *Repo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  52. return xxx_messageInfo_Repo.Marshal(b, m, deterministic)
  53. }
  54. func (dst *Repo) XXX_Merge(src proto.Message) {
  55. xxx_messageInfo_Repo.Merge(dst, src)
  56. }
  57. func (m *Repo) XXX_Size() int {
  58. return xxx_messageInfo_Repo.Size(m)
  59. }
  60. func (m *Repo) XXX_DiscardUnknown() {
  61. xxx_messageInfo_Repo.DiscardUnknown(m)
  62. }
  63. var xxx_messageInfo_Repo proto.InternalMessageInfo
  64. func (m *Repo) GetName() string {
  65. if m != nil {
  66. return m.Name
  67. }
  68. return ""
  69. }
  70. func (m *Repo) GetSize() int64 {
  71. if m != nil {
  72. return m.Size
  73. }
  74. return 0
  75. }
  76. func (m *Repo) GetUrl() string {
  77. if m != nil {
  78. return m.Url
  79. }
  80. return ""
  81. }
  82. func (m *Repo) GetMirrorConfig() *MirrorConfig {
  83. if m != nil {
  84. return m.MirrorConfig
  85. }
  86. return nil
  87. }
  88. // Configuration to automatically mirror a repository from another
  89. // hosting service, for example GitHub or BitBucket.
  90. type MirrorConfig struct {
  91. // URL of the main repository at the other hosting service.
  92. Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
  93. // ID of the webhook listening to updates to trigger mirroring.
  94. // Removing this webhook from the other hosting service will stop
  95. // Google Cloud Source Repositories from receiving notifications,
  96. // and thereby disabling mirroring.
  97. WebhookId string `protobuf:"bytes,2,opt,name=webhook_id,json=webhookId,proto3" json:"webhook_id,omitempty"`
  98. // ID of the SSH deploy key at the other hosting service.
  99. // Removing this key from the other service would deauthorize
  100. // Google Cloud Source Repositories from mirroring.
  101. DeployKeyId string `protobuf:"bytes,3,opt,name=deploy_key_id,json=deployKeyId,proto3" json:"deploy_key_id,omitempty"`
  102. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  103. XXX_unrecognized []byte `json:"-"`
  104. XXX_sizecache int32 `json:"-"`
  105. }
  106. func (m *MirrorConfig) Reset() { *m = MirrorConfig{} }
  107. func (m *MirrorConfig) String() string { return proto.CompactTextString(m) }
  108. func (*MirrorConfig) ProtoMessage() {}
  109. func (*MirrorConfig) Descriptor() ([]byte, []int) {
  110. return fileDescriptor_sourcerepo_3c8790c27be2e283, []int{1}
  111. }
  112. func (m *MirrorConfig) XXX_Unmarshal(b []byte) error {
  113. return xxx_messageInfo_MirrorConfig.Unmarshal(m, b)
  114. }
  115. func (m *MirrorConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  116. return xxx_messageInfo_MirrorConfig.Marshal(b, m, deterministic)
  117. }
  118. func (dst *MirrorConfig) XXX_Merge(src proto.Message) {
  119. xxx_messageInfo_MirrorConfig.Merge(dst, src)
  120. }
  121. func (m *MirrorConfig) XXX_Size() int {
  122. return xxx_messageInfo_MirrorConfig.Size(m)
  123. }
  124. func (m *MirrorConfig) XXX_DiscardUnknown() {
  125. xxx_messageInfo_MirrorConfig.DiscardUnknown(m)
  126. }
  127. var xxx_messageInfo_MirrorConfig proto.InternalMessageInfo
  128. func (m *MirrorConfig) GetUrl() string {
  129. if m != nil {
  130. return m.Url
  131. }
  132. return ""
  133. }
  134. func (m *MirrorConfig) GetWebhookId() string {
  135. if m != nil {
  136. return m.WebhookId
  137. }
  138. return ""
  139. }
  140. func (m *MirrorConfig) GetDeployKeyId() string {
  141. if m != nil {
  142. return m.DeployKeyId
  143. }
  144. return ""
  145. }
  146. // Request for GetRepo.
  147. type GetRepoRequest struct {
  148. // The name of the requested repository. Values are of the form
  149. // `projects/<project>/repos/<repo>`.
  150. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  151. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  152. XXX_unrecognized []byte `json:"-"`
  153. XXX_sizecache int32 `json:"-"`
  154. }
  155. func (m *GetRepoRequest) Reset() { *m = GetRepoRequest{} }
  156. func (m *GetRepoRequest) String() string { return proto.CompactTextString(m) }
  157. func (*GetRepoRequest) ProtoMessage() {}
  158. func (*GetRepoRequest) Descriptor() ([]byte, []int) {
  159. return fileDescriptor_sourcerepo_3c8790c27be2e283, []int{2}
  160. }
  161. func (m *GetRepoRequest) XXX_Unmarshal(b []byte) error {
  162. return xxx_messageInfo_GetRepoRequest.Unmarshal(m, b)
  163. }
  164. func (m *GetRepoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  165. return xxx_messageInfo_GetRepoRequest.Marshal(b, m, deterministic)
  166. }
  167. func (dst *GetRepoRequest) XXX_Merge(src proto.Message) {
  168. xxx_messageInfo_GetRepoRequest.Merge(dst, src)
  169. }
  170. func (m *GetRepoRequest) XXX_Size() int {
  171. return xxx_messageInfo_GetRepoRequest.Size(m)
  172. }
  173. func (m *GetRepoRequest) XXX_DiscardUnknown() {
  174. xxx_messageInfo_GetRepoRequest.DiscardUnknown(m)
  175. }
  176. var xxx_messageInfo_GetRepoRequest proto.InternalMessageInfo
  177. func (m *GetRepoRequest) GetName() string {
  178. if m != nil {
  179. return m.Name
  180. }
  181. return ""
  182. }
  183. // Request for ListRepos.
  184. type ListReposRequest struct {
  185. // The project ID whose repos should be listed. Values are of the form
  186. // `projects/<project>`.
  187. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  188. // Maximum number of repositories to return; between 1 and 500.
  189. // If not set or zero, defaults to 100 at the server.
  190. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
  191. // Resume listing repositories where a prior ListReposResponse
  192. // left off. This is an opaque token that must be obtained from
  193. // a recent, prior ListReposResponse's next_page_token field.
  194. PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
  195. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  196. XXX_unrecognized []byte `json:"-"`
  197. XXX_sizecache int32 `json:"-"`
  198. }
  199. func (m *ListReposRequest) Reset() { *m = ListReposRequest{} }
  200. func (m *ListReposRequest) String() string { return proto.CompactTextString(m) }
  201. func (*ListReposRequest) ProtoMessage() {}
  202. func (*ListReposRequest) Descriptor() ([]byte, []int) {
  203. return fileDescriptor_sourcerepo_3c8790c27be2e283, []int{3}
  204. }
  205. func (m *ListReposRequest) XXX_Unmarshal(b []byte) error {
  206. return xxx_messageInfo_ListReposRequest.Unmarshal(m, b)
  207. }
  208. func (m *ListReposRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  209. return xxx_messageInfo_ListReposRequest.Marshal(b, m, deterministic)
  210. }
  211. func (dst *ListReposRequest) XXX_Merge(src proto.Message) {
  212. xxx_messageInfo_ListReposRequest.Merge(dst, src)
  213. }
  214. func (m *ListReposRequest) XXX_Size() int {
  215. return xxx_messageInfo_ListReposRequest.Size(m)
  216. }
  217. func (m *ListReposRequest) XXX_DiscardUnknown() {
  218. xxx_messageInfo_ListReposRequest.DiscardUnknown(m)
  219. }
  220. var xxx_messageInfo_ListReposRequest proto.InternalMessageInfo
  221. func (m *ListReposRequest) GetName() string {
  222. if m != nil {
  223. return m.Name
  224. }
  225. return ""
  226. }
  227. func (m *ListReposRequest) GetPageSize() int32 {
  228. if m != nil {
  229. return m.PageSize
  230. }
  231. return 0
  232. }
  233. func (m *ListReposRequest) GetPageToken() string {
  234. if m != nil {
  235. return m.PageToken
  236. }
  237. return ""
  238. }
  239. // Response for ListRepos. The size is not set in the returned repositories.
  240. type ListReposResponse struct {
  241. // The listed repos.
  242. Repos []*Repo `protobuf:"bytes,1,rep,name=repos,proto3" json:"repos,omitempty"`
  243. // If non-empty, additional repositories exist within the project. These
  244. // can be retrieved by including this value in the next ListReposRequest's
  245. // page_token field.
  246. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
  247. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  248. XXX_unrecognized []byte `json:"-"`
  249. XXX_sizecache int32 `json:"-"`
  250. }
  251. func (m *ListReposResponse) Reset() { *m = ListReposResponse{} }
  252. func (m *ListReposResponse) String() string { return proto.CompactTextString(m) }
  253. func (*ListReposResponse) ProtoMessage() {}
  254. func (*ListReposResponse) Descriptor() ([]byte, []int) {
  255. return fileDescriptor_sourcerepo_3c8790c27be2e283, []int{4}
  256. }
  257. func (m *ListReposResponse) XXX_Unmarshal(b []byte) error {
  258. return xxx_messageInfo_ListReposResponse.Unmarshal(m, b)
  259. }
  260. func (m *ListReposResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  261. return xxx_messageInfo_ListReposResponse.Marshal(b, m, deterministic)
  262. }
  263. func (dst *ListReposResponse) XXX_Merge(src proto.Message) {
  264. xxx_messageInfo_ListReposResponse.Merge(dst, src)
  265. }
  266. func (m *ListReposResponse) XXX_Size() int {
  267. return xxx_messageInfo_ListReposResponse.Size(m)
  268. }
  269. func (m *ListReposResponse) XXX_DiscardUnknown() {
  270. xxx_messageInfo_ListReposResponse.DiscardUnknown(m)
  271. }
  272. var xxx_messageInfo_ListReposResponse proto.InternalMessageInfo
  273. func (m *ListReposResponse) GetRepos() []*Repo {
  274. if m != nil {
  275. return m.Repos
  276. }
  277. return nil
  278. }
  279. func (m *ListReposResponse) GetNextPageToken() string {
  280. if m != nil {
  281. return m.NextPageToken
  282. }
  283. return ""
  284. }
  285. // Request for CreateRepo
  286. type CreateRepoRequest struct {
  287. // The project in which to create the repo. Values are of the form
  288. // `projects/<project>`.
  289. Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
  290. // The repo to create. Only name should be set; setting other fields
  291. // is an error. The project in the name should match the parent field.
  292. Repo *Repo `protobuf:"bytes,2,opt,name=repo,proto3" json:"repo,omitempty"`
  293. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  294. XXX_unrecognized []byte `json:"-"`
  295. XXX_sizecache int32 `json:"-"`
  296. }
  297. func (m *CreateRepoRequest) Reset() { *m = CreateRepoRequest{} }
  298. func (m *CreateRepoRequest) String() string { return proto.CompactTextString(m) }
  299. func (*CreateRepoRequest) ProtoMessage() {}
  300. func (*CreateRepoRequest) Descriptor() ([]byte, []int) {
  301. return fileDescriptor_sourcerepo_3c8790c27be2e283, []int{5}
  302. }
  303. func (m *CreateRepoRequest) XXX_Unmarshal(b []byte) error {
  304. return xxx_messageInfo_CreateRepoRequest.Unmarshal(m, b)
  305. }
  306. func (m *CreateRepoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  307. return xxx_messageInfo_CreateRepoRequest.Marshal(b, m, deterministic)
  308. }
  309. func (dst *CreateRepoRequest) XXX_Merge(src proto.Message) {
  310. xxx_messageInfo_CreateRepoRequest.Merge(dst, src)
  311. }
  312. func (m *CreateRepoRequest) XXX_Size() int {
  313. return xxx_messageInfo_CreateRepoRequest.Size(m)
  314. }
  315. func (m *CreateRepoRequest) XXX_DiscardUnknown() {
  316. xxx_messageInfo_CreateRepoRequest.DiscardUnknown(m)
  317. }
  318. var xxx_messageInfo_CreateRepoRequest proto.InternalMessageInfo
  319. func (m *CreateRepoRequest) GetParent() string {
  320. if m != nil {
  321. return m.Parent
  322. }
  323. return ""
  324. }
  325. func (m *CreateRepoRequest) GetRepo() *Repo {
  326. if m != nil {
  327. return m.Repo
  328. }
  329. return nil
  330. }
  331. // Request for DeleteRepo.
  332. type DeleteRepoRequest struct {
  333. // The name of the repo to delete. Values are of the form
  334. // `projects/<project>/repos/<repo>`.
  335. Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
  336. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  337. XXX_unrecognized []byte `json:"-"`
  338. XXX_sizecache int32 `json:"-"`
  339. }
  340. func (m *DeleteRepoRequest) Reset() { *m = DeleteRepoRequest{} }
  341. func (m *DeleteRepoRequest) String() string { return proto.CompactTextString(m) }
  342. func (*DeleteRepoRequest) ProtoMessage() {}
  343. func (*DeleteRepoRequest) Descriptor() ([]byte, []int) {
  344. return fileDescriptor_sourcerepo_3c8790c27be2e283, []int{6}
  345. }
  346. func (m *DeleteRepoRequest) XXX_Unmarshal(b []byte) error {
  347. return xxx_messageInfo_DeleteRepoRequest.Unmarshal(m, b)
  348. }
  349. func (m *DeleteRepoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  350. return xxx_messageInfo_DeleteRepoRequest.Marshal(b, m, deterministic)
  351. }
  352. func (dst *DeleteRepoRequest) XXX_Merge(src proto.Message) {
  353. xxx_messageInfo_DeleteRepoRequest.Merge(dst, src)
  354. }
  355. func (m *DeleteRepoRequest) XXX_Size() int {
  356. return xxx_messageInfo_DeleteRepoRequest.Size(m)
  357. }
  358. func (m *DeleteRepoRequest) XXX_DiscardUnknown() {
  359. xxx_messageInfo_DeleteRepoRequest.DiscardUnknown(m)
  360. }
  361. var xxx_messageInfo_DeleteRepoRequest proto.InternalMessageInfo
  362. func (m *DeleteRepoRequest) GetName() string {
  363. if m != nil {
  364. return m.Name
  365. }
  366. return ""
  367. }
  368. func init() {
  369. proto.RegisterType((*Repo)(nil), "google.devtools.sourcerepo.v1.Repo")
  370. proto.RegisterType((*MirrorConfig)(nil), "google.devtools.sourcerepo.v1.MirrorConfig")
  371. proto.RegisterType((*GetRepoRequest)(nil), "google.devtools.sourcerepo.v1.GetRepoRequest")
  372. proto.RegisterType((*ListReposRequest)(nil), "google.devtools.sourcerepo.v1.ListReposRequest")
  373. proto.RegisterType((*ListReposResponse)(nil), "google.devtools.sourcerepo.v1.ListReposResponse")
  374. proto.RegisterType((*CreateRepoRequest)(nil), "google.devtools.sourcerepo.v1.CreateRepoRequest")
  375. proto.RegisterType((*DeleteRepoRequest)(nil), "google.devtools.sourcerepo.v1.DeleteRepoRequest")
  376. }
  377. // Reference imports to suppress errors if they are not otherwise used.
  378. var _ context.Context
  379. var _ grpc.ClientConn
  380. // This is a compile-time assertion to ensure that this generated file
  381. // is compatible with the grpc package it is being compiled against.
  382. const _ = grpc.SupportPackageIsVersion4
  383. // SourceRepoClient is the client API for SourceRepo service.
  384. //
  385. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  386. type SourceRepoClient interface {
  387. // Returns all repos belonging to a project. The sizes of the repos are
  388. // not set by ListRepos. To get the size of a repo, use GetRepo.
  389. ListRepos(ctx context.Context, in *ListReposRequest, opts ...grpc.CallOption) (*ListReposResponse, error)
  390. // Returns information about a repo.
  391. GetRepo(ctx context.Context, in *GetRepoRequest, opts ...grpc.CallOption) (*Repo, error)
  392. // Creates a repo in the given project with the given name.
  393. //
  394. // If the named repository already exists, `CreateRepo` returns
  395. // `ALREADY_EXISTS`.
  396. CreateRepo(ctx context.Context, in *CreateRepoRequest, opts ...grpc.CallOption) (*Repo, error)
  397. // Deletes a repo.
  398. DeleteRepo(ctx context.Context, in *DeleteRepoRequest, opts ...grpc.CallOption) (*empty.Empty, error)
  399. // Sets the access control policy on the specified resource. Replaces any
  400. // existing policy.
  401. SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error)
  402. // Gets the access control policy for a resource.
  403. // Returns an empty policy if the resource exists and does not have a policy
  404. // set.
  405. GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error)
  406. // Returns permissions that a caller has on the specified resource.
  407. // If the resource does not exist, this will return an empty set of
  408. // permissions, not a NOT_FOUND error.
  409. TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error)
  410. }
  411. type sourceRepoClient struct {
  412. cc *grpc.ClientConn
  413. }
  414. func NewSourceRepoClient(cc *grpc.ClientConn) SourceRepoClient {
  415. return &sourceRepoClient{cc}
  416. }
  417. func (c *sourceRepoClient) ListRepos(ctx context.Context, in *ListReposRequest, opts ...grpc.CallOption) (*ListReposResponse, error) {
  418. out := new(ListReposResponse)
  419. err := c.cc.Invoke(ctx, "/google.devtools.sourcerepo.v1.SourceRepo/ListRepos", in, out, opts...)
  420. if err != nil {
  421. return nil, err
  422. }
  423. return out, nil
  424. }
  425. func (c *sourceRepoClient) GetRepo(ctx context.Context, in *GetRepoRequest, opts ...grpc.CallOption) (*Repo, error) {
  426. out := new(Repo)
  427. err := c.cc.Invoke(ctx, "/google.devtools.sourcerepo.v1.SourceRepo/GetRepo", in, out, opts...)
  428. if err != nil {
  429. return nil, err
  430. }
  431. return out, nil
  432. }
  433. func (c *sourceRepoClient) CreateRepo(ctx context.Context, in *CreateRepoRequest, opts ...grpc.CallOption) (*Repo, error) {
  434. out := new(Repo)
  435. err := c.cc.Invoke(ctx, "/google.devtools.sourcerepo.v1.SourceRepo/CreateRepo", in, out, opts...)
  436. if err != nil {
  437. return nil, err
  438. }
  439. return out, nil
  440. }
  441. func (c *sourceRepoClient) DeleteRepo(ctx context.Context, in *DeleteRepoRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
  442. out := new(empty.Empty)
  443. err := c.cc.Invoke(ctx, "/google.devtools.sourcerepo.v1.SourceRepo/DeleteRepo", in, out, opts...)
  444. if err != nil {
  445. return nil, err
  446. }
  447. return out, nil
  448. }
  449. func (c *sourceRepoClient) SetIamPolicy(ctx context.Context, in *v1.SetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) {
  450. out := new(v1.Policy)
  451. err := c.cc.Invoke(ctx, "/google.devtools.sourcerepo.v1.SourceRepo/SetIamPolicy", in, out, opts...)
  452. if err != nil {
  453. return nil, err
  454. }
  455. return out, nil
  456. }
  457. func (c *sourceRepoClient) GetIamPolicy(ctx context.Context, in *v1.GetIamPolicyRequest, opts ...grpc.CallOption) (*v1.Policy, error) {
  458. out := new(v1.Policy)
  459. err := c.cc.Invoke(ctx, "/google.devtools.sourcerepo.v1.SourceRepo/GetIamPolicy", in, out, opts...)
  460. if err != nil {
  461. return nil, err
  462. }
  463. return out, nil
  464. }
  465. func (c *sourceRepoClient) TestIamPermissions(ctx context.Context, in *v1.TestIamPermissionsRequest, opts ...grpc.CallOption) (*v1.TestIamPermissionsResponse, error) {
  466. out := new(v1.TestIamPermissionsResponse)
  467. err := c.cc.Invoke(ctx, "/google.devtools.sourcerepo.v1.SourceRepo/TestIamPermissions", in, out, opts...)
  468. if err != nil {
  469. return nil, err
  470. }
  471. return out, nil
  472. }
  473. // SourceRepoServer is the server API for SourceRepo service.
  474. type SourceRepoServer interface {
  475. // Returns all repos belonging to a project. The sizes of the repos are
  476. // not set by ListRepos. To get the size of a repo, use GetRepo.
  477. ListRepos(context.Context, *ListReposRequest) (*ListReposResponse, error)
  478. // Returns information about a repo.
  479. GetRepo(context.Context, *GetRepoRequest) (*Repo, error)
  480. // Creates a repo in the given project with the given name.
  481. //
  482. // If the named repository already exists, `CreateRepo` returns
  483. // `ALREADY_EXISTS`.
  484. CreateRepo(context.Context, *CreateRepoRequest) (*Repo, error)
  485. // Deletes a repo.
  486. DeleteRepo(context.Context, *DeleteRepoRequest) (*empty.Empty, error)
  487. // Sets the access control policy on the specified resource. Replaces any
  488. // existing policy.
  489. SetIamPolicy(context.Context, *v1.SetIamPolicyRequest) (*v1.Policy, error)
  490. // Gets the access control policy for a resource.
  491. // Returns an empty policy if the resource exists and does not have a policy
  492. // set.
  493. GetIamPolicy(context.Context, *v1.GetIamPolicyRequest) (*v1.Policy, error)
  494. // Returns permissions that a caller has on the specified resource.
  495. // If the resource does not exist, this will return an empty set of
  496. // permissions, not a NOT_FOUND error.
  497. TestIamPermissions(context.Context, *v1.TestIamPermissionsRequest) (*v1.TestIamPermissionsResponse, error)
  498. }
  499. func RegisterSourceRepoServer(s *grpc.Server, srv SourceRepoServer) {
  500. s.RegisterService(&_SourceRepo_serviceDesc, srv)
  501. }
  502. func _SourceRepo_ListRepos_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  503. in := new(ListReposRequest)
  504. if err := dec(in); err != nil {
  505. return nil, err
  506. }
  507. if interceptor == nil {
  508. return srv.(SourceRepoServer).ListRepos(ctx, in)
  509. }
  510. info := &grpc.UnaryServerInfo{
  511. Server: srv,
  512. FullMethod: "/google.devtools.sourcerepo.v1.SourceRepo/ListRepos",
  513. }
  514. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  515. return srv.(SourceRepoServer).ListRepos(ctx, req.(*ListReposRequest))
  516. }
  517. return interceptor(ctx, in, info, handler)
  518. }
  519. func _SourceRepo_GetRepo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  520. in := new(GetRepoRequest)
  521. if err := dec(in); err != nil {
  522. return nil, err
  523. }
  524. if interceptor == nil {
  525. return srv.(SourceRepoServer).GetRepo(ctx, in)
  526. }
  527. info := &grpc.UnaryServerInfo{
  528. Server: srv,
  529. FullMethod: "/google.devtools.sourcerepo.v1.SourceRepo/GetRepo",
  530. }
  531. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  532. return srv.(SourceRepoServer).GetRepo(ctx, req.(*GetRepoRequest))
  533. }
  534. return interceptor(ctx, in, info, handler)
  535. }
  536. func _SourceRepo_CreateRepo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  537. in := new(CreateRepoRequest)
  538. if err := dec(in); err != nil {
  539. return nil, err
  540. }
  541. if interceptor == nil {
  542. return srv.(SourceRepoServer).CreateRepo(ctx, in)
  543. }
  544. info := &grpc.UnaryServerInfo{
  545. Server: srv,
  546. FullMethod: "/google.devtools.sourcerepo.v1.SourceRepo/CreateRepo",
  547. }
  548. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  549. return srv.(SourceRepoServer).CreateRepo(ctx, req.(*CreateRepoRequest))
  550. }
  551. return interceptor(ctx, in, info, handler)
  552. }
  553. func _SourceRepo_DeleteRepo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  554. in := new(DeleteRepoRequest)
  555. if err := dec(in); err != nil {
  556. return nil, err
  557. }
  558. if interceptor == nil {
  559. return srv.(SourceRepoServer).DeleteRepo(ctx, in)
  560. }
  561. info := &grpc.UnaryServerInfo{
  562. Server: srv,
  563. FullMethod: "/google.devtools.sourcerepo.v1.SourceRepo/DeleteRepo",
  564. }
  565. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  566. return srv.(SourceRepoServer).DeleteRepo(ctx, req.(*DeleteRepoRequest))
  567. }
  568. return interceptor(ctx, in, info, handler)
  569. }
  570. func _SourceRepo_SetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  571. in := new(v1.SetIamPolicyRequest)
  572. if err := dec(in); err != nil {
  573. return nil, err
  574. }
  575. if interceptor == nil {
  576. return srv.(SourceRepoServer).SetIamPolicy(ctx, in)
  577. }
  578. info := &grpc.UnaryServerInfo{
  579. Server: srv,
  580. FullMethod: "/google.devtools.sourcerepo.v1.SourceRepo/SetIamPolicy",
  581. }
  582. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  583. return srv.(SourceRepoServer).SetIamPolicy(ctx, req.(*v1.SetIamPolicyRequest))
  584. }
  585. return interceptor(ctx, in, info, handler)
  586. }
  587. func _SourceRepo_GetIamPolicy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  588. in := new(v1.GetIamPolicyRequest)
  589. if err := dec(in); err != nil {
  590. return nil, err
  591. }
  592. if interceptor == nil {
  593. return srv.(SourceRepoServer).GetIamPolicy(ctx, in)
  594. }
  595. info := &grpc.UnaryServerInfo{
  596. Server: srv,
  597. FullMethod: "/google.devtools.sourcerepo.v1.SourceRepo/GetIamPolicy",
  598. }
  599. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  600. return srv.(SourceRepoServer).GetIamPolicy(ctx, req.(*v1.GetIamPolicyRequest))
  601. }
  602. return interceptor(ctx, in, info, handler)
  603. }
  604. func _SourceRepo_TestIamPermissions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  605. in := new(v1.TestIamPermissionsRequest)
  606. if err := dec(in); err != nil {
  607. return nil, err
  608. }
  609. if interceptor == nil {
  610. return srv.(SourceRepoServer).TestIamPermissions(ctx, in)
  611. }
  612. info := &grpc.UnaryServerInfo{
  613. Server: srv,
  614. FullMethod: "/google.devtools.sourcerepo.v1.SourceRepo/TestIamPermissions",
  615. }
  616. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  617. return srv.(SourceRepoServer).TestIamPermissions(ctx, req.(*v1.TestIamPermissionsRequest))
  618. }
  619. return interceptor(ctx, in, info, handler)
  620. }
  621. var _SourceRepo_serviceDesc = grpc.ServiceDesc{
  622. ServiceName: "google.devtools.sourcerepo.v1.SourceRepo",
  623. HandlerType: (*SourceRepoServer)(nil),
  624. Methods: []grpc.MethodDesc{
  625. {
  626. MethodName: "ListRepos",
  627. Handler: _SourceRepo_ListRepos_Handler,
  628. },
  629. {
  630. MethodName: "GetRepo",
  631. Handler: _SourceRepo_GetRepo_Handler,
  632. },
  633. {
  634. MethodName: "CreateRepo",
  635. Handler: _SourceRepo_CreateRepo_Handler,
  636. },
  637. {
  638. MethodName: "DeleteRepo",
  639. Handler: _SourceRepo_DeleteRepo_Handler,
  640. },
  641. {
  642. MethodName: "SetIamPolicy",
  643. Handler: _SourceRepo_SetIamPolicy_Handler,
  644. },
  645. {
  646. MethodName: "GetIamPolicy",
  647. Handler: _SourceRepo_GetIamPolicy_Handler,
  648. },
  649. {
  650. MethodName: "TestIamPermissions",
  651. Handler: _SourceRepo_TestIamPermissions_Handler,
  652. },
  653. },
  654. Streams: []grpc.StreamDesc{},
  655. Metadata: "google/devtools/sourcerepo/v1/sourcerepo.proto",
  656. }
  657. func init() {
  658. proto.RegisterFile("google/devtools/sourcerepo/v1/sourcerepo.proto", fileDescriptor_sourcerepo_3c8790c27be2e283)
  659. }
  660. var fileDescriptor_sourcerepo_3c8790c27be2e283 = []byte{
  661. // 743 bytes of a gzipped FileDescriptorProto
  662. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x55, 0xd1, 0x6e, 0xd3, 0x4a,
  663. 0x10, 0xd5, 0x36, 0x69, 0x7b, 0x33, 0x4d, 0x6f, 0xdb, 0x95, 0x6e, 0x15, 0xa5, 0x37, 0x55, 0xae,
  664. 0x7b, 0x29, 0x21, 0x15, 0x36, 0x2d, 0xa0, 0x8a, 0x20, 0x24, 0xd4, 0x82, 0xa2, 0x0a, 0x90, 0xa2,
  665. 0xb4, 0x4f, 0xbc, 0x44, 0x4e, 0x32, 0x35, 0xa6, 0xb6, 0xd7, 0x78, 0x37, 0x81, 0x80, 0x0a, 0x52,
  666. 0xa5, 0xbe, 0x23, 0xfa, 0x19, 0x7c, 0x0e, 0xbf, 0xc0, 0x47, 0xf0, 0x88, 0x76, 0x6d, 0x37, 0x4e,
  667. 0x13, 0x12, 0xbf, 0xed, 0xce, 0x9c, 0x99, 0x73, 0xf6, 0xec, 0x78, 0x0d, 0xba, 0xc5, 0x98, 0xe5,
  668. 0xa0, 0xd1, 0xc5, 0xbe, 0x60, 0xcc, 0xe1, 0x06, 0x67, 0xbd, 0xa0, 0x83, 0x01, 0xfa, 0xcc, 0xe8,
  669. 0xef, 0x26, 0x76, 0xba, 0x1f, 0x30, 0xc1, 0x68, 0x29, 0xc4, 0xeb, 0x31, 0x5e, 0x4f, 0x20, 0xfa,
  670. 0xbb, 0xc5, 0x7f, 0xa3, 0x76, 0xa6, 0x6f, 0x1b, 0xa6, 0xe7, 0x31, 0x61, 0x0a, 0x9b, 0x79, 0x3c,
  671. 0x2c, 0x2e, 0x6e, 0x46, 0x59, 0xdb, 0x74, 0x65, 0x73, 0xdb, 0x74, 0x5b, 0x3e, 0x73, 0xec, 0xce,
  672. 0x20, 0xca, 0x17, 0x47, 0xf3, 0x23, 0xb9, 0x8d, 0x28, 0xa7, 0x76, 0xed, 0xde, 0xa9, 0x81, 0xae,
  673. 0x2f, 0xa2, 0xa4, 0xf6, 0x8d, 0x40, 0xb6, 0x89, 0x3e, 0xa3, 0x14, 0xb2, 0x9e, 0xe9, 0x62, 0x81,
  674. 0x94, 0x49, 0x25, 0xd7, 0x54, 0x6b, 0x19, 0xe3, 0xf6, 0x47, 0x2c, 0xcc, 0x95, 0x49, 0x25, 0xd3,
  675. 0x54, 0x6b, 0xba, 0x0a, 0x99, 0x5e, 0xe0, 0x14, 0x32, 0x0a, 0x26, 0x97, 0xb4, 0x01, 0xcb, 0xae,
  676. 0x1d, 0x04, 0x2c, 0x68, 0x75, 0x98, 0x77, 0x6a, 0x5b, 0x85, 0x6c, 0x99, 0x54, 0x96, 0xf6, 0x76,
  677. 0xf4, 0xa9, 0x07, 0xd6, 0x5f, 0xa9, 0x9a, 0x43, 0x55, 0xd2, 0xcc, 0xbb, 0x89, 0x9d, 0xd6, 0x81,
  678. 0x7c, 0x32, 0x1b, 0x73, 0x92, 0x21, 0x67, 0x09, 0xe0, 0x3d, 0xb6, 0xdf, 0x30, 0x76, 0xd6, 0xb2,
  679. 0xbb, 0x4a, 0x5f, 0xae, 0x99, 0x8b, 0x22, 0x47, 0x5d, 0xaa, 0xc1, 0x72, 0x17, 0x7d, 0x87, 0x0d,
  680. 0x5a, 0x67, 0x38, 0x90, 0x88, 0x50, 0xee, 0x52, 0x18, 0x7c, 0x81, 0x83, 0xa3, 0xae, 0xf6, 0x3f,
  681. 0xfc, 0x5d, 0x47, 0x21, 0xcf, 0xde, 0xc4, 0x77, 0x3d, 0xe4, 0x62, 0x92, 0x05, 0x5a, 0x1b, 0x56,
  682. 0x5f, 0xda, 0x5c, 0xc1, 0xf8, 0x14, 0x1c, 0xdd, 0x80, 0x9c, 0x6f, 0x5a, 0xd8, 0xba, 0xf6, 0x6b,
  683. 0xbe, 0xf9, 0x97, 0x0c, 0x1c, 0x4b, 0xcf, 0x4a, 0x00, 0x2a, 0x29, 0xd8, 0x19, 0x7a, 0x91, 0x16,
  684. 0x05, 0x3f, 0x91, 0x01, 0xad, 0x0f, 0x6b, 0x09, 0x0e, 0xee, 0x33, 0x8f, 0x23, 0x7d, 0x04, 0xf3,
  685. 0xd2, 0x29, 0x5e, 0x20, 0xe5, 0x4c, 0x65, 0x69, 0x6f, 0x6b, 0x86, 0x9b, 0xea, 0x1c, 0x61, 0x05,
  686. 0xdd, 0x86, 0x15, 0x0f, 0x3f, 0x88, 0x56, 0x82, 0x33, 0x74, 0x68, 0x59, 0x86, 0x1b, 0xd7, 0xbc,
  687. 0x5d, 0x58, 0x3b, 0x0c, 0xd0, 0x14, 0x98, 0x34, 0x61, 0x1d, 0x16, 0x7c, 0x33, 0x40, 0x4f, 0x44,
  688. 0xc7, 0x8b, 0x76, 0x74, 0x1f, 0xb2, 0xb2, 0xbb, 0xea, 0x94, 0x52, 0x8e, 0x2a, 0xd0, 0x6e, 0xc3,
  689. 0xda, 0x33, 0x74, 0x70, 0x94, 0x65, 0x82, 0x85, 0x7b, 0xbf, 0x16, 0x01, 0x8e, 0x55, 0x17, 0x35,
  690. 0x90, 0x57, 0x04, 0x72, 0xd7, 0xb6, 0x50, 0x63, 0x06, 0xe1, 0xcd, 0x4b, 0x2a, 0xde, 0x4b, 0x5f,
  691. 0x10, 0x3a, 0xae, 0x6d, 0x5d, 0xfc, 0xf8, 0x79, 0x35, 0x57, 0xa2, 0x1b, 0xf2, 0x0b, 0xfa, 0x24,
  692. 0x25, 0x3d, 0xf1, 0x03, 0xf6, 0x16, 0x3b, 0x82, 0x1b, 0xd5, 0x73, 0x23, 0xf4, 0xf6, 0x92, 0xc0,
  693. 0x62, 0x34, 0x36, 0xf4, 0xee, 0x0c, 0x8a, 0xd1, 0xf1, 0x2a, 0xa6, 0xf1, 0x4c, 0xdb, 0x56, 0x22,
  694. 0xca, 0x74, 0x73, 0x92, 0x88, 0x50, 0x83, 0x51, 0xad, 0x9e, 0xd3, 0xaf, 0x04, 0x60, 0x78, 0x79,
  695. 0x74, 0xd6, 0x69, 0xc7, 0xee, 0x39, 0x9d, 0x9a, 0x1d, 0xa5, 0xe6, 0x96, 0x56, 0x52, 0x6a, 0xc2,
  696. 0x49, 0x18, 0x37, 0xa5, 0xa6, 0x2e, 0x9a, 0x7e, 0x06, 0x18, 0x5e, 0xf4, 0x4c, 0x45, 0x63, 0x33,
  697. 0x51, 0x5c, 0x8f, 0x2b, 0xe2, 0x87, 0x4a, 0x7f, 0x2e, 0x1f, 0xaa, 0xd8, 0x92, 0xea, 0x2c, 0x4b,
  698. 0x2e, 0x09, 0xe4, 0x8f, 0x51, 0x1c, 0x99, 0x6e, 0x43, 0x3d, 0x7f, 0x54, 0x8b, 0x1b, 0xda, 0xa6,
  699. 0x2b, 0x29, 0x93, 0xc9, 0x98, 0xf4, 0x9f, 0x1b, 0x98, 0x30, 0xab, 0xd5, 0x14, 0xe7, 0x03, 0xcd,
  700. 0x50, 0x9c, 0x01, 0x86, 0xda, 0x27, 0xf2, 0xd6, 0x78, 0xa2, 0x6d, 0x8d, 0x54, 0xe9, 0x05, 0x81,
  701. 0x7c, 0x7d, 0x9a, 0x8e, 0x7a, 0x7a, 0x1d, 0xfb, 0x4a, 0xc7, 0x2e, 0x4d, 0xa3, 0xc3, 0x4a, 0x72,
  702. 0x7e, 0x27, 0x40, 0x4f, 0x90, 0xab, 0x08, 0x06, 0xae, 0xcd, 0xb9, 0xfc, 0x9b, 0xd0, 0xca, 0x0d,
  703. 0x9a, 0x71, 0x48, 0x2c, 0xe8, 0x4e, 0x0a, 0x64, 0xf4, 0xe1, 0x3c, 0x55, 0x22, 0x6b, 0xda, 0xc3,
  704. 0x14, 0x22, 0xc5, 0x58, 0x9b, 0x1a, 0xa9, 0x1e, 0x7c, 0x81, 0xff, 0x3a, 0xcc, 0x9d, 0x3e, 0x31,
  705. 0x07, 0x2b, 0xc3, 0xc7, 0xa1, 0x21, 0x27, 0xa4, 0x41, 0x5e, 0xd7, 0xa3, 0x0a, 0x8b, 0x39, 0xa6,
  706. 0x67, 0xe9, 0x2c, 0xb0, 0x0c, 0x0b, 0x3d, 0x35, 0x3f, 0x46, 0x98, 0x32, 0x7d, 0x9b, 0xff, 0xe1,
  707. 0x17, 0xfd, 0x78, 0xb8, 0x6b, 0x2f, 0xa8, 0x9a, 0xfb, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x31,
  708. 0x75, 0x14, 0x03, 0xd5, 0x07, 0x00, 0x00,
  709. }