examplev1alpha1

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: GPL-3.0 Imports: 29 Imported by: 0

Documentation

Overview

Package examplev1alpha1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

View Source
var (
	Example_Gender_name = map[int32]string{
		0: "UNSPECIFIED",
		1: "MALE",
		2: "FEMALE",
	}
	Example_Gender_value = map[string]int32{
		"UNSPECIFIED": 0,
		"MALE":        1,
		"FEMALE":      2,
	}
)

Enum value maps for Example_Gender.

View Source
var File_example_v1alpha1_example_proto protoreflect.FileDescriptor

Functions

func RegisterExampleServiceHandler

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

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

func RegisterExampleServiceHandlerClient

func RegisterExampleServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ExampleServiceClient) error

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

func RegisterExampleServiceHandlerFromEndpoint

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

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

func RegisterExampleServiceHandlerServer

func RegisterExampleServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ExampleServiceServer) error

RegisterExampleServiceHandlerServer registers the http handlers for service ExampleService to "mux". UnaryRPC :call ExampleServiceServer 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 RegisterExampleServiceHandlerFromEndpoint instead.

func RegisterExampleServiceServer

func RegisterExampleServiceServer(s *grpc.Server, srv ExampleServiceServer)

Types

type Example

type Example struct {

	// The unique identifier of the example.
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// The gender of the example
	Gender Example_Gender `protobuf:"varint,2,opt,name=gender,proto3,enum=example.v1alpha1.Example_Gender" json:"gender,omitempty"`
	// The date of purchase of the example
	PurchaseDate string `protobuf:"bytes,3,opt,name=purchase_date,json=purchaseDate,proto3" json:"purchase_date,omitempty"`
	// contains filtered or unexported fields
}

func (*Example) Descriptor deprecated

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

Deprecated: Use Example.ProtoReflect.Descriptor instead.

func (*Example) GetGender

func (x *Example) GetGender() Example_Gender

func (*Example) GetId

func (x *Example) GetId() int32

func (*Example) GetPurchaseDate

func (x *Example) GetPurchaseDate() string

func (*Example) ProtoMessage

func (*Example) ProtoMessage()

func (*Example) ProtoReflect

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

func (*Example) Reset

func (x *Example) Reset()

func (*Example) String

func (x *Example) String() string

func (*Example) Validate

func (m *Example) Validate() error

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

type ExampleDeleteRequest

type ExampleDeleteRequest struct {

	// The unique identifier of the change.
	Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*ExampleDeleteRequest) Descriptor deprecated

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

Deprecated: Use ExampleDeleteRequest.ProtoReflect.Descriptor instead.

func (*ExampleDeleteRequest) GetId

func (x *ExampleDeleteRequest) GetId() int32

func (*ExampleDeleteRequest) ProtoMessage

func (*ExampleDeleteRequest) ProtoMessage()

func (*ExampleDeleteRequest) ProtoReflect

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

func (*ExampleDeleteRequest) Reset

func (x *ExampleDeleteRequest) Reset()

func (*ExampleDeleteRequest) String

func (x *ExampleDeleteRequest) String() string

func (*ExampleDeleteRequest) Validate

func (m *ExampleDeleteRequest) Validate() error

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

type ExampleDeleteRequestValidationError

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

ExampleDeleteRequestValidationError is the validation error returned by ExampleDeleteRequest.Validate if the designated constraints aren't met.

func (ExampleDeleteRequestValidationError) Cause

Cause function returns cause value.

func (ExampleDeleteRequestValidationError) Error

Error satisfies the builtin error interface

func (ExampleDeleteRequestValidationError) ErrorName

ErrorName returns error name.

func (ExampleDeleteRequestValidationError) Field

Field function returns field value.

func (ExampleDeleteRequestValidationError) Key

Key function returns key value.

func (ExampleDeleteRequestValidationError) Reason

Reason function returns reason value.

type ExampleDeleteResponse

type ExampleDeleteResponse struct {

	// The deleted example
	Example *Example `protobuf:"bytes,1,opt,name=example,proto3" json:"example,omitempty"`
	// contains filtered or unexported fields
}

func (*ExampleDeleteResponse) Descriptor deprecated

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

Deprecated: Use ExampleDeleteResponse.ProtoReflect.Descriptor instead.

func (*ExampleDeleteResponse) GetExample

func (x *ExampleDeleteResponse) GetExample() *Example

