luci: go.chromium.org/luci/cipd/api/admin/v1 Index | Files

package api

import "go.chromium.org/luci/cipd/api/admin/v1"

Package api contains CIPD backend API definitions.

Index

Package Files

admin.pb.go adminserver_dec.go gen.go pb.discovery.go

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 File_go_chromium_org_luci_cipd_api_admin_v1_admin_proto protoreflect.FileDescriptor

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 RegisterAdminServer Uses

func RegisterAdminServer(s prpc.Registrar, srv AdminServer)

type AdminClient Uses

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 Uses

func NewAdminClient(cc grpc.ClientConnInterface) AdminClient

func NewAdminPRPCClient Uses

func NewAdminPRPCClient(client *prpc.Client) AdminClient

type AdminServer Uses

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 Uses

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) AbortJob Uses

func (s *DecoratedAdmin) AbortJob(ctx context.Context, req *JobID) (rsp *empty.Empty, err error)

func (*DecoratedAdmin) FixMarkedTags Uses

func (s *DecoratedAdmin) FixMarkedTags(ctx context.Context, req *JobID) (rsp *TagFixReport, err error)

func (*DecoratedAdmin) GetJobState Uses

func (s *DecoratedAdmin) GetJobState(ctx context.Context, req *JobID) (rsp *JobState, err error)

func (*DecoratedAdmin) LaunchJob Uses

func (s *DecoratedAdmin) LaunchJob(ctx context.Context, req *JobConfig) (rsp *JobID, err error)

type JobConfig Uses

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 Uses

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

Deprecated: Use JobConfig.ProtoReflect.Descriptor instead.

func (*JobConfig) GetComment Uses

func (x *JobConfig) GetComment() string

func (*JobConfig) GetDryRun Uses

func (x *JobConfig) GetDryRun() bool

func (*JobConfig) GetKind Uses

func (x *JobConfig) GetKind() MapperKind

func (*JobConfig) ProtoMessage Uses

func (*JobConfig) ProtoMessage()

func (*JobConfig) ProtoReflect Uses

func (x *JobConfig) ProtoReflect() protoreflect.Message

func (*JobConfig) Reset Uses

func (x *JobConfig) Reset()

func (*JobConfig) String Uses

func (x *JobConfig) String() string

type JobID Uses

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 Uses

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

Deprecated: Use JobID.ProtoReflect.Descriptor instead.

func (*JobID) GetJobId Uses

func (x *JobID) GetJobId() int64

func (*JobID) ProtoMessage Uses

func (*JobID) ProtoMessage()

func (*JobID) ProtoReflect Uses

func (x *JobID) ProtoReflect() protoreflect.Message

func (*JobID) Reset Uses

func (x *JobID) Reset()

func (*JobID) String Uses

func (x *JobID) String() string

type JobState Uses

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"`
    // contains filtered or unexported fields
}

Details about a mapping job.

func (*JobState) Descriptor Uses

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

Deprecated: Use JobState.ProtoReflect.Descriptor instead.

func (*JobState) GetConfig Uses

func (x *JobState) GetConfig() *JobConfig

func (*JobState) GetInfo Uses

func (x *JobState) GetInfo() *mapper.JobInfo

func (*JobState) ProtoMessage Uses

func (*JobState) ProtoMessage()

func (*JobState) ProtoReflect Uses

func (x *JobState) ProtoReflect() protoreflect.Message

func (*JobState) Reset Uses

func (x *JobState) Reset()

func (*JobState) String Uses

func (x *JobState) String() string

type MapperKind Uses

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 Uses

func (MapperKind) Descriptor() protoreflect.EnumDescriptor

func (MapperKind) Enum Uses

func (x MapperKind) Enum() *MapperKind

func (MapperKind) EnumDescriptor Uses

func (MapperKind) EnumDescriptor() ([]byte, []int)

Deprecated: Use MapperKind.Descriptor instead.

func (MapperKind) Number Uses

func (x MapperKind) Number() protoreflect.EnumNumber

func (MapperKind) String Uses

func (x MapperKind) String() string

func (MapperKind) Type Uses

func (MapperKind) Type() protoreflect.EnumType

type TagFixReport Uses

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 Uses

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

Deprecated: Use TagFixReport.ProtoReflect.Descriptor instead.

func (*TagFixReport) GetFixed Uses

func (x *TagFixReport) GetFixed() []*TagFixReport_Tag

func (*TagFixReport) ProtoMessage Uses

func (*TagFixReport) ProtoMessage()

func (*TagFixReport) ProtoReflect Uses

func (x *TagFixReport) ProtoReflect() protoreflect.Message

func (*TagFixReport) Reset Uses

func (x *TagFixReport) Reset()

func (*TagFixReport) String Uses

func (x *TagFixReport) String() string

type TagFixReport_Tag Uses

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 Uses

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

Deprecated: Use TagFixReport_Tag.ProtoReflect.Descriptor instead.

func (*TagFixReport_Tag) GetBrokenTag Uses

func (x *TagFixReport_Tag) GetBrokenTag() string

func (*TagFixReport_Tag) GetFixedTag Uses

func (x *TagFixReport_Tag) GetFixedTag() string

func (*TagFixReport_Tag) GetInstance Uses

func (x *TagFixReport_Tag) GetInstance() string

func (*TagFixReport_Tag) GetPkg Uses

func (x *TagFixReport_Tag) GetPkg() string

func (*TagFixReport_Tag) ProtoMessage Uses

func (*TagFixReport_Tag) ProtoMessage()

func (*TagFixReport_Tag) ProtoReflect Uses

func (x *TagFixReport_Tag) ProtoReflect() protoreflect.Message

func (*TagFixReport_Tag) Reset Uses

func (x *TagFixReport_Tag) Reset()

func (*TagFixReport_Tag) String Uses

func (x *TagFixReport_Tag) String() string

type UnimplementedAdminServer Uses

type UnimplementedAdminServer struct {
}

UnimplementedAdminServer can be embedded to have forward compatible implementations.

func (*UnimplementedAdminServer) AbortJob Uses

func (*UnimplementedAdminServer) AbortJob(context.Context, *JobID) (*empty.Empty, error)

func (*UnimplementedAdminServer) FixMarkedTags Uses

func (*UnimplementedAdminServer) FixMarkedTags(context.Context, *JobID) (*TagFixReport, error)

func (*UnimplementedAdminServer) GetJobState Uses

func (*UnimplementedAdminServer) GetJobState(context.Context, *JobID) (*JobState, error)

func (*UnimplementedAdminServer) LaunchJob Uses

func (*UnimplementedAdminServer) LaunchJob(context.Context, *JobConfig) (*JobID, error)

Package api imports 14 packages (graph) and is imported by 2 packages. Updated 2020-09-22. Refresh now. Tools for package owners.