Documentation ¶
Overview ¶
Package v1 contains the v1 GRPC client and server definitions for implementing APK interactions.
Index ¶
- Constants
- Variables
- func RegisterAPKHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterAPKHandlerClient(ctx context.Context, mux *runtime.ServeMux, client APKClient) error
- func RegisterAPKHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterAPKHandlerServer(ctx context.Context, mux *runtime.ServeMux, server APKServer) error
- func RegisterAPKServer(s grpc.ServiceRegistrar, srv APKServer)
- type APKClient
- type APKFilter
- func (*APKFilter) Descriptor() ([]byte, []int)deprecated
- func (x *APKFilter) GetArchitecture() string
- func (x *APKFilter) GetPackageName() string
- func (x *APKFilter) GetUidp() *v1.UIDPFilter
- func (*APKFilter) ProtoMessage()
- func (x *APKFilter) ProtoReflect() protoreflect.Message
- func (x *APKFilter) Reset()
- func (x *APKFilter) String() string
- type APKList
- type APKPackage
- func (*APKPackage) Descriptor() ([]byte, []int)deprecated
- func (x *APKPackage) GetArchitecture() string
- func (x *APKPackage) GetBuildTime() *timestamppb.Timestamp
- func (x *APKPackage) GetChecksum() []byte
- func (x *APKPackage) GetDepend() []string
- func (x *APKPackage) GetDescription() string
- func (x *APKPackage) GetId() string
- func (x *APKPackage) GetInstallIf() []string
- func (x *APKPackage) GetInstalledSize() uint64
- func (x *APKPackage) GetLicense() string
- func (x *APKPackage) GetMaintainer() string
- func (x *APKPackage) GetOrigin() string
- func (x *APKPackage) GetPackageName() string
- func (x *APKPackage) GetProviderPriority() uint64
- func (x *APKPackage) GetProvides() []string
- func (x *APKPackage) GetRepoCommit() string
- func (x *APKPackage) GetSize() uint64
- func (x *APKPackage) GetUrl() string
- func (x *APKPackage) GetVersion() string
- func (*APKPackage) ProtoMessage()
- func (x *APKPackage) ProtoReflect() protoreflect.Message
- func (x *APKPackage) Reset()
- func (x *APKPackage) String() string
- type APKServer
- type Clients
- type UnimplementedAPKServer
- type UnsafeAPKServer
Constants ¶
const (
APK_ListAPKs_FullMethodName = "/chainguard.platform.apk.APK/ListAPKs"
)
Variables ¶
var APK_ServiceDesc = grpc.ServiceDesc{ ServiceName: "chainguard.platform.apk.APK", HandlerType: (*APKServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListAPKs", Handler: _APK_ListAPKs_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "apk.platform.proto", }
APK_ServiceDesc is the grpc.ServiceDesc for APK service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_apk_platform_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAPKHandler ¶
RegisterAPKHandler registers the http handlers for service APK to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterAPKHandlerClient ¶
RegisterAPKHandlerClient registers the http handlers for service APK to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "APKClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "APKClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "APKClient" to call the correct interceptors. This client ignores the HTTP middlewares.
func RegisterAPKHandlerFromEndpoint ¶
func RegisterAPKHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterAPKHandlerFromEndpoint is same as RegisterAPKHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterAPKHandlerServer ¶
RegisterAPKHandlerServer registers the http handlers for service APK to "mux". UnaryRPC :call APKServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterAPKHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.
func RegisterAPKServer ¶
func RegisterAPKServer(s grpc.ServiceRegistrar, srv APKServer)
Types ¶
type APKClient ¶
type APKClient interface { // ListAPKs lists all APKs that match the filter. ListAPKs(ctx context.Context, in *APKFilter, opts ...grpc.CallOption) (*APKList, error) }
APKClient is the client API for APK 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 NewAPKClient ¶
func NewAPKClient(cc grpc.ClientConnInterface) APKClient
type APKFilter ¶
type APKFilter struct { Uidp *v1.UIDPFilter `protobuf:"bytes,1,opt,name=uidp,proto3" json:"uidp,omitempty"` // A name to filter by. PackageName string `protobuf:"bytes,2,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"` // An architecture to filter by (e.g., x86_64 or aarch64). Architecture string `protobuf:"bytes,3,opt,name=architecture,proto3" json:"architecture,omitempty"` // contains filtered or unexported fields }
APKFilter is a filter for APKs.
At a minimum the uidp and arch must be set.
func (*APKFilter) Descriptor
deprecated
func (*APKFilter) GetArchitecture ¶
func (*APKFilter) GetPackageName ¶
func (*APKFilter) GetUidp ¶
func (x *APKFilter) GetUidp() *v1.UIDPFilter
func (*APKFilter) ProtoMessage ¶
func (*APKFilter) ProtoMessage()
func (*APKFilter) ProtoReflect ¶
func (x *APKFilter) ProtoReflect() protoreflect.Message
type APKList ¶
type APKList struct { // The APKs returned by the list request. Items []*APKPackage `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
APKList is a list of APKs.
func (*APKList) Descriptor
deprecated
func (*APKList) GetItems ¶
func (x *APKList) GetItems() []*APKPackage
func (*APKList) ProtoMessage ¶
func (*APKList) ProtoMessage()
func (*APKList) ProtoReflect ¶
func (x *APKList) ProtoReflect() protoreflect.Message
type APKPackage ¶
type APKPackage struct { // id, identifier of this APK, a UIDP under a Group. Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Checksum, the checksum of the package. Checksum []byte `protobuf:"bytes,10,opt,name=checksum,proto3" json:"checksum,omitempty"` // Package name, the name of the package. PackageName string `protobuf:"bytes,11,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"` // Package version, the version of the package (e.g., 1.2.3-r4). Version string `protobuf:"bytes,12,opt,name=version,proto3" json:"version,omitempty"` // Package architecture, the architecture of the package (e.g., x86_64 or // aarch64). Architecture string `protobuf:"bytes,13,opt,name=architecture,proto3" json:"architecture,omitempty"` // Package size, the size of the package in bytes. Size uint64 `protobuf:"varint,14,opt,name=size,proto3" json:"size,omitempty"` // Installed size, the size of the package when installed in bytes. InstalledSize uint64 `protobuf:"varint,15,opt,name=installed_size,json=installedSize,proto3" json:"installed_size,omitempty"` // Package description, a description of the package. Description string `protobuf:"bytes,16,opt,name=description,proto3" json:"description,omitempty"` // Package URL, a URL for the package. Url string `protobuf:"bytes,17,opt,name=url,proto3" json:"url,omitempty"` // Package license, the license of the package. License string `protobuf:"bytes,18,opt,name=license,proto3" json:"license,omitempty"` // Package origin, the origin of the package (if the package is a subpackage). Origin string `protobuf:"bytes,19,opt,name=origin,proto3" json:"origin,omitempty"` // Package maintainer, unused. Maintainer string `protobuf:"bytes,20,opt,name=maintainer,proto3" json:"maintainer,omitempty"` // Package build time, the time the package was built. BuildTime *timestamppb.Timestamp `protobuf:"bytes,21,opt,name=build_time,json=buildTime,proto3" json:"build_time,omitempty"` // Package commit, the commit of the package. RepoCommit string `protobuf:"bytes,22,opt,name=repo_commit,json=repoCommit,proto3" json:"repo_commit,omitempty"` // Package provider priority, the priority of the package provider. // If multiple packages provide the same virtual package, the package // with the highest provider priority is selected. ProviderPriority uint64 `protobuf:"varint,23,opt,name=provider_priority,json=providerPriority,proto3" json:"provider_priority,omitempty"` // Package depend, the direct runtime dependencies of the package. Depend []string `protobuf:"bytes,24,rep,name=depend,proto3" json:"depend,omitempty"` // Package provides, the virtual packages provided by the package. Provides []string `protobuf:"bytes,25,rep,name=provides,proto3" json:"provides,omitempty"` // Package install if, the conditions under which the package is installed. InstallIf []string `protobuf:"bytes,26,rep,name=install_if,json=installIf,proto3" json:"install_if,omitempty"` // contains filtered or unexported fields }
APKPackage is an APK package and its metadata.
An APK can be downloaded by requesting https://apk.cgr.dev/{group}/{arch}/{pkgname}-{pkgver}.apk with suitable credentials.
The fields 10+ are the fields that make up the APKINDEX format from here: https://wiki.alpinelinux.org/wiki/Apk_spec#APKINDEX_Format
func (*APKPackage) Descriptor
deprecated
func (*APKPackage) Descriptor() ([]byte, []int)
Deprecated: Use APKPackage.ProtoReflect.Descriptor instead.
func (*APKPackage) GetArchitecture ¶
func (x *APKPackage) GetArchitecture() string
func (*APKPackage) GetBuildTime ¶
func (x *APKPackage) GetBuildTime() *timestamppb.Timestamp
func (*APKPackage) GetChecksum ¶
func (x *APKPackage) GetChecksum() []byte
func (*APKPackage) GetDepend ¶
func (x *APKPackage) GetDepend() []string
func (*APKPackage) GetDescription ¶
func (x *APKPackage) GetDescription() string
func (*APKPackage) GetId ¶
func (x *APKPackage) GetId() string
func (*APKPackage) GetInstallIf ¶
func (x *APKPackage) GetInstallIf() []string
func (*APKPackage) GetInstalledSize ¶
func (x *APKPackage) GetInstalledSize() uint64
func (*APKPackage) GetLicense ¶
func (x *APKPackage) GetLicense() string
func (*APKPackage) GetMaintainer ¶
func (x *APKPackage) GetMaintainer() string
func (*APKPackage) GetOrigin ¶
func (x *APKPackage) GetOrigin() string
func (*APKPackage) GetPackageName ¶
func (x *APKPackage) GetPackageName() string
func (*APKPackage) GetProviderPriority ¶
func (x *APKPackage) GetProviderPriority() uint64
func (*APKPackage) GetProvides ¶
func (x *APKPackage) GetProvides() []string
func (*APKPackage) GetRepoCommit ¶
func (x *APKPackage) GetRepoCommit() string
func (*APKPackage) GetSize ¶
func (x *APKPackage) GetSize() uint64
func (*APKPackage) GetUrl ¶
func (x *APKPackage) GetUrl() string
func (*APKPackage) GetVersion ¶
func (x *APKPackage) GetVersion() string
func (*APKPackage) ProtoMessage ¶
func (*APKPackage) ProtoMessage()
func (*APKPackage) ProtoReflect ¶
func (x *APKPackage) ProtoReflect() protoreflect.Message
func (*APKPackage) Reset ¶
func (x *APKPackage) Reset()
func (*APKPackage) String ¶
func (x *APKPackage) String() string
type APKServer ¶
type APKServer interface { // ListAPKs lists all APKs that match the filter. ListAPKs(context.Context, *APKFilter) (*APKList, error) // contains filtered or unexported methods }
APKServer is the server API for APK service. All implementations must embed UnimplementedAPKServer for forward compatibility.
type Clients ¶
func NewClientsFromConnection ¶
func NewClientsFromConnection(conn *grpc.ClientConn) Clients
type UnimplementedAPKServer ¶
type UnimplementedAPKServer struct{}
UnimplementedAPKServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
type UnsafeAPKServer ¶
type UnsafeAPKServer interface {
// contains filtered or unexported methods
}
UnsafeAPKServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to APKServer will result in compilation errors.