cosmetic

package
v0.0.0-...-32e9a55 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package cosmetic is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	CosmeticService_DeleteCosmetic_FullMethodName = "/cosmetic.CosmeticService/deleteCosmetic"
	CosmeticService_UpdateCosmetic_FullMethodName = "/cosmetic.CosmeticService/updateCosmetic"
	CosmeticService_CreateCosmetic_FullMethodName = "/cosmetic.CosmeticService/createCosmetic"
	CosmeticService_ListCosmetics_FullMethodName  = "/cosmetic.CosmeticService/ListCosmetics"
)

Variables

View Source
var CosmeticService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "cosmetic.CosmeticService",
	HandlerType: (*CosmeticServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "deleteCosmetic",
			Handler:    _CosmeticService_DeleteCosmetic_Handler,
		},
		{
			MethodName: "updateCosmetic",
			Handler:    _CosmeticService_UpdateCosmetic_Handler,
		},
		{
			MethodName: "createCosmetic",
			Handler:    _CosmeticService_CreateCosmetic_Handler,
		},
		{
			MethodName: "ListCosmetics",
			Handler:    _CosmeticService_ListCosmetics_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "proto/cosmetic/cosmetic.proto",
}

CosmeticService_ServiceDesc is the grpc.ServiceDesc for CosmeticService 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_proto_cosmetic_cosmetic_proto protoreflect.FileDescriptor

Functions

func RegisterCosmeticServiceHandler

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

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

func RegisterCosmeticServiceHandlerClient

func RegisterCosmeticServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CosmeticServiceClient) error

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

func RegisterCosmeticServiceHandlerFromEndpoint

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

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

func RegisterCosmeticServiceHandlerServer

func RegisterCosmeticServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CosmeticServiceServer) error

RegisterCosmeticServiceHandlerServer registers the http handlers for service CosmeticService to "mux". UnaryRPC :call CosmeticServiceServer 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 RegisterCosmeticServiceHandlerFromEndpoint instead.

func RegisterCosmeticServiceServer

func RegisterCosmeticServiceServer(s grpc.ServiceRegistrar, srv CosmeticServiceServer)

Types

type CosmeticServiceClient

type CosmeticServiceClient interface {
	// Sends a greeting
	DeleteCosmetic(ctx context.Context, in *DeleteCosmeticRequest, opts ...grpc.CallOption) (*DeleteCosmeticReply, error)
	UpdateCosmetic(ctx context.Context, in *UpdateCosmeticRequest, opts ...grpc.CallOption) (*UpdateCosmeticReply, error)
	CreateCosmetic(ctx context.Context, in *CreateCosmeticRequest, opts ...grpc.CallOption) (*CreateCosmeticResponse, error)
	// Sends another greeting
	ListCosmetics(ctx context.Context, in *ListCosmeticsRequest, opts ...grpc.CallOption) (*ListCosmeticsResponse, error)
}

CosmeticServiceClient is the client API for CosmeticService 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 CosmeticServiceServer

type CosmeticServiceServer interface {
	// Sends a greeting
	DeleteCosmetic(context.Context, *DeleteCosmeticRequest) (*DeleteCosmeticReply, error)
	UpdateCosmetic(context.Context, *UpdateCosmeticRequest) (*UpdateCosmeticReply, error)
	CreateCosmetic(context.Context, *CreateCosmeticRequest) (*CreateCosmeticResponse, error)
	// Sends another greeting
	ListCosmetics(context.Context, *ListCosmeticsRequest) (*ListCosmeticsResponse, error)
	// contains filtered or unexported methods
}

CosmeticServiceServer is the server API for CosmeticService service. All implementations must embed UnimplementedCosmeticServiceServer for forward compatibility

type Cosmetics

type Cosmetics struct {
	Id          string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
	Name        string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Price       int32  `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"`
	// contains filtered or unexported fields
}

func (*Cosmetics) Descriptor deprecated

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

Deprecated: Use Cosmetics.ProtoReflect.Descriptor instead.

func (*Cosmetics) GetDescription

