Documentation ¶
Overview ¶
Package omp_template_api is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterOmpTemplateApiServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterOmpTemplateApiServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OmpTemplateApiServiceClient) error
- func RegisterOmpTemplateApiServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterOmpTemplateApiServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OmpTemplateApiServiceServer) error
- func RegisterOmpTemplateApiServiceServer(s grpc.ServiceRegistrar, srv OmpTemplateApiServiceServer)
- type DescribeTemplateV1Request
- func (*DescribeTemplateV1Request) Descriptor() ([]byte, []int)deprecated
- func (x *DescribeTemplateV1Request) GetTemplateId() uint64
- func (*DescribeTemplateV1Request) ProtoMessage()
- func (x *DescribeTemplateV1Request) ProtoReflect() protoreflect.Message
- func (x *DescribeTemplateV1Request) Reset()
- func (x *DescribeTemplateV1Request) String() string
- func (m *DescribeTemplateV1Request) Validate() error
- type DescribeTemplateV1RequestValidationError
- func (e DescribeTemplateV1RequestValidationError) Cause() error
- func (e DescribeTemplateV1RequestValidationError) Error() string
- func (e DescribeTemplateV1RequestValidationError) ErrorName() string
- func (e DescribeTemplateV1RequestValidationError) Field() string
- func (e DescribeTemplateV1RequestValidationError) Key() bool
- func (e DescribeTemplateV1RequestValidationError) Reason() string
- type DescribeTemplateV1Response
- func (*DescribeTemplateV1Response) Descriptor() ([]byte, []int)deprecated
- func (x *DescribeTemplateV1Response) GetValue() *Template
- func (*DescribeTemplateV1Response) ProtoMessage()
- func (x *DescribeTemplateV1Response) ProtoReflect() protoreflect.Message
- func (x *DescribeTemplateV1Response) Reset()
- func (x *DescribeTemplateV1Response) String() string
- func (m *DescribeTemplateV1Response) Validate() error
- type DescribeTemplateV1ResponseValidationError
- func (e DescribeTemplateV1ResponseValidationError) Cause() error
- func (e DescribeTemplateV1ResponseValidationError) Error() string
- func (e DescribeTemplateV1ResponseValidationError) ErrorName() string
- func (e DescribeTemplateV1ResponseValidationError) Field() string
- func (e DescribeTemplateV1ResponseValidationError) Key() bool
- func (e DescribeTemplateV1ResponseValidationError) Reason() string
- type OmpTemplateApiServiceClient
- type OmpTemplateApiServiceServer
- type Template
- func (*Template) Descriptor() ([]byte, []int)deprecated
- func (x *Template) GetCreated() *timestamppb.Timestamp
- func (x *Template) GetFoo() uint64
- func (x *Template) GetId() uint64
- func (*Template) ProtoMessage()
- func (x *Template) ProtoReflect() protoreflect.Message
- func (x *Template) Reset()
- func (x *Template) String() string
- func (m *Template) Validate() error
- type TemplateValidationError
- type UnimplementedOmpTemplateApiServiceServer
- type UnsafeOmpTemplateApiServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_ozonmp_omp_template_api_v1_omp_template_api_proto protoreflect.FileDescriptor
var OmpTemplateApiService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ozonmp.omp_template_api.v1.OmpTemplateApiService", HandlerType: (*OmpTemplateApiServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "DescribeTemplateV1", Handler: _OmpTemplateApiService_DescribeTemplateV1_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "ozonmp/omp_template_api/v1/omp_template_api.proto", }
OmpTemplateApiService_ServiceDesc is the grpc.ServiceDesc for OmpTemplateApiService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOmpTemplateApiServiceHandler ¶
func RegisterOmpTemplateApiServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterOmpTemplateApiServiceHandler registers the http handlers for service OmpTemplateApiService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterOmpTemplateApiServiceHandlerClient ¶
func RegisterOmpTemplateApiServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client OmpTemplateApiServiceClient) error
RegisterOmpTemplateApiServiceHandlerClient registers the http handlers for service OmpTemplateApiService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "OmpTemplateApiServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "OmpTemplateApiServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "OmpTemplateApiServiceClient" to call the correct interceptors.
func RegisterOmpTemplateApiServiceHandlerFromEndpoint ¶
func RegisterOmpTemplateApiServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterOmpTemplateApiServiceHandlerFromEndpoint is same as RegisterOmpTemplateApiServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterOmpTemplateApiServiceHandlerServer ¶
func RegisterOmpTemplateApiServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server OmpTemplateApiServiceServer) error
RegisterOmpTemplateApiServiceHandlerServer registers the http handlers for service OmpTemplateApiService to "mux". UnaryRPC :call OmpTemplateApiServiceServer 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 RegisterOmpTemplateApiServiceHandlerFromEndpoint instead.
func RegisterOmpTemplateApiServiceServer ¶
func RegisterOmpTemplateApiServiceServer(s grpc.ServiceRegistrar, srv OmpTemplateApiServiceServer)
Types ¶
type DescribeTemplateV1Request ¶
type DescribeTemplateV1Request struct { TemplateId uint64 `protobuf:"varint,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"` // contains filtered or unexported fields }
func (*DescribeTemplateV1Request) Descriptor
deprecated
func (*DescribeTemplateV1Request) Descriptor() ([]byte, []int)
Deprecated: Use DescribeTemplateV1Request.ProtoReflect.Descriptor instead.
func (*DescribeTemplateV1Request) GetTemplateId ¶
func (x *DescribeTemplateV1Request) GetTemplateId() uint64
func (*DescribeTemplateV1Request) ProtoMessage ¶
func (*DescribeTemplateV1Request) ProtoMessage()
func (*DescribeTemplateV1Request) ProtoReflect ¶
func (x *DescribeTemplateV1Request) ProtoReflect() protoreflect.Message
func (*DescribeTemplateV1Request) Reset ¶
func (x *DescribeTemplateV1Request) Reset()
func (*DescribeTemplateV1Request) String ¶
func (x *DescribeTemplateV1Request) String() string
func (*DescribeTemplateV1Request) Validate ¶
func (m *DescribeTemplateV1Request) Validate() error
Validate checks the field values on DescribeTemplateV1Request with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type DescribeTemplateV1RequestValidationError ¶
type DescribeTemplateV1RequestValidationError struct {
// contains filtered or unexported fields
}
DescribeTemplateV1RequestValidationError is the validation error returned by DescribeTemplateV1Request.Validate if the designated constraints aren't met.
func (DescribeTemplateV1RequestValidationError) Cause ¶
func (e DescribeTemplateV1RequestValidationError) Cause() error
Cause function returns cause value.
func (DescribeTemplateV1RequestValidationError) Error ¶
func (e DescribeTemplateV1RequestValidationError) Error() string
Error satisfies the builtin error interface
func (DescribeTemplateV1RequestValidationError) ErrorName ¶
func (e DescribeTemplateV1RequestValidationError) ErrorName() string
ErrorName returns error name.
func (DescribeTemplateV1RequestValidationError) Field ¶
func (e DescribeTemplateV1RequestValidationError) Field() string
Field function returns field value.
func (DescribeTemplateV1RequestValidationError) Key ¶
func (e DescribeTemplateV1RequestValidationError) Key() bool
Key function returns key value.
func (DescribeTemplateV1RequestValidationError) Reason ¶
func (e DescribeTemplateV1RequestValidationError) Reason() string
Reason function returns reason value.
type DescribeTemplateV1Response ¶
type DescribeTemplateV1Response struct { Value *Template `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // contains filtered or unexported fields }
func (*DescribeTemplateV1Response) Descriptor
deprecated
func (*DescribeTemplateV1Response) Descriptor() ([]byte, []int)
Deprecated: Use DescribeTemplateV1Response.ProtoReflect.Descriptor instead.
func (*DescribeTemplateV1Response) GetValue ¶
func (x *DescribeTemplateV1Response) GetValue() *Template
func (*DescribeTemplateV1Response) ProtoMessage ¶
func (*DescribeTemplateV1Response) ProtoMessage()
func (*DescribeTemplateV1Response) ProtoReflect ¶
func (x *DescribeTemplateV1Response) ProtoReflect() protoreflect.Message
func (*DescribeTemplateV1Response) Reset ¶
func (x *DescribeTemplateV1Response) Reset()
func (*DescribeTemplateV1Response) String ¶
func (x *DescribeTemplateV1Response) String() string
func (*DescribeTemplateV1Response) Validate ¶
func (m *DescribeTemplateV1Response) Validate() error
Validate checks the field values on DescribeTemplateV1Response with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.
type DescribeTemplateV1ResponseValidationError ¶
type DescribeTemplateV1ResponseValidationError struct {
// contains filtered or unexported fields
}
DescribeTemplateV1ResponseValidationError is the validation error returned by DescribeTemplateV1Response.Validate if the designated constraints aren't met.
func (DescribeTemplateV1ResponseValidationError) Cause ¶
func (e DescribeTemplateV1ResponseValidationError) Cause() error
Cause function returns cause value.
func (DescribeTemplateV1ResponseValidationError) Error ¶
func (e DescribeTemplateV1ResponseValidationError) Error() string
Error satisfies the builtin error interface
func (DescribeTemplateV1ResponseValidationError) ErrorName ¶
func (e DescribeTemplateV1ResponseValidationError) ErrorName() string
ErrorName returns error name.
func (DescribeTemplateV1ResponseValidationError) Field ¶
func (e DescribeTemplateV1ResponseValidationError) Field() string
Field function returns field value.
func (DescribeTemplateV1ResponseValidationError) Key ¶
func (e DescribeTemplateV1ResponseValidationError) Key() bool
Key function returns key value.
func (DescribeTemplateV1ResponseValidationError) Reason ¶
func (e DescribeTemplateV1ResponseValidationError) Reason() string
Reason function returns reason value.
type OmpTemplateApiServiceClient ¶
type OmpTemplateApiServiceClient interface { // DescribeTemplateV1 - Describe a template DescribeTemplateV1(ctx context.Context, in *DescribeTemplateV1Request, opts ...grpc.CallOption) (*DescribeTemplateV1Response, error) }
OmpTemplateApiServiceClient is the client API for OmpTemplateApiService 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 NewOmpTemplateApiServiceClient ¶
func NewOmpTemplateApiServiceClient(cc grpc.ClientConnInterface) OmpTemplateApiServiceClient
type OmpTemplateApiServiceServer ¶
type OmpTemplateApiServiceServer interface { // DescribeTemplateV1 - Describe a template DescribeTemplateV1(context.Context, *DescribeTemplateV1Request) (*DescribeTemplateV1Response, error) // contains filtered or unexported methods }
OmpTemplateApiServiceServer is the server API for OmpTemplateApiService service. All implementations must embed UnimplementedOmpTemplateApiServiceServer for forward compatibility
type Template ¶
type Template struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Foo uint64 `protobuf:"varint,2,opt,name=foo,proto3" json:"foo,omitempty"` Created *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=created,proto3" json:"created,omitempty"` // contains filtered or unexported fields }
func (*Template) Descriptor
deprecated
func (*Template) GetCreated ¶
func (x *Template) GetCreated() *timestamppb.Timestamp
func (*Template) ProtoMessage ¶
func (*Template) ProtoMessage()
func (*Template) ProtoReflect ¶
func (x *Template) ProtoReflect() protoreflect.Message
type TemplateValidationError ¶
type TemplateValidationError struct {
// contains filtered or unexported fields
}
TemplateValidationError is the validation error returned by Template.Validate if the designated constraints aren't met.
func (TemplateValidationError) Cause ¶
func (e TemplateValidationError) Cause() error
Cause function returns cause value.
func (TemplateValidationError) Error ¶
func (e TemplateValidationError) Error() string
Error satisfies the builtin error interface
func (TemplateValidationError) ErrorName ¶
func (e TemplateValidationError) ErrorName() string
ErrorName returns error name.
func (TemplateValidationError) Field ¶
func (e TemplateValidationError) Field() string
Field function returns field value.
func (TemplateValidationError) Key ¶
func (e TemplateValidationError) Key() bool
Key function returns key value.
func (TemplateValidationError) Reason ¶
func (e TemplateValidationError) Reason() string
Reason function returns reason value.
type UnimplementedOmpTemplateApiServiceServer ¶
type UnimplementedOmpTemplateApiServiceServer struct { }
UnimplementedOmpTemplateApiServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedOmpTemplateApiServiceServer) DescribeTemplateV1 ¶
func (UnimplementedOmpTemplateApiServiceServer) DescribeTemplateV1(context.Context, *DescribeTemplateV1Request) (*DescribeTemplateV1Response, error)
type UnsafeOmpTemplateApiServiceServer ¶
type UnsafeOmpTemplateApiServiceServer interface {
// contains filtered or unexported methods
}
UnsafeOmpTemplateApiServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OmpTemplateApiServiceServer will result in compilation errors.