omp_template_api

package module
v0.0.0-...-11bb767 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package omp_template_api is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var File_ozonmp_omp_template_api_v1_omp_template_api_proto protoreflect.FileDescriptor
View Source
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 (*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

Cause function returns cause value.

func (DescribeTemplateV1RequestValidationError) Error

Error satisfies the builtin error interface

func (DescribeTemplateV1RequestValidationError) ErrorName

ErrorName returns error name.

func (DescribeTemplateV1RequestValidationError) Field

Field function returns field value.

func (DescribeTemplateV1RequestValidationError) Key

Key function returns key value.

func (DescribeTemplateV1RequestValidationError) Reason

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 (*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

Cause function returns cause value.

func (DescribeTemplateV1ResponseValidationError) Error

Error satisfies the builtin error interface

func (DescribeTemplateV1ResponseValidationError) ErrorName

ErrorName returns error name.

func (DescribeTemplateV1ResponseValidationError) Field

Field function returns field value.

func (DescribeTemplateV1ResponseValidationError) Key

Key function returns key value.

func (DescribeTemplateV1ResponseValidationError) Reason

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use Template.ProtoReflect.Descriptor instead.

func (*Template) GetCreated

func (x *Template) GetCreated() *timestamppb.Timestamp

func (*Template) GetFoo

func (x *Template) GetFoo() uint64

func (*Template) GetId

func (x *Template) GetId() uint64

func (*Template) ProtoMessage

func (*Template) ProtoMessage()

func (*Template) ProtoReflect

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

func (*Template) Reset

func (x *Template) Reset()

func (*Template) String

func (x *Template) String() string

func (*Template) Validate

func (m *Template) Validate() error

Validate checks the field values on Template with the rules defined in the proto definition for this message. If any rules are violated, an error is returned.

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

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.

Jump to

Keyboard shortcuts

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