func (*ExampleDeleteResponse) ProtoMessage

func (*ExampleDeleteResponse) ProtoMessage()

func (*ExampleDeleteResponse) ProtoReflect

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

func (*ExampleDeleteResponse) Reset

func (x *ExampleDeleteResponse) Reset()

func (*ExampleDeleteResponse) String

func (x *ExampleDeleteResponse) String() string

func (*ExampleDeleteResponse) Validate

func (m *ExampleDeleteResponse) Validate() error

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

type ExampleDeleteResponseValidationError

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

ExampleDeleteResponseValidationError is the validation error returned by ExampleDeleteResponse.Validate if the designated constraints aren't met.

func (ExampleDeleteResponseValidationError) Cause

Cause function returns cause value.

func (ExampleDeleteResponseValidationError) Error

Error satisfies the builtin error interface

func (ExampleDeleteResponseValidationError) ErrorName

ErrorName returns error name.

func (ExampleDeleteResponseValidationError) Field

Field function returns field value.

func (ExampleDeleteResponseValidationError) Key

Key function returns key value.

func (ExampleDeleteResponseValidationError) Reason

Reason function returns reason value.

type ExampleGetRequest

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

func (*ExampleGetRequest) Descriptor deprecated

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

Deprecated: Use ExampleGetRequest.ProtoReflect.Descriptor instead.

func (*ExampleGetRequest) ProtoMessage

func (*ExampleGetRequest) ProtoMessage()

func (*ExampleGetRequest) ProtoReflect

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

func (*ExampleGetRequest) Reset

func (x *ExampleGetRequest) Reset()

func (*ExampleGetRequest) String

func (x *ExampleGetRequest) String() string

func (*ExampleGetRequest) Validate

func (m *ExampleGetRequest) Validate() error

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

type ExampleGetRequestValidationError

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

ExampleGetRequestValidationError is the validation error returned by ExampleGetRequest.Validate if the designated constraints aren't met.

func (ExampleGetRequestValidationError) Cause

Cause function returns cause value.

func (ExampleGetRequestValidationError) Error

Error satisfies the builtin error interface

func (ExampleGetRequestValidationError) ErrorName

ErrorName returns error name.

func (ExampleGetRequestValidationError) Field

Field function returns field value.

func (ExampleGetRequestValidationError) Key

Key function returns key value.

func (ExampleGetRequestValidationError) Reason

Reason function returns reason value.

type ExampleGetResponse

type ExampleGetResponse struct {

	// The list of example
	Example []*Example `protobuf:"bytes,1,rep,name=example,proto3" json:"example,omitempty"`
	// contains filtered or unexported fields
}

func (*ExampleGetResponse) Descriptor deprecated

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

Deprecated: Use ExampleGetResponse.ProtoReflect.Descriptor instead.

func (*ExampleGetResponse) GetExample

func (x *ExampleGetResponse) GetExample() []*Example

func (*ExampleGetResponse) ProtoMessage

func (*ExampleGetResponse) ProtoMessage()

func (*ExampleGetResponse) ProtoReflect

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

func (*ExampleGetResponse) Reset

func (x *ExampleGetResponse) Reset()

func (*ExampleGetResponse) String

func (x *ExampleGetResponse) String() string

func (*ExampleGetResponse) Validate

func (m *ExampleGetResponse) Validate() error

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

type ExampleGetResponseValidationError

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

ExampleGetResponseValidationError is the validation error returned by ExampleGetResponse.Validate if the designated constraints aren't met.

func (ExampleGetResponseValidationError) Cause

Cause function returns cause value.

func (ExampleGetResponseValidationError) Error

Error satisfies the builtin error interface

func (ExampleGetResponseValidationError) ErrorName

ErrorName returns error name.

func (ExampleGetResponseValidationError) Field

Field function returns field value.

func (ExampleGetResponseValidationError) Key

Key function returns key value.

func (ExampleGetResponseValidationError) Reason

Reason function returns reason value.

type ExamplePostRequest

type ExamplePostRequest struct {

	// The example to add
	Example *Example `protobuf:"bytes,1,opt,name=example,proto3" json:"example,omitempty"`
	// contains filtered or unexported fields
}

func (*ExamplePostRequest) Descriptor deprecated

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

Deprecated: Use ExamplePostRequest.ProtoReflect.Descriptor instead.

func (*ExamplePostRequest) GetExample

func (x *ExamplePostRequest) GetExample() *Example

func (*ExamplePostRequest) ProtoMessage

func (*ExamplePostRequest) ProtoMessage()

func (*ExamplePostRequest) ProtoReflect

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

func (*ExamplePostRequest) Reset

func (x *ExamplePostRequest) Reset()

func (*ExamplePostRequest) String

func (x *ExamplePostRequest) String() string

func (*ExamplePostRequest) Validate

func (m *ExamplePostRequest) Validate() error

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

type ExamplePostRequestValidationError

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

ExamplePostRequestValidationError is the validation error returned by ExamplePostRequest.Validate if the designated constraints aren't met.

func (ExamplePostRequestValidationError) Cause

Cause function returns cause value.

func (ExamplePostRequestValidationError) Error

Error satisfies the builtin error interface

func (ExamplePostRequestValidationError) ErrorName

ErrorName returns error name.

func (ExamplePostRequestValidationError) Field

Field function returns field value.

func (ExamplePostRequestValidationError) Key

Key function returns key value.

func (ExamplePostRequestValidationError) Reason

Reason function returns reason value.

type ExamplePostResponse

type ExamplePostResponse struct {

	// The added example
	Example *Example `protobuf:"bytes,1,opt,name=example,proto3" json:"example,omitempty"`
	// contains filtered or unexported fields
}

func (*ExamplePostResponse) Descriptor deprecated

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

Deprecated: Use ExamplePostResponse.ProtoReflect.Descriptor instead.

func (*ExamplePostResponse) GetExample

func (x *ExamplePostResponse) GetExample() *Example

func (*ExamplePostResponse) ProtoMessage

func (*ExamplePostResponse) ProtoMessage()

func (*ExamplePostResponse) ProtoReflect

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

func (*ExamplePostResponse) Reset

func (x *ExamplePostResponse) Reset()

func (*ExamplePostResponse) String

func (x *ExamplePostResponse) String() string

func (*ExamplePostResponse) Validate

func (m *ExamplePostResponse) Validate() error

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

type ExamplePostResponseValidationError

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

ExamplePostResponseValidationError is the validation error returned by ExamplePostResponse.Validate if the designated constraints aren't met.

func (ExamplePostResponseValidationError) Cause

Cause function returns cause value.

func (ExamplePostResponseValidationError) Error

Error satisfies the builtin error interface

func (ExamplePostResponseValidationError) ErrorName

ErrorName returns error name.

func (ExamplePostResponseValidationError) Field

Field function returns field value.

func (ExamplePostResponseValidationError) Key

Key function returns key value.

func (ExamplePostResponseValidationError) Reason

Reason function returns reason value.

type ExampleServiceClient

type ExampleServiceClient interface {
	// Heartbeat
	//
	// Provides information about the service health
	Heartbeat(ctx context.Context, in *HeartbeatRequest, opts ...grpc.CallOption) (*HeartbeatResponse, error)
	// ExamplePost
	//
	// Sets up a POST endpoint
	ExamplePost(ctx context.Context, in *ExamplePostRequest, opts ...grpc.CallOption) (*ExamplePostResponse, error)
	// ExampleGet
	//
	// Sets up a GET endpoint
	ExampleGet(ctx context.Context, in *ExampleGetRequest, opts ...grpc.CallOption) (*ExampleGetResponse, error)
	// ExampleDelete
	//
	// Sets up a DELETE endpoint
	ExampleDelete(ctx context.Context, in *ExampleDeleteRequest, opts ...grpc.CallOption) (*ExampleDeleteResponse, error)
}

ExampleServiceClient is the client API for ExampleService 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 ExampleServiceServer

type ExampleServiceServer interface {
	// Heartbeat
	//
	// Provides information about the service health
	Heartbeat(context.Context, *HeartbeatRequest) (*HeartbeatResponse, error)
	// ExamplePost
	//
	// Sets up a POST endpoint
	ExamplePost(context.Context, *ExamplePostRequest) (*ExamplePostResponse, error)
	// ExampleGet
	//
	// Sets up a GET endpoint
	ExampleGet(context.Context, *ExampleGetRequest) (*ExampleGetResponse, error)
	// ExampleDelete
	//
	// Sets up a DELETE endpoint
	ExampleDelete(context.Context, *ExampleDeleteRequest) (*ExampleDeleteResponse, error)
}

ExampleServiceServer is the server API for ExampleService service. All implementations should embed UnimplementedExampleServiceServer for forward compatibility

type ExampleValidationError

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

ExampleValidationError is the validation error returned by Example.Validate if the designated constraints aren't met.

func (ExampleValidationError) Cause

func (e ExampleValidationError) Cause() error

Cause function returns cause value.

func (ExampleValidationError) Error

func (e ExampleValidationError) Error() string

Error satisfies the builtin error interface

func (ExampleValidationError) ErrorName

func (e ExampleValidationError) ErrorName() string

ErrorName returns error name.

func (ExampleValidationError) Field

func (e ExampleValidationError) Field() string

Field function returns field value.

func (ExampleValidationError) Key

func (e ExampleValidationError) Key() bool

Key function returns key value.

func (ExampleValidationError) Reason

func (e ExampleValidationError) Reason() string

Reason function returns reason value.

type Example_Gender

type Example_Gender int32
const (
	Example_UNSPECIFIED Example_Gender = 0
	Example_MALE        Example_Gender = 1
	Example_FEMALE      Example_Gender = 2
)

func (Example_Gender) Descriptor

func (Example_Gender) Enum

func (x Example_Gender) Enum() *Example_Gender

func (Example_Gender) EnumDescriptor deprecated

func (Example_Gender) EnumDescriptor() ([]byte, []int)

Deprecated: Use Example_Gender.Descriptor instead.

func (Example_Gender) Number

func (Example_Gender) String

func (x Example_Gender) String() string

func (Example_Gender) Type

type HeartbeatRequest

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

func (*HeartbeatRequest) Descriptor deprecated

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

Deprecated: Use HeartbeatRequest.ProtoReflect.Descriptor instead.

func (*HeartbeatRequest) ProtoMessage

func (*HeartbeatRequest) ProtoMessage()

func (*HeartbeatRequest) ProtoReflect

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

func (*HeartbeatRequest) Reset

func (x *HeartbeatRequest) Reset()

func (*HeartbeatRequest) String

func (x *HeartbeatRequest) String() string

func (*HeartbeatRequest) Validate

func (m *HeartbeatRequest) Validate() error

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

type HeartbeatRequestValidationError

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

HeartbeatRequestValidationError is the validation error returned by HeartbeatRequest.Validate if the designated constraints aren't met.

func (HeartbeatRequestValidationError) Cause

Cause function returns cause value.

func (HeartbeatRequestValidationError) Error

Error satisfies the builtin error interface

func (HeartbeatRequestValidationError) ErrorName

ErrorName returns error name.

func (HeartbeatRequestValidationError) Field

Field function returns field value.

func (HeartbeatRequestValidationError) Key

Key function returns key value.

func (HeartbeatRequestValidationError) Reason

Reason function returns reason value.

type HeartbeatResponse

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

func (*HeartbeatResponse) Descriptor deprecated

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

Deprecated: Use HeartbeatResponse.ProtoReflect.Descriptor instead.

func (*HeartbeatResponse) ProtoMessage

func (*HeartbeatResponse) ProtoMessage()

func (*HeartbeatResponse) ProtoReflect

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

func (*HeartbeatResponse) Reset

func (x *HeartbeatResponse) Reset()

func (*HeartbeatResponse) String

func (x *HeartbeatResponse) String() string

func (*HeartbeatResponse) Validate

func (m *HeartbeatResponse) Validate() error

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

type HeartbeatResponseValidationError

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

HeartbeatResponseValidationError is the validation error returned by HeartbeatResponse.Validate if the designated constraints aren't met.

func (HeartbeatResponseValidationError) Cause

Cause function returns cause value.

func (HeartbeatResponseValidationError) Error

Error satisfies the builtin error interface

func (HeartbeatResponseValidationError) ErrorName

ErrorName returns error name.

func (HeartbeatResponseValidationError) Field

Field function returns field value.

func (HeartbeatResponseValidationError) Key

Key function returns key value.

func (HeartbeatResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedExampleServiceServer

type UnimplementedExampleServiceServer struct {
}

UnimplementedExampleServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedExampleServiceServer) ExampleDelete

func (UnimplementedExampleServiceServer) ExampleGet

func (UnimplementedExampleServiceServer) ExamplePost

func (UnimplementedExampleServiceServer) Heartbeat

type UnsafeExampleServiceServer

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

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

Jump to

Keyboard shortcuts

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