func (x *Cosmetics) GetDescription() string

func (*Cosmetics) GetId

func (x *Cosmetics) GetId() string

func (*Cosmetics) GetName

func (x *Cosmetics) GetName() string

func (*Cosmetics) GetPrice

func (x *Cosmetics) GetPrice() int32

func (*Cosmetics) ProtoMessage

func (*Cosmetics) ProtoMessage()

func (*Cosmetics) ProtoReflect

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

func (*Cosmetics) Reset

func (x *Cosmetics) Reset()

func (*Cosmetics) String

func (x *Cosmetics) String() string

type CreateCosmeticRequest

type CreateCosmeticRequest struct {
	Name        string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	Price       int32  `protobuf:"varint,3,opt,name=price,proto3" json:"price,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateCosmeticRequest) Descriptor deprecated

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

Deprecated: Use CreateCosmeticRequest.ProtoReflect.Descriptor instead.

func (*CreateCosmeticRequest) GetDescription

func (x *CreateCosmeticRequest) GetDescription() string

func (*CreateCosmeticRequest) GetName

func (x *CreateCosmeticRequest) GetName() string

func (*CreateCosmeticRequest) GetPrice

func (x *CreateCosmeticRequest) GetPrice() int32

func (*CreateCosmeticRequest) ProtoMessage

func (*CreateCosmeticRequest) ProtoMessage()

func (*CreateCosmeticRequest) ProtoReflect

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

func (*CreateCosmeticRequest) Reset

func (x *CreateCosmeticRequest) Reset()

func (*CreateCosmeticRequest) String

func (x *CreateCosmeticRequest) String() string

type CreateCosmeticResponse

type CreateCosmeticResponse struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateCosmeticResponse) Descriptor deprecated

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

Deprecated: Use CreateCosmeticResponse.ProtoReflect.Descriptor instead.

func (*CreateCosmeticResponse) GetMessage

func (x *CreateCosmeticResponse) GetMessage() string

func (*CreateCosmeticResponse) ProtoMessage

func (*CreateCosmeticResponse) ProtoMessage()

func (*CreateCosmeticResponse) ProtoReflect

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

func (*CreateCosmeticResponse) Reset

func (x *CreateCosmeticResponse) Reset()

func (*CreateCosmeticResponse) String

func (x *CreateCosmeticResponse) String() string

type DeleteCosmeticReply

type DeleteCosmeticReply struct {
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteCosmeticReply) Descriptor deprecated

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

Deprecated: Use DeleteCosmeticReply.ProtoReflect.Descriptor instead.

func (*DeleteCosmeticReply) GetMessage

func (x *DeleteCosmeticReply) GetMessage() string

func (*DeleteCosmeticReply) ProtoMessage

func (*DeleteCosmeticReply) ProtoMessage()

func (*DeleteCosmeticReply) ProtoReflect

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

func (*DeleteCosmeticReply) Reset

func (x *DeleteCosmeticReply) Reset()

func (*DeleteCosmeticReply) String

func (x *DeleteCosmeticReply) String() string

type DeleteCosmeticRequest

type DeleteCosmeticRequest struct {
	Uuid string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteCosmeticRequest) Descriptor deprecated

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

Deprecated: Use DeleteCosmeticRequest.ProtoReflect.Descriptor instead.

func (*DeleteCosmeticRequest) GetUuid

func (x *DeleteCosmeticRequest) GetUuid() string

func (*DeleteCosmeticRequest) ProtoMessage

func (*DeleteCosmeticRequest) ProtoMessage()

func (*DeleteCosmeticRequest) ProtoReflect

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

func (*DeleteCosmeticRequest) Reset

func (x *DeleteCosmeticRequest) Reset()

func (*DeleteCosmeticRequest) String

func (x *DeleteCosmeticRequest) String() string

type ListCosmeticsRequest

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

func (*ListCosmeticsRequest) Descriptor deprecated

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

Deprecated: Use ListCosmeticsRequest.ProtoReflect.Descriptor instead.

func (*ListCosmeticsRequest) ProtoMessage

func (*ListCosmeticsRequest) ProtoMessage()

func (*ListCosmeticsRequest) ProtoReflect

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

func (*ListCosmeticsRequest) Reset

func (x *ListCosmeticsRequest) Reset()

func (*ListCosmeticsRequest) String

func (x *ListCosmeticsRequest) String() string

type ListCosmeticsResponse

type ListCosmeticsResponse struct {
	Data []*Cosmetics `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

func (*ListCosmeticsResponse) Descriptor deprecated

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

Deprecated: Use ListCosmeticsResponse.ProtoReflect.Descriptor instead.

func (*ListCosmeticsResponse) GetData

func (x *ListCosmeticsResponse) GetData() []*Cosmetics

func (*ListCosmeticsResponse) ProtoMessage

func (*ListCosmeticsResponse) ProtoMessage()

func (*ListCosmeticsResponse) ProtoReflect

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

func (*ListCosmeticsResponse) Reset

func (x *ListCosmeticsResponse) Reset()

func (*ListCosmeticsResponse) String

func (x *ListCosmeticsResponse) String() string

type UnimplementedCosmeticServiceServer

type UnimplementedCosmeticServiceServer struct {
}

UnimplementedCosmeticServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedCosmeticServiceServer) CreateCosmetic

