asset

package
v0.0.0-...-5dfe74e Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AssetService_UploadImage_FullMethodName = "/eolymp.asset.AssetService/UploadImage"
	AssetService_UploadFile_FullMethodName  = "/eolymp.asset.AssetService/UploadFile"
)

Variables

View Source
var AssetService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "eolymp.asset.AssetService",
	HandlerType: (*AssetServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "UploadImage",
			Handler:    _AssetService_UploadImage_Handler,
		},
		{
			MethodName: "UploadFile",
			Handler:    _AssetService_UploadFile_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "eolymp/asset/asset_service.proto",
}

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

View Source
var File_eolymp_asset_asset_service_proto protoreflect.FileDescriptor

Functions

func RegisterAssetServiceHttpHandlers

func RegisterAssetServiceHttpHandlers(router *mux.Router, prefix string, cli AssetServiceClient)

RegisterAssetServiceHttpHandlers adds handlers for for AssetServiceClient This constructor creates http.Handler, the actual implementation might change at any moment

func RegisterAssetServiceServer

func RegisterAssetServiceServer(s grpc.ServiceRegistrar, srv AssetServiceServer)

Types

type AssetServiceClient

type AssetServiceClient interface {
	UploadImage(ctx context.Context, in *UploadImageInput, opts ...grpc.CallOption) (*UploadImageOutput, error)
	UploadFile(ctx context.Context, in *UploadFileInput, opts ...grpc.CallOption) (*UploadFileOutput, error)
}

AssetServiceClient is the client API for AssetService 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.

type AssetServiceInterceptor

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

func NewAssetServiceInterceptor

func NewAssetServiceInterceptor(cli AssetServiceClient, middleware ..._AssetServiceMiddleware) *AssetServiceInterceptor

NewAssetServiceInterceptor constructs additional middleware for a server based on annotations in proto files

func (*AssetServiceInterceptor) UploadFile

func (*AssetServiceInterceptor) UploadImage

type AssetServiceServer

type AssetServiceServer interface {
	UploadImage(context.Context, *UploadImageInput) (*UploadImageOutput, error)
	UploadFile(context.Context, *UploadFileInput) (*UploadFileOutput, error)
}

AssetServiceServer is the server API for AssetService service. All implementations should embed UnimplementedAssetServiceServer for forward compatibility

type AssetServiceService

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

func NewAssetServiceHttpClient

func NewAssetServiceHttpClient(url string, cli _AssetServiceHttpClient) *AssetServiceService

NewAssetServiceHttpClient constructs client for AssetService

func (*AssetServiceService) UploadFile

func (*AssetServiceService) UploadImage

type UnimplementedAssetServiceServer

type UnimplementedAssetServiceServer struct {
}

UnimplementedAssetServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedAssetServiceServer) UploadFile

func (UnimplementedAssetServiceServer) UploadImage

type UnsafeAssetServiceServer

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

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

type UploadFileInput

