image

package
v0.0.0-...-af36fda Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2024 License: Apache-2.0 Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_api_v1_image_service_proto protoreflect.FileDescriptor
View Source
var Service_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "api.v1.image.Service",
	HandlerType: (*ServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetImageInfo",
			Handler:    _Service_GetImageInfo_Handler,
		},
		{
			MethodName: "GetRepositoryInfo",
			Handler:    _Service_GetRepositoryInfo_Handler,
		},
		{
			MethodName: "Get",
			Handler:    _Service_Get_Handler,
		},
		{
			MethodName: "Add",
			Handler:    _Service_Add_Handler,
		},
		{
			MethodName: "List",
			Handler:    _Service_List_Handler,
		},
		{
			MethodName: "Delete",
			Handler:    _Service_Delete_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/v1/image/service.proto",
}

Service_ServiceDesc is the grpc.ServiceDesc for Service service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterServiceServer

func RegisterServiceServer(s grpc.ServiceRegistrar, srv ServiceServer)

Types

type AddRequest

type AddRequest struct {

	// Capsule to add the image in.
	CapsuleId string `protobuf:"bytes,1,opt,name=capsule_id,json=capsuleId,proto3" json:"capsule_id,omitempty"`
	// Container image to add the image from.
	Image string `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
	// Digest of the image.
	Digest string `protobuf:"bytes,3,opt,name=digest,proto3" json:"digest,omitempty"`
	// Origin of the image
	Origin *capsule.Origin `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"`
	// Meta data to attach to the image.
	Labels map[string]string `` /* 153-byte string literal not displayed */
	// if true skip check if image exists.
	SkipImageCheck bool `protobuf:"varint,6,opt,name=skip_image_check,json=skipImageCheck,proto3" json:"skip_image_check,omitempty"`
	// Project ID.
	ProjectId string `protobuf:"bytes,7,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// contains filtered or unexported fields
}

Request to add a new image in a capsule.

func (*AddRequest) Descriptor deprecated

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

Deprecated: Use AddRequest.ProtoReflect.Descriptor instead.

func (*AddRequest) GetCapsuleId

func (x *AddRequest) GetCapsuleId() string

func (*AddRequest) GetDigest

func (x *AddRequest) GetDigest() string

func (*AddRequest) GetImage

func (x *AddRequest) GetImage() string

func (*AddRequest) GetLabels

func (x *AddRequest) GetLabels() map[string]string

func (*AddRequest) GetOrigin

func (x *AddRequest) GetOrigin() *capsule.Origin

func (*AddRequest) GetProjectId

func (x *AddRequest) GetProjectId() string

func (*AddRequest) GetSkipImageCheck

func (x *AddRequest) GetSkipImageCheck() bool

func (*AddRequest) ProtoMessage

func (*AddRequest) ProtoMessage()

func (*AddRequest) ProtoReflect

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

func (*AddRequest) Reset

func (x *AddRequest) Reset()

func (*AddRequest) String

func (x *AddRequest) String() string

type AddResponse

type AddResponse struct {

	// ID of the image.
	ImageId string `protobuf:"bytes,1,opt,name=image_id,json=imageId,proto3" json:"image_id,omitempty"`
	// True if a new image was added, false if the image already existed.
	AddedNewImage bool `protobuf:"varint,2,opt,name=added_new_image,json=addedNewImage,proto3" json:"added_new_image,omitempty"`
	// contains filtered or unexported fields
}

Response to add a new image in a capsule.

func (*AddResponse) Descriptor deprecated

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

Deprecated: Use AddResponse.ProtoReflect.Descriptor instead.

func (*AddResponse) GetAddedNewImage

func (x *AddResponse) GetAddedNewImage() bool

func (*AddResponse) GetImageId

func (x *AddResponse) GetImageId() string

func (*AddResponse) ProtoMessage

func (*AddResponse) ProtoMessage()

func (*AddResponse) ProtoReflect

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

func (*AddResponse) Reset

func (x *AddResponse) Reset()

func (*AddResponse) String

func (x *AddResponse) String() string

type DeleteRequest

type DeleteRequest struct {

	// Capsule to delete the image from.
	CapsuleId string `protobuf:"bytes,1,opt,name=capsule_id,json=capsuleId,proto3" json:"capsule_id,omitempty"`
	// Image to delete.
	ImageId string `protobuf:"bytes,2,opt,name=image_id,json=imageId,proto3" json:"image_id,omitempty"`
	// Project ID.
	ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// contains filtered or unexported fields
}

Request to delete a image.

func (*DeleteRequest) Descriptor deprecated

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

Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.

func (*DeleteRequest) GetCapsuleId

func (x *DeleteRequest) GetCapsuleId() string

func (*DeleteRequest) GetImageId

func (x *DeleteRequest) GetImageId() string

func (*DeleteRequest) GetProjectId

func (x *DeleteRequest) GetProjectId() string

func (*DeleteRequest) ProtoMessage

func (*DeleteRequest) ProtoMessage()

func (*DeleteRequest) ProtoReflect

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

func (*DeleteRequest) Reset

func (x *DeleteRequest) Reset()

func (*DeleteRequest) String

func (x *DeleteRequest) String() string

type DeleteResponse

type DeleteResponse struct {
	// contains filtered or unexported fields
}

Empty response to delete a image.

func (*DeleteResponse) Descriptor deprecated

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

Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.

func (*DeleteResponse) ProtoMessage

func (*DeleteResponse) ProtoMessage()

func (*DeleteResponse) ProtoReflect

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

func (*DeleteResponse) Reset

func (x *DeleteResponse) Reset()

func (*DeleteResponse) String

func (x *DeleteResponse) String() string

type GetImageInfoRequest

type GetImageInfoRequest struct {

	// The image to get information about.
	Image string `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
	// contains filtered or unexported fields
}

