luci: go.chromium.org/luci/gce/api/projects/v1 Index | Files

package projects

import "go.chromium.org/luci/gce/api/projects/v1"

Package projects contains GCP project config definitions.

Index

Package Files

config.go config.pb.go configs.go doc.go generate.go pb.discovery.go projectsserver_dec.go service.pb.go

func FileDescriptorSet Uses

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 Uses

func RegisterProjectsServer(s prpc.Registrar, srv ProjectsServer)

type Config Uses

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.

func (*Config) Descriptor Uses

func (*Config) Descriptor() ([]byte, []int)

func (*Config) FromProperty Uses

func (cfg *Config) FromProperty(p datastore.Property) error

FromProperty implements datastore.PropertyConverter.

func (*Config) GetMetric Uses

func (m *Config) GetMetric() []string

func (*Config) GetProject Uses

func (m *Config) GetProject() string

func (*Config) GetRegion Uses

func (m *Config) GetRegion() []string

func (*Config) GetRevision Uses

func (m *Config) GetRevision() string

func (*Config) ProtoMessage Uses

func (*Config) ProtoMessage()

func (*Config) Reset Uses

func (m *Config) Reset()

func (*Config) String Uses

func (m *Config) String() string

func (*Config) ToProperty Uses

func (cfg *Config) ToProperty() (datastore.Property, error)

ToProperty implements datastore.PropertyConverter.

func (*Config) Validate Uses

func (cfg *Config) Validate(c *validation.Context)

Validate validates this config.

func (*Config) XXX_DiscardUnknown Uses

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal Uses

func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge Uses

func (m *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_Size Uses

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal Uses

func (m *Config) XXX_Unmarshal(b []byte) error

type Configs Uses

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 (*Configs) Descriptor Uses

func (*Configs) Descriptor() ([]byte, []int)

func (*Configs) GetProject Uses

func (m *Configs) GetProject() []*Config

func (*Configs) ProtoMessage Uses

func (*Configs) ProtoMessage()

func (*Configs) Reset Uses

func (m *Configs) Reset()

func (*Configs) String Uses

func (m *Configs) String() string

func (*Configs) Validate Uses

func (cfgs *Configs) Validate(c *validation.Context)

Validate validates these configs.

func (*Configs) XXX_DiscardUnknown Uses

func (m *Configs) XXX_DiscardUnknown()

func (*Configs) XXX_Marshal Uses

func (m *Configs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Configs) XXX_Merge Uses

func (m *Configs) XXX_Merge(src proto.Message)

func (*Configs) XXX_Size Uses

func (m *Configs) XXX_Size() int

func (*Configs) XXX_Unmarshal Uses

func (m *Configs) XXX_Unmarshal(b []byte) error

type DecoratedProjects Uses

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(c 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(c context.Context, methodName string, rsp proto.Message, err error) error
}

func (*DecoratedProjects) Delete Uses

func (s *DecoratedProjects) Delete(c context.Context, req *DeleteRequest) (rsp *empty.Empty, err error)

func (*DecoratedProjects) Ensure Uses

func (s *DecoratedProjects) Ensure(c context.Context, req *EnsureRequest) (rsp *Config, err error)

func (*DecoratedProjects) Get Uses

func (s *DecoratedProjects) Get(c context.Context, req *GetRequest) (rsp *Config, err error)

func (*DecoratedProjects) List Uses

func (s *DecoratedProjects) List(c context.Context, req *ListRequest) (rsp *ListResponse, err error)

type DeleteRequest Uses

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 Uses

func (*DeleteRequest) Descriptor() ([]byte, []int)

func (*DeleteRequest) GetId Uses

func (m *DeleteRequest) GetId() string

func (*DeleteRequest) ProtoMessage Uses

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) Reset Uses

func (m *DeleteRequest) Reset()

func (*DeleteRequest) String Uses

func (m *DeleteRequest) String() string

func (*DeleteRequest) XXX_DiscardUnknown Uses

func (m *DeleteRequest) XXX_DiscardUnknown()

func (*DeleteRequest) XXX_Marshal Uses

func (m *DeleteRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DeleteRequest) XXX_Merge Uses

func (m *DeleteRequest) XXX_Merge(src proto.Message)

func (*DeleteRequest) XXX_Size Uses

func (m *DeleteRequest) XXX_Size() int

func (*DeleteRequest) XXX_Unmarshal Uses

func (m *DeleteRequest) XXX_Unmarshal(b []byte) error

type EnsureRequest Uses

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 Uses

func (*EnsureRequest) Descriptor() ([]byte, []int)

func (*EnsureRequest) GetId Uses

func (m *EnsureRequest) GetId() string

func (*EnsureRequest) GetProject Uses

func (m *EnsureRequest) GetProject() *Config

func (*EnsureRequest) ProtoMessage Uses

func (*EnsureRequest) ProtoMessage()

func (*EnsureRequest) Reset Uses

func (m *EnsureRequest) Reset()

