Documentation ¶
Overview ¶
Package api contains CIPD backend API definitions.
Index ¶
- Variables
- func FileDescriptorSet() *descriptor.FileDescriptorSet
- func RegisterAdminServer(s prpc.Registrar, srv AdminServer)
- type AdminClient
- type AdminServer
- type DecoratedAdmin
- func (s *DecoratedAdmin) AbortJob(ctx context.Context, req *JobID) (rsp *empty.Empty, err error)
- func (s *DecoratedAdmin) FixMarkedTags(ctx context.Context, req *JobID) (rsp *TagFixReport, err error)
- func (s *DecoratedAdmin) GetJobState(ctx context.Context, req *JobID) (rsp *JobState, err error)
- func (s *DecoratedAdmin) LaunchJob(ctx context.Context, req *JobConfig) (rsp *JobID, err error)
- type JobConfig
- func (*JobConfig) Descriptor() ([]byte, []int)
- func (m *JobConfig) GetComment() string
- func (m *JobConfig) GetDryRun() bool
- func (m *JobConfig) GetKind() MapperKind
- func (*JobConfig) ProtoMessage()
- func (m *JobConfig) Reset()
- func (m *JobConfig) String() string
- func (m *JobConfig) XXX_DiscardUnknown()
- func (m *JobConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *JobConfig) XXX_Merge(src proto.Message)
- func (m *JobConfig) XXX_Size() int
- func (m *JobConfig) XXX_Unmarshal(b []byte) error
- type JobID
- func (*JobID) Descriptor() ([]byte, []int)
- func (m *JobID) GetJobId() int64
- func (*JobID) ProtoMessage()
- func (m *JobID) Reset()
- func (m *JobID) String() string
- func (m *JobID) XXX_DiscardUnknown()
- func (m *JobID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *JobID) XXX_Merge(src proto.Message)
- func (m *JobID) XXX_Size() int
- func (m *JobID) XXX_Unmarshal(b []byte) error
- type JobState
- func (*JobState) Descriptor() ([]byte, []int)
- func (m *JobState) GetConfig() *JobConfig
- func (m *JobState) GetInfo() *mapper.JobInfo
- func (*JobState) ProtoMessage()
- func (m *JobState) Reset()
- func (m *JobState) String() string
- func (m *JobState) XXX_DiscardUnknown()
- func (m *JobState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *JobState) XXX_Merge(src proto.Message)
- func (m *JobState) XXX_Size() int
- func (m *JobState) XXX_Unmarshal(b []byte) error
- type MapperKind
- type TagFixReport
- func (*TagFixReport) Descriptor() ([]byte, []int)
- func (m *TagFixReport) GetFixed() []*TagFixReport_Tag
- func (*TagFixReport) ProtoMessage()
- func (m *TagFixReport) Reset()
- func (m *TagFixReport) String() string
- func (m *TagFixReport) XXX_DiscardUnknown()
- func (m *TagFixReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TagFixReport) XXX_Merge(src proto.Message)
- func (m *TagFixReport) XXX_Size() int
- func (m *TagFixReport) XXX_Unmarshal(b []byte) error
- type TagFixReport_Tag
- func (*TagFixReport_Tag) Descriptor() ([]byte, []int)
- func (m *TagFixReport_Tag) GetBrokenTag() string
- func (m *TagFixReport_Tag) GetFixedTag() string
- func (m *TagFixReport_Tag) GetInstance() string
- func (m *TagFixReport_Tag) GetPkg() string
- func (*TagFixReport_Tag) ProtoMessage()
- func (m *TagFixReport_Tag) Reset()
- func (m *TagFixReport_Tag) String() string
- func (m *TagFixReport_Tag) XXX_DiscardUnknown()
- func (m *TagFixReport_Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *TagFixReport_Tag) XXX_Merge(src proto.Message)
- func (m *TagFixReport_Tag) XXX_Size() int
- func (m *TagFixReport_Tag) XXX_Unmarshal(b []byte) error
- type UnimplementedAdminServer
- func (*UnimplementedAdminServer) AbortJob(ctx context.Context, req *JobID) (*empty.Empty, error)
- func (*UnimplementedAdminServer) FixMarkedTags(ctx context.Context, req *JobID) (*TagFixReport, error)
- func (*UnimplementedAdminServer) GetJobState(ctx context.Context, req *JobID) (*JobState, error)
- func (*UnimplementedAdminServer) LaunchJob(ctx context.Context, req *JobConfig) (*JobID, error)
Constants ¶
This section is empty.
Variables ¶
var MapperKind_name = map[int32]string{
0: "MAPPER_KIND_UNSPECIFIED",
1: "ENUMERATE_PACKAGES",
2: "FIND_MALFORMED_TAGS",
3: "EXPORT_TAGS_TO_BQ",
}
var MapperKind_value = map[string]int32{
"MAPPER_KIND_UNSPECIFIED": 0,
"ENUMERATE_PACKAGES": 1,
"FIND_MALFORMED_TAGS": 2,
"EXPORT_TAGS_TO_BQ": 3,
}
Functions ¶
func FileDescriptorSet ¶
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 RegisterAdminServer ¶
func RegisterAdminServer(s prpc.Registrar, srv AdminServer)
Types ¶
type AdminClient ¶
type AdminClient interface { // Launches a mapping job that examines and/or fixes datastore entities. LaunchJob(ctx context.Context, in *JobConfig, opts ...grpc.CallOption) (*JobID, error) // Initiates an abort of a mapping job. AbortJob(ctx context.Context, in *JobID, opts ...grpc.CallOption) (*empty.Empty, error) // Returns state of a mapping job. GetJobState(ctx context.Context, in *JobID, opts ...grpc.CallOption) (*JobState, error) // Fixes (right inside the handler) tags marked by the given mapper job. FixMarkedTags(ctx context.Context, in *JobID, opts ...grpc.CallOption) (*TagFixReport, error) }
AdminClient is the client API for Admin service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAdminClient ¶
func NewAdminClient(cc *grpc.ClientConn) AdminClient
func NewAdminPRPCClient ¶
func NewAdminPRPCClient(client *prpc.Client) AdminClient
type AdminServer ¶
type AdminServer interface { // Launches a mapping job that examines and/or fixes datastore entities. LaunchJob(context.Context, *JobConfig) (*JobID, error) // Initiates an abort of a mapping job. AbortJob(context.Context, *JobID) (*empty.Empty, error) // Returns state of a mapping job. GetJobState(context.Context, *JobID) (*JobState, error) // Fixes (right inside the handler) tags marked by the given mapper job. FixMarkedTags(context.Context, *JobID) (*TagFixReport, error) }
AdminServer is the server API for Admin service.
type DecoratedAdmin ¶
type DecoratedAdmin struct { // Service is the service to decorate. Service AdminServer // 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 (*DecoratedAdmin) FixMarkedTags ¶
func (s *DecoratedAdmin) FixMarkedTags(ctx context.Context, req *JobID) (rsp *TagFixReport, err error)
func (*DecoratedAdmin) GetJobState ¶
type JobConfig ¶
type JobConfig struct { Kind MapperKind `protobuf:"varint,1,opt,name=kind,proto3,enum=cipd.MapperKind" json:"kind,omitempty"` Comment string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"` DryRun bool `protobuf:"varint,3,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Defines what a mapping job should do.
func (*JobConfig) Descriptor ¶
func (*JobConfig) GetComment ¶
func (*JobConfig) GetKind ¶
func (m *JobConfig) GetKind() MapperKind
func (*JobConfig) ProtoMessage ¶
func (*JobConfig) ProtoMessage()
func (*JobConfig) XXX_DiscardUnknown ¶
func (m *JobConfig) XXX_DiscardUnknown()
func (*JobConfig) XXX_Marshal ¶
func (*JobConfig) XXX_Unmarshal ¶
type JobID ¶
type JobID struct { JobId int64 `protobuf:"varint,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Identifies an instance of a mapping job.
func (*JobID) Descriptor ¶
func (*JobID) ProtoMessage ¶
func (*JobID) ProtoMessage()
func (*JobID) XXX_DiscardUnknown ¶
func (m *JobID) XXX_DiscardUnknown()
func (*JobID) XXX_Marshal ¶
func (*JobID) XXX_Unmarshal ¶
type JobState ¶
type JobState struct { // Original job config, exactly as it was submitted to LaunchJob. Config *JobConfig `protobuf:"bytes,1,opt,name=config,proto3" json:"config,omitempty"` // Current state of the job and all its shards. Info *mapper.JobInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Details about a mapping job.
func (*JobState) Descriptor ¶
func (*JobState) ProtoMessage ¶
func (*JobState) ProtoMessage()
func (*JobState) XXX_DiscardUnknown ¶
func (m *JobState) XXX_DiscardUnknown()
func (*JobState) XXX_Marshal ¶
func (*JobState) XXX_Unmarshal ¶
type MapperKind ¶
type MapperKind int32
Supported mapping jobs.
const ( MapperKind_MAPPER_KIND_UNSPECIFIED MapperKind = 0 // Dump names of all packages to GAE logs, to test mapping jobs framework. MapperKind_ENUMERATE_PACKAGES MapperKind = 1 // Find tags that don't pass ValidateInstanceTag and marks them. MapperKind_FIND_MALFORMED_TAGS MapperKind = 2 // Exports all tags into a BigQuery table 'exported_tags'. MapperKind_EXPORT_TAGS_TO_BQ MapperKind = 3 )
func (MapperKind) EnumDescriptor ¶
func (MapperKind) EnumDescriptor() ([]byte, []int)
func (MapperKind) String ¶
func (x MapperKind) String() string
type TagFixReport ¶
type TagFixReport struct { Fixed []*TagFixReport_Tag `protobuf:"bytes,1,rep,name=fixed,proto3" json:"fixed,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
Result of running FixMarkedTags.
func (*TagFixReport) Descriptor ¶
func (*TagFixReport) Descriptor() ([]byte, []int)
func (*TagFixReport) GetFixed ¶
func (m *TagFixReport) GetFixed() []*TagFixReport_Tag
func (*TagFixReport) ProtoMessage ¶
func (*TagFixReport) ProtoMessage()
func (*TagFixReport) Reset ¶
func (m *TagFixReport) Reset()
func (*TagFixReport) String ¶
func (m *TagFixReport) String() string
func (*TagFixReport) XXX_DiscardUnknown ¶
func (m *TagFixReport) XXX_DiscardUnknown()
func (*TagFixReport) XXX_Marshal ¶
func (m *TagFixReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TagFixReport) XXX_Merge ¶
func (m *TagFixReport) XXX_Merge(src proto.Message)
func (*TagFixReport) XXX_Size ¶
func (m *TagFixReport) XXX_Size() int
func (*TagFixReport) XXX_Unmarshal ¶
func (m *TagFixReport) XXX_Unmarshal(b []byte) error
type TagFixReport_Tag ¶
type TagFixReport_Tag struct { Pkg string `protobuf:"bytes,1,opt,name=pkg,proto3" json:"pkg,omitempty"` Instance string `protobuf:"bytes,2,opt,name=instance,proto3" json:"instance,omitempty"` BrokenTag string `protobuf:"bytes,3,opt,name=broken_tag,json=brokenTag,proto3" json:"broken_tag,omitempty"` FixedTag string `protobuf:"bytes,4,opt,name=fixed_tag,json=fixedTag,proto3" json:"fixed_tag,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*TagFixReport_Tag) Descriptor ¶
func (*TagFixReport_Tag) Descriptor() ([]byte, []int)
func (*TagFixReport_Tag) GetBrokenTag ¶
func (m *TagFixReport_Tag) GetBrokenTag() string
func (*TagFixReport_Tag) GetFixedTag ¶
func (m *TagFixReport_Tag) GetFixedTag() string
func (*TagFixReport_Tag) GetInstance ¶
func (m *TagFixReport_Tag) GetInstance() string
func (*TagFixReport_Tag) GetPkg ¶
func (m *TagFixReport_Tag) GetPkg() string
func (*TagFixReport_Tag) ProtoMessage ¶
func (*TagFixReport_Tag) ProtoMessage()
func (*TagFixReport_Tag) Reset ¶
func (m *TagFixReport_Tag) Reset()
func (*TagFixReport_Tag) String ¶
func (m *TagFixReport_Tag) String() string
func (*TagFixReport_Tag) XXX_DiscardUnknown ¶
func (m *TagFixReport_Tag) XXX_DiscardUnknown()
func (*TagFixReport_Tag) XXX_Marshal ¶
func (m *TagFixReport_Tag) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*TagFixReport_Tag) XXX_Merge ¶
func (m *TagFixReport_Tag) XXX_Merge(src proto.Message)
func (*TagFixReport_Tag) XXX_Size ¶
func (m *TagFixReport_Tag) XXX_Size() int
func (*TagFixReport_Tag) XXX_Unmarshal ¶
func (m *TagFixReport_Tag) XXX_Unmarshal(b []byte) error
type UnimplementedAdminServer ¶
type UnimplementedAdminServer struct { }
UnimplementedAdminServer can be embedded to have forward compatible implementations.
func (*UnimplementedAdminServer) FixMarkedTags ¶
func (*UnimplementedAdminServer) FixMarkedTags(ctx context.Context, req *JobID) (*TagFixReport, error)