type UploadFileInput struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Data []byte `protobuf:"bytes,100,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*UploadFileInput) Descriptor deprecated

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

Deprecated: Use UploadFileInput.ProtoReflect.Descriptor instead.

func (*UploadFileInput) GetData

func (x *UploadFileInput) GetData() []byte

func (*UploadFileInput) GetName

func (x *UploadFileInput) GetName() string

func (*UploadFileInput) GetType

func (x *UploadFileInput) GetType() string

func (*UploadFileInput) ProtoMessage

func (*UploadFileInput) ProtoMessage()

func (*UploadFileInput) ProtoReflect

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

func (*UploadFileInput) Reset

func (x *UploadFileInput) Reset()

func (*UploadFileInput) String

func (x *UploadFileInput) String() string

type UploadFileOutput

type UploadFileOutput struct {
	FileUrl string `protobuf:"bytes,1,opt,name=file_url,json=fileUrl,proto3" json:"file_url,omitempty"`
	// contains filtered or unexported fields
}

func (*UploadFileOutput) Descriptor deprecated

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

Deprecated: Use UploadFileOutput.ProtoReflect.Descriptor instead.

func (*UploadFileOutput) GetFileUrl

func (x *UploadFileOutput) GetFileUrl() string

func (*UploadFileOutput) ProtoMessage

func (*UploadFileOutput) ProtoMessage()

func (*UploadFileOutput) ProtoReflect

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

func (*UploadFileOutput) Reset

func (x *UploadFileOutput) Reset()

func (*UploadFileOutput) String

func (x *UploadFileOutput) String() string

type UploadImageInput

type UploadImageInput struct {
	Name     string                   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Type     string                   `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	Crop     *UploadImageInput_Crop   `protobuf:"bytes,10,opt,name=crop,proto3" json:"crop,omitempty"`
	Size     *UploadImageInput_Size   `protobuf:"bytes,11,opt,name=size,proto3" json:"size,omitempty"`
	Variants []*UploadImageInput_Size `protobuf:"bytes,20,rep,name=variants,proto3" json:"variants,omitempty"`
	Data     []byte                   `protobuf:"bytes,100,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*UploadImageInput) Descriptor deprecated

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

Deprecated: Use UploadImageInput.ProtoReflect.Descriptor instead.

func (*UploadImageInput) GetCrop

func (*UploadImageInput) GetData

func (x *UploadImageInput) GetData() []byte

func (*UploadImageInput) GetName

func (x *UploadImageInput) GetName() string

func (*UploadImageInput) GetSize

func (*UploadImageInput) GetType

func (x *UploadImageInput) GetType() string

func (*UploadImageInput) GetVariants

func (x *UploadImageInput) GetVariants() []*UploadImageInput_Size

func (*UploadImageInput) ProtoMessage

func (*UploadImageInput) ProtoMessage()

func (*UploadImageInput) ProtoReflect

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

func (*UploadImageInput) Reset

func (x *UploadImageInput) Reset()

func (*UploadImageInput) String

func (x *UploadImageInput) String() string

type UploadImageInput_Crop

type UploadImageInput_Crop struct {
	Top    uint32 `protobuf:"varint,1,opt,name=top,proto3" json:"top,omitempty"`
	Right  uint32 `protobuf:"varint,2,opt,name=right,proto3" json:"right,omitempty"`
	Bottom uint32 `protobuf:"varint,3,opt,name=bottom,proto3" json:"bottom,omitempty"`
	Left   uint32 `protobuf:"varint,4,opt,name=left,proto3" json:"left,omitempty"`
	// contains filtered or unexported fields
}

func (*UploadImageInput_Crop) Descriptor deprecated

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

Deprecated: Use UploadImageInput_Crop.ProtoReflect.Descriptor instead.

func (*UploadImageInput_Crop) GetBottom

func (x *UploadImageInput_Crop) GetBottom() uint32

func (*UploadImageInput_Crop) GetLeft

func (x *UploadImageInput_Crop) GetLeft() uint32

func (*UploadImageInput_Crop) GetRight

func (x *UploadImageInput_Crop) GetRight() uint32

func (*UploadImageInput_Crop) GetTop

func (x *UploadImageInput_Crop) GetTop() uint32

func (*UploadImageInput_Crop) ProtoMessage

func (*UploadImageInput_Crop) ProtoMessage()

func (*UploadImageInput_Crop) ProtoReflect

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

func (*UploadImageInput_Crop) Reset

func (x *UploadImageInput_Crop) Reset()

func (*UploadImageInput_Crop) String

func (x *UploadImageInput_Crop) String() string

type UploadImageInput_Size

type UploadImageInput_Size struct {
	Width  uint32 `protobuf:"varint,1,opt,name=width,proto3" json:"width,omitempty"`
	Height uint32 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"`
	// contains filtered or unexported fields
}

func (*UploadImageInput_Size) Descriptor deprecated

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

Deprecated: Use UploadImageInput_Size.ProtoReflect.Descriptor instead.

func (*UploadImageInput_Size) GetHeight

func (x *UploadImageInput_Size) GetHeight() uint32

func (*UploadImageInput_Size) GetWidth

func (x *UploadImageInput_Size) GetWidth() uint32

func (*UploadImageInput_Size) ProtoMessage

func (*UploadImageInput_Size) ProtoMessage()

func (*UploadImageInput_Size) ProtoReflect

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

func (*UploadImageInput_Size) Reset

func (x *UploadImageInput_Size) Reset()

func (*UploadImageInput_Size) String

func (x *UploadImageInput_Size) String() string

type UploadImageOutput

type UploadImageOutput struct {
	ImageUrl string `protobuf:"bytes,1,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"`
	// contains filtered or unexported fields
}

func (*UploadImageOutput) Descriptor deprecated

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

Deprecated: Use UploadImageOutput.ProtoReflect.Descriptor instead.

func (*UploadImageOutput) GetImageUrl

func (x *UploadImageOutput) GetImageUrl() string

func (*UploadImageOutput) ProtoMessage

func (*UploadImageOutput) ProtoMessage()

func (*UploadImageOutput) ProtoReflect

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

func (*UploadImageOutput) Reset

func (x *UploadImageOutput) Reset()

func (*UploadImageOutput) String

func (x *UploadImageOutput) String() string

Jump to

Keyboard shortcuts

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