func (UnimplementedCosmeticServiceServer) DeleteCosmetic

func (UnimplementedCosmeticServiceServer) ListCosmetics

func (UnimplementedCosmeticServiceServer) UpdateCosmetic

type UnsafeCosmeticServiceServer

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

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

type UpdateCosmeticReply

type UpdateCosmeticReply struct {
	Uuid        string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Name        string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Price       int32  `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateCosmeticReply) Descriptor deprecated

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

Deprecated: Use UpdateCosmeticReply.ProtoReflect.Descriptor instead.

func (*UpdateCosmeticReply) GetDescription

func (x *UpdateCosmeticReply) GetDescription() string

func (*UpdateCosmeticReply) GetName

func (x *UpdateCosmeticReply) GetName() string

func (*UpdateCosmeticReply) GetPrice

func (x *UpdateCosmeticReply) GetPrice() int32

func (*UpdateCosmeticReply) GetUuid

func (x *UpdateCosmeticReply) GetUuid() string

func (*UpdateCosmeticReply) ProtoMessage

func (*UpdateCosmeticReply) ProtoMessage()

func (*UpdateCosmeticReply) ProtoReflect

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

func (*UpdateCosmeticReply) Reset

func (x *UpdateCosmeticReply) Reset()

func (*UpdateCosmeticReply) String

func (x *UpdateCosmeticReply) String() string

type UpdateCosmeticRequest

type UpdateCosmeticRequest struct {
	Uuid        string `protobuf:"bytes,1,opt,name=uuid,proto3" json:"uuid,omitempty"`
	Name        string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
	Price       int32  `protobuf:"varint,4,opt,name=price,proto3" json:"price,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateCosmeticRequest) Descriptor deprecated

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

Deprecated: Use UpdateCosmeticRequest.ProtoReflect.Descriptor instead.

func (*UpdateCosmeticRequest) GetDescription

func (x *UpdateCosmeticRequest) GetDescription() string

func (*UpdateCosmeticRequest) GetName

func (x *UpdateCosmeticRequest) GetName() string

func (*UpdateCosmeticRequest) GetPrice

func (x *UpdateCosmeticRequest) GetPrice() int32

func (*UpdateCosmeticRequest) GetUuid

func (x *UpdateCosmeticRequest) GetUuid() string

func (*UpdateCosmeticRequest) ProtoMessage

func (*UpdateCosmeticRequest) ProtoMessage()

func (*UpdateCosmeticRequest) ProtoReflect

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

func (*UpdateCosmeticRequest) Reset

func (x *UpdateCosmeticRequest) Reset()

func (*UpdateCosmeticRequest) String

func (x *UpdateCosmeticRequest) String() string

Jump to

Keyboard shortcuts

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