Request to get information about an image.

func (*GetImageInfoRequest) Descriptor deprecated

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

Deprecated: Use GetImageInfoRequest.ProtoReflect.Descriptor instead.

func (*GetImageInfoRequest) GetImage

func (x *GetImageInfoRequest) GetImage() string

func (*GetImageInfoRequest) ProtoMessage

func (*GetImageInfoRequest) ProtoMessage()

func (*GetImageInfoRequest) ProtoReflect

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

func (*GetImageInfoRequest) Reset

func (x *GetImageInfoRequest) Reset()

func (*GetImageInfoRequest) String

func (x *GetImageInfoRequest) String() string

type GetImageInfoResponse

type GetImageInfoResponse struct {

	// Image ID.
	ImageId *ImageId `protobuf:"bytes,1,opt,name=image_id,json=imageId,proto3" json:"image_id,omitempty"`
	// Image from the request.
	ImageString string `protobuf:"bytes,2,opt,name=image_string,json=imageString,proto3" json:"image_string,omitempty"`
	// When the image was created.
	CreatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// Origin of the image.
	Origin *capsule.Origin `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"`
	// contains filtered or unexported fields
}

Reponse to GetImageInfo request, containing information about an image.

func (*GetImageInfoResponse) Descriptor deprecated

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

Deprecated: Use GetImageInfoResponse.ProtoReflect.Descriptor instead.

func (*GetImageInfoResponse) GetCreatedAt

func (x *GetImageInfoResponse) GetCreatedAt() *timestamppb.Timestamp

func (*GetImageInfoResponse) GetImageId

func (x *GetImageInfoResponse) GetImageId() *ImageId

func (*GetImageInfoResponse) GetImageString

func (x *GetImageInfoResponse) GetImageString() string

func (*GetImageInfoResponse) GetOrigin

func (x *GetImageInfoResponse) GetOrigin() *capsule.Origin

func (*GetImageInfoResponse) ProtoMessage

func (*GetImageInfoResponse) ProtoMessage()

func (*GetImageInfoResponse) ProtoReflect

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

func (*GetImageInfoResponse) Reset

func (x *GetImageInfoResponse) Reset()

func (*GetImageInfoResponse) String

func (x *GetImageInfoResponse) String() string

type GetRepositoryInfoRequest

type GetRepositoryInfoRequest struct {

	// Docker Registry
	Registry string `protobuf:"bytes,1,opt,name=registry,proto3" json:"registry,omitempty"`
	// Docker Repository
	Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
	// contains filtered or unexported fields
}

Get repository information request.

func (*GetRepositoryInfoRequest) Descriptor deprecated

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

Deprecated: Use GetRepositoryInfoRequest.ProtoReflect.Descriptor instead.

func (*GetRepositoryInfoRequest) GetRegistry

func (x *GetRepositoryInfoRequest) GetRegistry() string

func (*GetRepositoryInfoRequest) GetRepository

func (x *GetRepositoryInfoRequest) GetRepository() string

func (*GetRepositoryInfoRequest) ProtoMessage

func (*GetRepositoryInfoRequest) ProtoMessage()

func (*GetRepositoryInfoRequest) ProtoReflect

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

func (*GetRepositoryInfoRequest) Reset

func (x *GetRepositoryInfoRequest) Reset()

func (*GetRepositoryInfoRequest) String

func (x *GetRepositoryInfoRequest) String() string

