import "go.chromium.org/luci/gce/api/projects/v1"
Package projects contains GCP project config definitions.
config.go config.pb.go configs.go doc.go generate.go pb.discovery.go projectsserver_dec.go service.pb.go
func FileDescriptorSet() *descriptor.FileDescriptorSet
FileDescriptorSet returns a descriptor set for this proto package, which includes all defined services, and all transitive dependencies.
Will not return nil.
Do NOT modify the returned descriptor.
func RegisterProjectsServer(s prpc.Registrar, srv ProjectsServer)
type Config struct { // The names of GCE quota metrics to report. // https://cloud.google.com/compute/docs/reference/rest/v1/regions/list. Metric []string `protobuf:"bytes,1,rep,name=metric,proto3" json:"metric,omitempty"` // The name of a GCP project to report GCE quota utilization for. Project string `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"` // The names of GCE regions to report. // https://cloud.google.com/compute/docs/reference/rest/v1/regions/list. Region []string `protobuf:"bytes,3,rep,name=region,proto3" json:"region,omitempty"` // Should only be set by the server. The revision of this config. Revision string `protobuf:"bytes,4,opt,name=revision,proto3" json:"revision,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A config for a GCP project to report GCE quota utilization for.
FromProperty implements datastore.PropertyConverter.
ToProperty implements datastore.PropertyConverter.
func (cfg *Config) Validate(c *validation.Context)
Validate validates this config.
type Configs struct { // The projects to report GCE quota utilization for. Project []*Config `protobuf:"bytes,1,rep,name=project,proto3" json:"project,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A config for several projects to report GCE quota utilization for.
func (cfgs *Configs) Validate(c *validation.Context)
Validate validates these configs.
type DecoratedProjects struct { // Service is the service to decorate. Service ProjectsServer // Prelude is called for each method before forwarding the call to Service. // If Prelude returns an error, then the call is skipped and the error is // processed via the Postlude (if one is defined), or it is returned directly. Prelude func(ctx context.Context, methodName string, req proto.Message) (context.Context, error) // Postlude is called for each method after Service has processed the call, or // after the Prelude has returned an error. This takes the the Service's // response proto (which may be nil) and/or any error. The decorated // service will return the response (possibly mutated) and error that Postlude // returns. Postlude func(ctx context.Context, methodName string, rsp proto.Message, err error) error }
func (s *DecoratedProjects) Delete(ctx context.Context, req *DeleteRequest) (rsp *empty.Empty, err error)
func (s *DecoratedProjects) Ensure(ctx context.Context, req *EnsureRequest) (rsp *Config, err error)
func (s *DecoratedProjects) Get(ctx context.Context, req *GetRequest) (rsp *Config, err error)
func (s *DecoratedProjects) List(ctx context.Context, req *ListRequest) (rsp *ListResponse, err error)
type DeleteRequest struct { // The id of the project to delete. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A request to delete a project.
func (*DeleteRequest) Descriptor() ([]byte, []int)
func (m *DeleteRequest) GetId() string
func (*DeleteRequest) ProtoMessage()
func (m *DeleteRequest) Reset()
func (m *DeleteRequest) String() string
func (m *DeleteRequest) XXX_DiscardUnknown()
func (m *DeleteRequest) XXX_Merge(src proto.Message)
func (m *DeleteRequest) XXX_Size() int
func (m *DeleteRequest) XXX_Unmarshal(b []byte) error
type EnsureRequest struct { // The id of the project to ensure. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The project. Project *Config `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A request to create or update a project.
func (*EnsureRequest) Descriptor() ([]byte, []int)
func (m *EnsureRequest) GetId() string
func (m *EnsureRequest) GetProject() *Config
func (*EnsureRequest) ProtoMessage()
func (m *EnsureRequest) Reset()
func (m *EnsureRequest) String() string
func (m *EnsureRequest) XXX_DiscardUnknown()
func (m *EnsureRequest) XXX_Merge(src proto.Message)
func (m *EnsureRequest) XXX_Size() int
func (m *EnsureRequest) XXX_Unmarshal(b []byte) error
type GetRequest struct { // The id of the project to get. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A request to get an existing project.
func (*GetRequest) Descriptor() ([]byte, []int)
func (m *GetRequest) GetId() string
func (*GetRequest) ProtoMessage()
func (m *GetRequest) Reset()
func (m *GetRequest) String() string
func (m *GetRequest) XXX_DiscardUnknown()
func (m *GetRequest) XXX_Merge(src proto.Message)
func (m *GetRequest) XXX_Size() int
func (m *GetRequest) XXX_Unmarshal(b []byte) error
type ListRequest struct { // The value of next_page_token received in a ListResponse. Used to get the // next page of projects. If empty, gets the first page. PageToken string `protobuf:"bytes,1,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` // The maximum number of results to include in the response. PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A request to list existing projects.
func (*ListRequest) Descriptor() ([]byte, []int)
func (m *ListRequest) GetPageSize() int32
func (m *ListRequest) GetPageToken() string
func (*ListRequest) ProtoMessage()
func (m *ListRequest) Reset()
func (m *ListRequest) String() string
func (m *ListRequest) XXX_DiscardUnknown()
func (m *ListRequest) XXX_Merge(src proto.Message)
func (m *ListRequest) XXX_Size() int
func (m *ListRequest) XXX_Unmarshal(b []byte) error
type ListResponse struct { // The projects. Projects []*Config `protobuf:"bytes,1,rep,name=projects,proto3" json:"projects,omitempty"` // The value to use as the page_token in a ListRequest to get the next page of // projects. If empty, there are no more projects. NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
A response to a request to list projects.
func (*ListResponse) Descriptor() ([]byte, []int)
func (m *ListResponse) GetNextPageToken() string
func (m *ListResponse) GetProjects() []*Config
func (*ListResponse) ProtoMessage()
func (m *ListResponse) Reset()
func (m *ListResponse) String() string
func (m *ListResponse) XXX_DiscardUnknown()
func (m *ListResponse) XXX_Merge(src proto.Message)
func (m *ListResponse) XXX_Size() int
func (m *ListResponse) XXX_Unmarshal(b []byte) error
type ProjectsClient interface { // Delete deletes a project. // Internal API. Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*empty.Empty, error) // Ensure ensures a project exists. // Creates a new project or updates an existing one as necessary. // Internal API. Ensure(ctx context.Context, in *EnsureRequest, opts ...grpc.CallOption) (*Config, error) // Get returns an existing project. Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Config, error) // List returns existing projects. List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error) }
ProjectsClient is the client API for Projects service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewProjectsClient(cc *grpc.ClientConn) ProjectsClient
func NewProjectsPRPCClient(client *prpc.Client) ProjectsClient
type ProjectsServer interface { // Delete deletes a project. // Internal API. Delete(context.Context, *DeleteRequest) (*empty.Empty, error) // Ensure ensures a project exists. // Creates a new project or updates an existing one as necessary. // Internal API. Ensure(context.Context, *EnsureRequest) (*Config, error) // Get returns an existing project. Get(context.Context, *GetRequest) (*Config, error) // List returns existing projects. List(context.Context, *ListRequest) (*ListResponse, error) }
ProjectsServer is the server API for Projects service.
type UnimplementedProjectsServer struct { }
UnimplementedProjectsServer can be embedded to have forward compatible implementations.
func (*UnimplementedProjectsServer) Delete(ctx context.Context, req *DeleteRequest) (*empty.Empty, error)
func (*UnimplementedProjectsServer) Ensure(ctx context.Context, req *EnsureRequest) (*Config, error)
func (*UnimplementedProjectsServer) Get(ctx context.Context, req *GetRequest) (*Config, error)
func (*UnimplementedProjectsServer) List(ctx context.Context, req *ListRequest) (*ListResponse, error)
Package projects imports 15 packages (graph) and is imported by 5 packages. Updated 2019-12-09. Refresh now. Tools for package owners.