image

package
v0.0.0-...-3439342 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-cdd. DO NOT EDIT. source: image.proto

Package image is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var AuthConfigFullMethods = map[string]AuthConfig{
	"/image.ImageApi/Get": AuthConfig{NeedAuth: false, Roles: []string{"*"}},
	"/image.ImageApi/Add": AuthConfig{NeedAuth: false, Roles: []string{"*"}},
}
View Source
var File_image_proto protoreflect.FileDescriptor
View Source
var FullMethods = fullMethods{
	ImageApi_Get: "/image.ImageApi/Get",
	ImageApi_Add: "/image.ImageApi/Add",
}
View Source
var NeedApiKeyFullMethods = []string{}
View Source
var NeedAuthFullMethods = []string{}

Functions

func RegisterImageApiGrstServer

func RegisterImageApiGrstServer(grpcRestServer *grst.Server, hndl ImageApiServer)

func RegisterImageApiHandler

func RegisterImageApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterImageApiHandler registers the http handlers for service ImageApi to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterImageApiHandlerClient

func RegisterImageApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ImageApiClient) error

RegisterImageApiHandlerClient registers the http handlers for service ImageApi to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ImageApiClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ImageApiClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ImageApiClient" to call the correct interceptors.

func RegisterImageApiHandlerFromEndpoint

func RegisterImageApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterImageApiHandlerFromEndpoint is same as RegisterImageApiHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterImageApiHandlerServer

func RegisterImageApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ImageApiServer) error

RegisterImageApiHandlerServer registers the http handlers for service ImageApi to "mux". UnaryRPC :call ImageApiServer 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 RegisterImageApiHandlerFromEndpoint instead.

func RegisterImageApiServer

func RegisterImageApiServer(s *grpc.Server, srv ImageApiServer)

func ValidateRequest

func ValidateRequest(req interface{}) error

Types

type AddReq

type AddReq struct {
	Project     string `protobuf:"bytes,4,opt,name=Project,json=project,proto3" json:"project,omitempty" default:"default"`
	Image       string `protobuf:"bytes,1,opt,name=Image,json=image,proto3" json:"image,omitempty" validate:"required"`
	Repository  string `protobuf:"bytes,2,opt,name=Repository,json=repository,proto3" json:"repository,omitempty" validate:"required"`
	Description string `protobuf:"bytes,3,opt,name=Description,json=description,proto3" json:"description,omitempty"`
	// contains filtered or unexported fields
}

func (*AddReq) Descriptor deprecated

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

Deprecated: Use AddReq.ProtoReflect.Descriptor instead.

func (*AddReq) GetDescription

func (x *AddReq) GetDescription() string

func (*AddReq) GetImage

func (x *AddReq) GetImage() string

func (*AddReq) GetProject

func (x *AddReq) GetProject() string

func (*AddReq) GetRepository

func (x *AddReq) GetRepository() string

func (*AddReq) ProtoMessage

func (*AddReq) ProtoMessage()

func (*AddReq) ProtoReflect

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

func (*AddReq) Reset

func (x *AddReq) Reset()

func (*AddReq) String

func (x *AddReq) String() string

type AuthConfig

type AuthConfig struct {
	NeedAuth bool
	Roles    []string
}

type GetReq

type GetReq struct {
	Project    string `protobuf:"bytes,4,opt,name=Project,json=project,proto3" json:"project,omitempty" default:"default"`
	Repository string `protobuf:"bytes,1,opt,name=Repository,json=repository,proto3" json:"repository,omitempty" validate:"required"`
	Size       int32  `protobuf:"varint,2,opt,name=Size,json=size,proto3" json:"size,omitempty"`
	Page       int32  `protobuf:"varint,3,opt,name=Page,json=page,proto3" json:"page,omitempty"`
	// contains filtered or unexported fields
}

func (*GetReq) Descriptor deprecated

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

Deprecated: Use GetReq.ProtoReflect.Descriptor instead.

func (*GetReq) GetPage

func (x *GetReq) GetPage() int32

func (*GetReq) GetProject

func (x *GetReq) GetProject() string

func (*GetReq) GetRepository

func (x *GetReq) GetRepository() string

func (*GetReq) GetSize

func (x *GetReq) GetSize() int32

func (*GetReq) ProtoMessage

func (*GetReq) ProtoMessage()

func (*GetReq) ProtoReflect

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

func (*GetReq) Reset

func (x *GetReq) Reset()

func (*GetReq) String

func (x *GetReq) String() string

type Image