type GetRepositoryInfoResponse

type GetRepositoryInfoResponse struct {

	// Image Tags in the repository.
	Tags []*Tag `protobuf:"bytes,1,rep,name=tags,proto3" json:"tags,omitempty"`
	// contains filtered or unexported fields
}

Get repository information response.

func (*GetRepositoryInfoResponse) Descriptor deprecated

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

Deprecated: Use GetRepositoryInfoResponse.ProtoReflect.Descriptor instead.

func (*GetRepositoryInfoResponse) GetTags

func (x *GetRepositoryInfoResponse) GetTags() []*Tag

func (*GetRepositoryInfoResponse) ProtoMessage

func (*GetRepositoryInfoResponse) ProtoMessage()

func (*GetRepositoryInfoResponse) ProtoReflect

func (*GetRepositoryInfoResponse) Reset

func (x *GetRepositoryInfoResponse) Reset()

func (*GetRepositoryInfoResponse) String

func (x *GetRepositoryInfoResponse) String() string

type GetRequest

type GetRequest struct {

	// Capsule to get the image from.
	CapsuleId string `protobuf:"bytes,1,opt,name=capsule_id,json=capsuleId,proto3" json:"capsule_id,omitempty"`
	// Image to get.
	ImageId string `protobuf:"bytes,2,opt,name=image_id,json=imageId,proto3" json:"image_id,omitempty"`
	// Project ID.
	ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// contains filtered or unexported fields
}

Request to get a image.

func (*GetRequest) Descriptor deprecated

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

Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.

func (*GetRequest) GetCapsuleId

func (x *GetRequest) GetCapsuleId() string

func (*GetRequest) GetImageId

func (x *GetRequest) GetImageId() string

func (*GetRequest) GetProjectId

func (x *GetRequest) GetProjectId() string

func (*GetRequest) ProtoMessage

func (*GetRequest) ProtoMessage()

func (*GetRequest) ProtoReflect

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

func (*GetRequest) Reset

func (x *GetRequest) Reset()

func (*GetRequest) String

func (x *GetRequest) String() string

type GetResponse

type GetResponse struct {

	// The image to retrieve
	Image *capsule.Image `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
	// contains filtered or unexported fields
}

Response to get a image.

func (*GetResponse) Descriptor deprecated

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

Deprecated: Use GetResponse.ProtoReflect.Descriptor instead.

func (*GetResponse) GetImage

func (x *GetResponse) GetImage() *capsule.Image

func (*GetResponse) ProtoMessage

func (*GetResponse) ProtoMessage()

func (*GetResponse) ProtoReflect

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

func (*GetResponse) Reset

func (x *GetResponse) Reset()

func (*GetResponse) String

func (x *GetResponse) String() string

type ImageId

type ImageId struct {

	// Docker Registry.
	Registry string `protobuf:"bytes,1,opt,name=registry,proto3" json:"registry,omitempty"`
	// Docker Repository.
	Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
	// Tag of the image.
	Tag string `protobuf:"bytes,3,opt,name=tag,proto3" json:"tag,omitempty"`
	// Digest of the image.
	Digest string `protobuf:"bytes,4,opt,name=digest,proto3" json:"digest,omitempty"`
	// contains filtered or unexported fields
}

A collection of image properties that uniquely identifies an image.

func (*ImageId) Descriptor deprecated

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

Deprecated: Use ImageId.ProtoReflect.Descriptor instead.

func (*ImageId) GetDigest

func (x *ImageId) GetDigest() string

func (*ImageId) GetRegistry

func (x *ImageId) GetRegistry() string

func (*ImageId) GetRepository

func (x *ImageId) GetRepository() string

func (*ImageId) GetTag

func (x *ImageId) GetTag() string

func (*ImageId) ProtoMessage

func (*ImageId) ProtoMessage()

func (*ImageId) ProtoReflect

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

func (*ImageId) Reset

func (x *ImageId) Reset()

func (*ImageId) String

func (x *ImageId) String() string

type ListRequest

type ListRequest struct {

	// Capsule to list images in.
	CapsuleId string `protobuf:"bytes,1,opt,name=capsule_id,json=capsuleId,proto3" json:"capsule_id,omitempty"`
	// Pagination options.
	Pagination *model.Pagination `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
	// Project ID.
	ProjectId string `protobuf:"bytes,3,opt,name=project_id,json=projectId,proto3" json:"project_id,omitempty"`
	// contains filtered or unexported fields
}

Request to list images.

func (*ListRequest) Descriptor deprecated

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

Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.

func (*ListRequest) GetCapsuleId

