Documentation
¶
Overview ¶
Package api contains CIPD backend API definitions.
Index ¶
- Variables
- func FileDescriptorSet() *descriptorpb.FileDescriptorSet
- func RegisterAdminServer(s grpc.ServiceRegistrar, srv AdminServer)
- type AdminClient
- type AdminServer
- type JobConfig
- func (*JobConfig) Descriptor() ([]byte, []int)deprecated
- func (x *JobConfig) GetComment() string
- func (x *JobConfig) GetDryRun() bool
- func (x *JobConfig) GetKind() MapperKind
- func (*JobConfig) ProtoMessage()
- func (x *JobConfig) ProtoReflect() protoreflect.Message
- func (x *JobConfig) Reset()
- func (x *JobConfig) String() string
- type JobID
- type JobState
- type MapperKind
- type TagFixReport
- type TagFixReport_Tag
- func (*TagFixReport_Tag) Descriptor() ([]byte, []int)deprecated
- func (x *TagFixReport_Tag) GetBrokenTag() string
- func (x *TagFixReport_Tag) GetFixedTag() string
- func (x *TagFixReport_Tag) GetInstance() string
- func (x *TagFixReport_Tag) GetPkg() string
- func (*TagFixReport_Tag) ProtoMessage()
- func (x *TagFixReport_Tag) ProtoReflect() protoreflect.Message
- func (x *TagFixReport_Tag) Reset()
- func (x *TagFixReport_Tag) String() string
- type UnimplementedAdminServer
- func (UnimplementedAdminServer) AbortJob(context.Context, *JobID) (*emptypb.Empty, error)
- func (UnimplementedAdminServer) FixMarkedTags(context.Context, *JobID) (*TagFixReport, error)
- func (UnimplementedAdminServer) GetJobState(context.Context, *JobID) (*JobState, error)
- func (UnimplementedAdminServer) LaunchJob(context.Context, *JobConfig) (*JobID, error)
- type UnsafeAdminServer
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", } MapperKind_value = map[string]int32{ "MAPPER_KIND_UNSPECIFIED": 0, "ENUMERATE_PACKAGES": 1, "FIND_MALFORMED_TAGS": 2, "EXPORT_TAGS_TO_BQ": 3, } )
Enum value maps for MapperKind.
var Admin_ServiceDesc = grpc.ServiceDesc{ ServiceName: "cipd.Admin", HandlerType: (*AdminServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "LaunchJob", Handler: _Admin_LaunchJob_Handler, }, { MethodName: "AbortJob", Handler: _Admin_AbortJob_Handler, }, { MethodName: "GetJobState", Handler: _Admin_GetJobState_Handler, }, { MethodName: "FixMarkedTags", Handler: _Admin_FixMarkedTags_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "go.chromium.org/luci/cipd/api/admin/v1/admin.proto", }
Admin_ServiceDesc is the grpc.ServiceDesc for Admin service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_go_chromium_org_luci_cipd_api_admin_v1_admin_proto protoreflect.FileDescriptor
Functions ¶
func FileDescriptorSet ¶
func FileDescriptorSet() *descriptorpb.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 grpc.ServiceRegistrar, 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) (*emptypb.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://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewAdminClient ¶
func NewAdminClient(cc grpc.ClientConnInterface) 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) (*emptypb.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) // contains filtered or unexported methods }
AdminServer is the server API for Admin service. All implementations must embed UnimplementedAdminServer for forward compatibility
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"` // arbitrary human readable string DryRun bool `protobuf:"varint,3,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` // contains filtered or unexported fields }
Defines what a mapping job should do.
func (*JobConfig) Descriptor
deprecated
func (*JobConfig) GetComment ¶
func (*JobConfig) GetKind ¶
func (x *JobConfig) GetKind() MapperKind
func (*JobConfig) ProtoMessage ¶
func (*JobConfig) ProtoMessage()
func (*JobConfig) ProtoReflect ¶
func (x *JobConfig) ProtoReflect() protoreflect.Message
type JobID ¶
type JobID struct { JobId int64 `protobuf:"varint,1,opt,name=job_id,json=jobId,proto3" json:"job_id,omitempty"` // contains filtered or unexported fields }
Identifies an instance of a mapping job.
func (*JobID) Descriptor
deprecated
func (*JobID) ProtoMessage ¶
func (*JobID) ProtoMessage()
func (*JobID) ProtoReflect ¶
func (x *JobID) ProtoReflect() protoreflect.Message
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 *dsmapperpb.JobInfo `protobuf:"bytes,2,opt,name=info,proto3" json:"info,omitempty"` // contains filtered or unexported fields }
Details about a mapping job.
func (*JobState) Descriptor
deprecated
func (*JobState) GetInfo ¶
func (x *JobState) GetInfo() *dsmapperpb.JobInfo
func (*JobState) ProtoMessage ¶
func (*JobState) ProtoMessage()
func (*JobState) ProtoReflect ¶
func (x *JobState) ProtoReflect() protoreflect.Message
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) Descriptor ¶
func (MapperKind) Descriptor() protoreflect.EnumDescriptor
func (MapperKind) Enum ¶
func (x MapperKind) Enum() *MapperKind
func (MapperKind) EnumDescriptor
deprecated
func (MapperKind) EnumDescriptor() ([]byte, []int)
Deprecated: Use MapperKind.Descriptor instead.
func (MapperKind) Number ¶
func (x MapperKind) Number() protoreflect.EnumNumber
func (MapperKind) String ¶
func (x MapperKind) String() string
func (MapperKind) Type ¶
func (MapperKind) Type() protoreflect.EnumType
type TagFixReport ¶
type TagFixReport struct { Fixed []*TagFixReport_Tag `protobuf:"bytes,1,rep,name=fixed,proto3" json:"fixed,omitempty"` // contains filtered or unexported fields }
Result of running FixMarkedTags.
func (*TagFixReport) Descriptor
deprecated
func (*TagFixReport) Descriptor() ([]byte, []int)
Deprecated: Use TagFixReport.ProtoReflect.Descriptor instead.
func (*TagFixReport) GetFixed ¶
func (x *TagFixReport) GetFixed() []*TagFixReport_Tag
func (*TagFixReport) ProtoMessage ¶
func (*TagFixReport) ProtoMessage()
func (*TagFixReport) ProtoReflect ¶
func (x *TagFixReport) ProtoReflect() protoreflect.Message
func (*TagFixReport) Reset ¶
func (x *TagFixReport) Reset()
func (*TagFixReport) String ¶
func (x *TagFixReport) String() string
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"` // or "" if it was deleted // contains filtered or unexported fields }
func (*TagFixReport_Tag) Descriptor
deprecated
func (*TagFixReport_Tag) Descriptor() ([]byte, []int)
Deprecated: Use TagFixReport_Tag.ProtoReflect.Descriptor instead.
func (*TagFixReport_Tag) GetBrokenTag ¶
func (x *TagFixReport_Tag) GetBrokenTag() string
func (*TagFixReport_Tag) GetFixedTag ¶
func (x *TagFixReport_Tag) GetFixedTag() string
func (*TagFixReport_Tag) GetInstance ¶
func (x *TagFixReport_Tag) GetInstance() string
func (*TagFixReport_Tag) GetPkg ¶
func (x *TagFixReport_Tag) GetPkg() string
func (*TagFixReport_Tag) ProtoMessage ¶
func (*TagFixReport_Tag) ProtoMessage()
func (*TagFixReport_Tag) ProtoReflect ¶
func (x *TagFixReport_Tag) ProtoReflect() protoreflect.Message
func (*TagFixReport_Tag) Reset ¶
func (x *TagFixReport_Tag) Reset()
func (*TagFixReport_Tag) String ¶
func (x *TagFixReport_Tag) String() string
type UnimplementedAdminServer ¶
type UnimplementedAdminServer struct { }
UnimplementedAdminServer must be embedded to have forward compatible implementations.
func (UnimplementedAdminServer) FixMarkedTags ¶
func (UnimplementedAdminServer) FixMarkedTags(context.Context, *JobID) (*TagFixReport, error)
func (UnimplementedAdminServer) GetJobState ¶
type UnsafeAdminServer ¶
type UnsafeAdminServer interface {
// contains filtered or unexported methods
}
UnsafeAdminServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AdminServer will result in compilation errors.