func (*EnsureRequest) String Uses

func (m *EnsureRequest) String() string

func (*EnsureRequest) XXX_DiscardUnknown Uses

func (m *EnsureRequest) XXX_DiscardUnknown()

func (*EnsureRequest) XXX_Marshal Uses

func (m *EnsureRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*EnsureRequest) XXX_Merge Uses

func (m *EnsureRequest) XXX_Merge(src proto.Message)

func (*EnsureRequest) XXX_Size Uses

func (m *EnsureRequest) XXX_Size() int

func (*EnsureRequest) XXX_Unmarshal Uses

func (m *EnsureRequest) XXX_Unmarshal(b []byte) error

type GetRequest Uses

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 Uses

func (*GetRequest) Descriptor() ([]byte, []int)

func (*GetRequest) GetId Uses

func (m *GetRequest) GetId() string

func (*GetRequest) ProtoMessage Uses

func (*GetRequest) ProtoMessage()

func (*GetRequest) Reset Uses

func (m *GetRequest) Reset()

func (*GetRequest) String Uses

func (m *GetRequest) String() string

func (*GetRequest) XXX_DiscardUnknown Uses

func (m *GetRequest) XXX_DiscardUnknown()

func (*GetRequest) XXX_Marshal Uses

func (m *GetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*GetRequest) XXX_Merge Uses

func (m *GetRequest) XXX_Merge(src proto.Message)

func (*GetRequest) XXX_Size Uses

func (m *GetRequest) XXX_Size() int

func (*GetRequest) XXX_Unmarshal Uses

func (m *GetRequest) XXX_Unmarshal(b []byte) error

type ListRequest Uses

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 Uses

func (*ListRequest) Descriptor() ([]byte, []int)

func (*ListRequest) GetPageSize Uses

func (m *ListRequest) GetPageSize() int32

func (*ListRequest) GetPageToken Uses

func (m *ListRequest) GetPageToken() string

func (*ListRequest) ProtoMessage Uses

func (*ListRequest) ProtoMessage()

func (*ListRequest) Reset Uses

func (m *ListRequest) Reset()

func (*ListRequest) String Uses

func (m *ListRequest) String() string

func (*ListRequest) XXX_DiscardUnknown Uses

func (m *ListRequest) XXX_DiscardUnknown()

func (*ListRequest) XXX_Marshal Uses

func (m *ListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListRequest) XXX_Merge Uses

func (m *ListRequest) XXX_Merge(src proto.Message)

func (*ListRequest) XXX_Size Uses

func (m *ListRequest) XXX_Size() int

func (*ListRequest) XXX_Unmarshal Uses

func (m *ListRequest) XXX_Unmarshal(b []byte) error

type ListResponse Uses

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 Uses

func (*ListResponse) Descriptor() ([]byte, []int)

func (*ListResponse) GetNextPageToken Uses

func (m *ListResponse) GetNextPageToken() string

func (*ListResponse) GetProjects Uses

func (m *ListResponse) GetProjects() []*Config

func (*ListResponse) ProtoMessage Uses

func (*ListResponse) ProtoMessage()

func (*ListResponse) Reset Uses

func (m *ListResponse) Reset()

func (*ListResponse) String Uses

func (m *ListResponse) String() string

func (*ListResponse) XXX_DiscardUnknown Uses

func (m *ListResponse) XXX_DiscardUnknown()

func (*ListResponse) XXX_Marshal Uses

func (m *ListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ListResponse) XXX_Merge Uses

func (m *ListResponse) XXX_Merge(src proto.Message)

func (*ListResponse) XXX_Size Uses

func (m *ListResponse) XXX_Size() int

func (*ListResponse) XXX_Unmarshal Uses

func (m *ListResponse) XXX_Unmarshal(b []byte) error

type ProjectsClient Uses

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 Uses

func NewProjectsClient(cc *grpc.ClientConn) ProjectsClient

func NewProjectsPRPCClient Uses

func NewProjectsPRPCClient(client *prpc.Client) ProjectsClient

type ProjectsServer Uses

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 Uses

type UnimplementedProjectsServer struct {
}

UnimplementedProjectsServer can be embedded to have forward compatible implementations.

func (*UnimplementedProjectsServer) Delete Uses

func (*UnimplementedProjectsServer) Delete(ctx context.Context, req *DeleteRequest) (*empty.Empty, error)

func (*UnimplementedProjectsServer) Ensure Uses

func (*UnimplementedProjectsServer) Ensure(ctx context.Context, req *EnsureRequest) (*Config, error)

func (*UnimplementedProjectsServer) Get Uses

func (*UnimplementedProjectsServer) Get(ctx context.Context, req *GetRequest) (*Config, error)

func (*UnimplementedProjectsServer) List Uses

func (*UnimplementedProjectsServer) List(ctx context.Context, req *ListRequest) (*ListResponse, error)

Package projects imports 14 packages (graph) and is imported by 7 packages. Updated 2019-07-20. Refresh now. Tools for package owners.