type Image struct {
	Id          int32                `protobuf:"varint,1,opt,name=Id,json=id,proto3" json:"id,omitempty"`
	Digest      string               `protobuf:"bytes,2,opt,name=Digest,json=digest,proto3" json:"digest,omitempty"`
	Image       string               `protobuf:"bytes,4,opt,name=Image,json=image,proto3" json:"image,omitempty"`
	Project     string               `protobuf:"bytes,9,opt,name=Project,json=project,proto3" json:"project,omitempty" default:"default"`
	Repository  string               `protobuf:"bytes,5,opt,name=Repository,json=repository,proto3" json:"repository,omitempty"`
	Description string               `protobuf:"bytes,6,opt,name=Description,json=description,proto3" json:"description,omitempty"`
	CreatedBy   int32                `protobuf:"varint,7,opt,name=CreatedBy,json=created_by,proto3" json:"created_by,omitempty"`
	CreatedAt   *timestamp.Timestamp `protobuf:"bytes,8,opt,name=CreatedAt,json=created_at,proto3" json:"created_at,omitempty"`
	Notes       string               `protobuf:"bytes,10,opt,name=Notes,json=notes,proto3" json:"notes,omitempty"`
	// contains filtered or unexported fields
}

func (*Image) Descriptor deprecated

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

Deprecated: Use Image.ProtoReflect.Descriptor instead.

func (*Image) GetCreatedAt

func (x *Image) GetCreatedAt() *timestamp.Timestamp

func (*Image) GetCreatedBy

func (x *Image) GetCreatedBy() int32

func (*Image) GetDescription

func (x *Image) GetDescription() string

func (*Image) GetDigest

func (x *Image) GetDigest() string

func (*Image) GetId

func (x *Image) GetId() int32

func (*Image) GetImage

func (x *Image) GetImage() string

func (*Image) GetNotes

func (x *Image) GetNotes() string

func (*Image) GetProject

func (x *Image) GetProject() string

func (*Image) GetRepository

func (x *Image) GetRepository() string

func (*Image) ProtoMessage

func (*Image) ProtoMessage()

func (*Image) ProtoReflect

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

func (*Image) Reset

func (x *Image) Reset()

func (*Image) String

func (x *Image) String() string

type ImageApiClient

type ImageApiClient interface {
	Get(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*Images, error)
	Add(ctx context.Context, in *AddReq, opts ...grpc.CallOption) (*empty.Empty, error)
}

ImageApiClient is the client API for ImageApi 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 NewImageApiClient

func NewImageApiClient(cc grpc.ClientConnInterface) ImageApiClient

func NewImageApiGrstClient

func NewImageApiGrstClient(serverHost string, creds *credentials.TransportCredentials, dialOpts ...grpc.DialOption) (ImageApiClient, error)

type ImageApiServer

type ImageApiServer interface {
	Get(context.Context, *GetReq) (*Images, error)
	Add(context.Context, *AddReq) (*empty.Empty, error)
	// contains filtered or unexported methods
}

ImageApiServer is the server API for ImageApi service. All implementations must embed UnimplementedImageApiServer for forward compatibility

type Images

type Images struct {
	Images []*Image `protobuf:"bytes,1,rep,name=Images,json=images,proto3" json:"images,omitempty"`
	// contains filtered or unexported fields
}

func (*Images) Descriptor deprecated

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

Deprecated: Use Images.ProtoReflect.Descriptor instead.

func (*Images) GetImages

func (x *Images) GetImages() []*Image

func (*Images) ProtoMessage

func (*Images) ProtoMessage()

func (*Images) ProtoReflect

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

func (*Images) Reset

func (x *Images) Reset()

func (*Images) String

func (x *Images) String() string

type RemoveReq

type RemoveReq struct {
	Project    string `protobuf:"bytes,3,opt,name=Project,json=project,proto3" json:"project,omitempty" default:"default"`
	Repository string `protobuf:"bytes,1,opt,name=Repository,json=repository,proto3" json:"repository,omitempty" validate:"required"`
	Digest     string `protobuf:"bytes,2,opt,name=Digest,json=digest,proto3" json:"digest,omitempty" validate:"required"`
	// contains filtered or unexported fields
}

func (*RemoveReq) Descriptor deprecated

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

Deprecated: Use RemoveReq.ProtoReflect.Descriptor instead.

func (*RemoveReq) GetDigest

func (x *RemoveReq) GetDigest() string

func (*RemoveReq) GetProject

func (x *RemoveReq) GetProject() string

func (*RemoveReq) GetRepository

func (x *RemoveReq) GetRepository() string

func (*RemoveReq) ProtoMessage

func (*RemoveReq) ProtoMessage()

func (*RemoveReq) ProtoReflect

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

func (*RemoveReq) Reset

func (x *RemoveReq) Reset()

func (*RemoveReq) String

func (x *RemoveReq) String() string

type UnimplementedImageApiServer

type UnimplementedImageApiServer struct {
}

UnimplementedImageApiServer must be embedded to have forward compatible implementations.

func (UnimplementedImageApiServer) Add

func (UnimplementedImageApiServer) Get

type UnsafeImageApiServer

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

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

Jump to

Keyboard shortcuts

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