func (x *ListRequest) GetCapsuleId() string

func (*ListRequest) GetPagination

func (x *ListRequest) GetPagination() *model.Pagination

func (*ListRequest) GetProjectId

func (x *ListRequest) GetProjectId() string

func (*ListRequest) ProtoMessage

func (*ListRequest) ProtoMessage()

func (*ListRequest) ProtoReflect

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

func (*ListRequest) Reset

func (x *ListRequest) Reset()

func (*ListRequest) String

func (x *ListRequest) String() string

type ListResponse

type ListResponse struct {

	// Images in the capsule.
	Images []*capsule.Image `protobuf:"bytes,1,rep,name=images,proto3" json:"images,omitempty"`
	// Total number of images in the capsule.
	Total uint64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"`
	// contains filtered or unexported fields
}

Reponse to list images.

func (*ListResponse) Descriptor deprecated

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

Deprecated: Use ListResponse.ProtoReflect.Descriptor instead.

func (*ListResponse) GetImages

func (x *ListResponse) GetImages() []*capsule.Image

func (*ListResponse) GetTotal

func (x *ListResponse) GetTotal() uint64

func (*ListResponse) ProtoMessage

func (*ListResponse) ProtoMessage()

func (*ListResponse) ProtoReflect

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

func (*ListResponse) Reset

func (x *ListResponse) Reset()

func (*ListResponse) String

func (x *ListResponse) String() string

type ServiceClient

type ServiceClient interface {
	// Get Information about an image in a image.
	GetImageInfo(ctx context.Context, in *GetImageInfoRequest, opts ...grpc.CallOption) (*GetImageInfoResponse, error)
	// Get Information about a docker registry repository.
	GetRepositoryInfo(ctx context.Context, in *GetRepositoryInfoRequest, opts ...grpc.CallOption) (*GetRepositoryInfoResponse, error)
	// Get a image.
	Get(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*GetResponse, error)
	// Add a new image.
	// Images are immutable and cannot change. Add a new image to make
	// changes from an existing one.
	Add(ctx context.Context, in *AddRequest, opts ...grpc.CallOption) (*AddResponse, error)
	// List images for a capsule.
	List(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*ListResponse, error)
	// Delete a image.
	Delete(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error)
}

ServiceClient is the client API for Service 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 NewServiceClient

func NewServiceClient(cc grpc.ClientConnInterface) ServiceClient

type ServiceServer

type ServiceServer interface {
	// Get Information about an image in a image.
	GetImageInfo(context.Context, *GetImageInfoRequest) (*GetImageInfoResponse, error)
	// Get Information about a docker registry repository.
	GetRepositoryInfo(context.Context, *GetRepositoryInfoRequest) (*GetRepositoryInfoResponse, error)
	// Get a image.
	Get(context.Context, *GetRequest) (*GetResponse, error)
	// Add a new image.
	// Images are immutable and cannot change. Add a new image to make
	// changes from an existing one.
	Add(context.Context, *AddRequest) (*AddResponse, error)
	// List images for a capsule.
	List(context.Context, *ListRequest) (*ListResponse, error)
	// Delete a image.
	Delete(context.Context, *DeleteRequest) (*DeleteResponse, error)
	// contains filtered or unexported methods
}

ServiceServer is the server API for Service service. All implementations must embed UnimplementedServiceServer for forward compatibility

type Tag

type Tag struct {

	// Tag of the image.
	Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"`
	// When the image was created.
	ImageCreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=image_created_at,json=imageCreatedAt,proto3" json:"image_created_at,omitempty"`
	// contains filtered or unexported fields
}

A docker image tag.

func (*Tag) Descriptor deprecated

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

Deprecated: Use Tag.ProtoReflect.Descriptor instead.

func (*Tag) GetImageCreatedAt

func (x *Tag) GetImageCreatedAt() *timestamppb.Timestamp

func (*Tag) GetTag

func (x *Tag) GetTag() string

func (*Tag) ProtoMessage

func (*Tag) ProtoMessage()

func (*Tag) ProtoReflect

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

func (*Tag) Reset

func (x *Tag) Reset()

func (*Tag) String

func (x *Tag) String() string

type UnimplementedServiceServer

type UnimplementedServiceServer struct {
}

UnimplementedServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedServiceServer) Add

func (UnimplementedServiceServer) Delete

func (UnimplementedServiceServer) Get

func (UnimplementedServiceServer) GetImageInfo

func (UnimplementedServiceServer) List

type UnsafeServiceServer

type UnsafeServiceServer interface {
	// contains filtered or unexported methods
}

UnsafeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ServiceServer will result in compilation errors.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL