helloworld

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GreeterService_SayHello_FullMethodName = "/helloworld.v1.GreeterService/SayHello"
)
View Source
const GreeterService_SayHello_OperationName = "/helloworld.v1.GreeterService/SayHello"
View Source
const OperationGreeterServiceSayHello = "/helloworld.v1.GreeterService/SayHello"

Variables

View Source
var File_helloworld_v1_helloworld_proto protoreflect.FileDescriptor
View Source
var GreeterService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "helloworld.v1.GreeterService",
	HandlerType: (*GreeterServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SayHello",
			Handler:    _GreeterService_SayHello_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "helloworld/v1/helloworld.proto",
}

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

Functions

func RegisterGreeterServiceGINSServer added in v0.0.11

func RegisterGreeterServiceGINSServer(router gin.IRouter, srv GreeterServiceGINSServer)

func RegisterGreeterServiceHTTPServer

func RegisterGreeterServiceHTTPServer(s *http.Server, srv GreeterServiceHTTPServer)

func RegisterGreeterServiceServer

func RegisterGreeterServiceServer(s grpc.ServiceRegistrar, srv GreeterServiceServer)

Types

type ExampleCors added in v0.0.11

type ExampleCors struct {
	Cors *config.CorsConfig `protobuf:"bytes,1,opt,name=cors,proto3" json:"cors,omitempty"`
	// contains filtered or unexported fields
}

func (*ExampleCors) Descriptor deprecated added in v0.0.11

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

Deprecated: Use ExampleCors.ProtoReflect.Descriptor instead.

func (*ExampleCors) GetCors added in v0.0.11

func (x *ExampleCors) GetCors() *config.CorsConfig

func (*ExampleCors) ProtoMessage added in v0.0.11

func (*ExampleCors) ProtoMessage()

func (*ExampleCors) ProtoReflect added in v0.0.11

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

func (*ExampleCors) Reset added in v0.0.11

func (x *ExampleCors) Reset()

func (*ExampleCors) String added in v0.0.11

func (x *ExampleCors) String() string

func (*ExampleCors) Validate added in v0.0.11

func (m *ExampleCors) Validate() error

Validate checks the field values on ExampleCors with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*ExampleCors) ValidateAll added in v0.0.11

func (m *ExampleCors) ValidateAll() error

ValidateAll checks the field values on ExampleCors with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ExampleCorsMultiError, or nil if none found.

type ExampleCorsMultiError added in v0.0.11

type ExampleCorsMultiError []error

ExampleCorsMultiError is an error wrapping multiple validation errors returned by ExampleCors.ValidateAll() if the designated constraints aren't met.

func (ExampleCorsMultiError) AllErrors added in v0.0.11

func (m ExampleCorsMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (ExampleCorsMultiError) Error added in v0.0.11

func (m ExampleCorsMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type ExampleCorsValidationError added in v0.0.11

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

ExampleCorsValidationError is the validation error returned by ExampleCors.Validate if the designated constraints aren't met.

func (ExampleCorsValidationError) Cause added in v0.0.11

Cause function returns cause value.

func (ExampleCorsValidationError) Error added in v0.0.11

Error satisfies the builtin error interface

func (ExampleCorsValidationError) ErrorName added in v0.0.11

func (e ExampleCorsValidationError) ErrorName() string

ErrorName returns error name.

func (ExampleCorsValidationError) Field added in v0.0.11

Field function returns field value.

func (ExampleCorsValidationError) Key added in v0.0.11

Key function returns key value.

func (ExampleCorsValidationError) Reason added in v0.0.11

Reason function returns reason value.

type GreeterServiceClient

type GreeterServiceClient interface {
	// Sends a greeting
	SayHello(ctx context.Context, in *SayHelloRequest, opts ...grpc.CallOption) (*SayHelloResponse, error)
}

GreeterServiceClient is the client API for GreeterService 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.

The greeting service definition.

type GreeterServiceGINSClient added in v0.0.11

type GreeterServiceGINSClient interface {
	SayHello(ctx context.Context, req *SayHelloRequest, opts ...gins.CallOption) (rsp *SayHelloResponse, err error)
}

func NewGreeterServiceGINSClient added in v0.0.11

func NewGreeterServiceGINSClient(client *gins.Client) GreeterServiceGINSClient

type GreeterServiceGINSClientImpl added in v0.0.11

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

func (*GreeterServiceGINSClientImpl) SayHello added in v0.0.11

type GreeterServiceGINSServer added in v0.0.11

type GreeterServiceGINSServer interface {
	// SayHello Sends a greeting
	SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error)
}

type GreeterServiceHTTPClient

type GreeterServiceHTTPClient interface {
	SayHello(ctx context.Context, req *SayHelloRequest, opts ...http.CallOption) (rsp *SayHelloResponse, err error)
}

func NewGreeterServiceHTTPClient

func NewGreeterServiceHTTPClient(client *http.Client) GreeterServiceHTTPClient

type GreeterServiceHTTPClientImpl

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

func (*GreeterServiceHTTPClientImpl) SayHello

type GreeterServiceHTTPServer

type GreeterServiceHTTPServer interface {
	// SayHello Sends a greeting
	SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error)
}

type GreeterServiceServer

type GreeterServiceServer interface {
	// Sends a greeting
	SayHello(context.Context, *SayHelloRequest) (*SayHelloResponse, error)
	// contains filtered or unexported methods
}

GreeterServiceServer is the server API for GreeterService service. All implementations must embed UnimplementedGreeterServiceServer for forward compatibility.

The greeting service definition.

type SayHelloRequest

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

The request message containing the user's name.

func (*SayHelloRequest) Descriptor deprecated

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

Deprecated: Use SayHelloRequest.ProtoReflect.Descriptor instead.

func (*SayHelloRequest) GetName

func (x *SayHelloRequest) GetName() string

func (*SayHelloRequest) ProtoMessage

func (*SayHelloRequest) ProtoMessage()

func (*SayHelloRequest) ProtoReflect

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

func (*SayHelloRequest) Reset

func (x *SayHelloRequest) Reset()

func (*SayHelloRequest) String

func (x *SayHelloRequest) String() string

func (*SayHelloRequest) Validate

func (m *SayHelloRequest) Validate() error

Validate checks the field values on SayHelloRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SayHelloRequest) ValidateAll

func (m *SayHelloRequest) ValidateAll() error

ValidateAll checks the field values on SayHelloRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SayHelloRequestMultiError, or nil if none found.

type SayHelloRequestMultiError

type SayHelloRequestMultiError []error

SayHelloRequestMultiError is an error wrapping multiple validation errors returned by SayHelloRequest.ValidateAll() if the designated constraints aren't met.

func (SayHelloRequestMultiError) AllErrors

func (m SayHelloRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SayHelloRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type SayHelloRequestValidationError

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

SayHelloRequestValidationError is the validation error returned by SayHelloRequest.Validate if the designated constraints aren't met.

func (SayHelloRequestValidationError) Cause

Cause function returns cause value.

func (SayHelloRequestValidationError) Error

Error satisfies the builtin error interface

func (SayHelloRequestValidationError) ErrorName

func (e SayHelloRequestValidationError) ErrorName() string

ErrorName returns error name.

func (SayHelloRequestValidationError) Field

Field function returns field value.

func (SayHelloRequestValidationError) Key

Key function returns key value.

func (SayHelloRequestValidationError) Reason

Reason function returns reason value.

type SayHelloResponse

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

The response message containing the greetings

func (*SayHelloResponse) Descriptor deprecated

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

Deprecated: Use SayHelloResponse.ProtoReflect.Descriptor instead.

func (*SayHelloResponse) GetMessage

func (x *SayHelloResponse) GetMessage() string

func (*SayHelloResponse) ProtoMessage

func (*SayHelloResponse) ProtoMessage()

func (*SayHelloResponse) ProtoReflect

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

func (*SayHelloResponse) Reset

func (x *SayHelloResponse) Reset()

func (*SayHelloResponse) String

func (x *SayHelloResponse) String() string

func (*SayHelloResponse) Validate

func (m *SayHelloResponse) Validate() error

Validate checks the field values on SayHelloResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SayHelloResponse) ValidateAll

func (m *SayHelloResponse) ValidateAll() error

ValidateAll checks the field values on SayHelloResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SayHelloResponseMultiError, or nil if none found.

type SayHelloResponseMultiError

type SayHelloResponseMultiError []error

SayHelloResponseMultiError is an error wrapping multiple validation errors returned by SayHelloResponse.ValidateAll() if the designated constraints aren't met.

func (SayHelloResponseMultiError) AllErrors

func (m SayHelloResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SayHelloResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type SayHelloResponseValidationError

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

SayHelloResponseValidationError is the validation error returned by SayHelloResponse.Validate if the designated constraints aren't met.

func (SayHelloResponseValidationError) Cause

Cause function returns cause value.

func (SayHelloResponseValidationError) Error

Error satisfies the builtin error interface

func (SayHelloResponseValidationError) ErrorName

ErrorName returns error name.

func (SayHelloResponseValidationError) Field

Field function returns field value.

func (SayHelloResponseValidationError) Key

Key function returns key value.

func (SayHelloResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedGreeterServiceServer

type UnimplementedGreeterServiceServer struct{}

UnimplementedGreeterServiceServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedGreeterServiceServer) SayHello

type UnsafeGreeterServiceServer

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

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

Jump to

Keyboard shortcuts

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