app

package
v0.0.0-...-3f50349 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_app_app_proto protoreflect.FileDescriptor
View Source
var MicroApp_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "app.MicroApp",
	HandlerType: (*MicroAppServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "SayHello",
			Handler:    _MicroApp_SayHello_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "app/app.proto",
}

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

Functions

func RegisterMicroAppServer

func RegisterMicroAppServer(s grpc.ServiceRegistrar, srv MicroAppServer)

Types

type HelloReq

type HelloReq 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 (*HelloReq) Descriptor deprecated

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

Deprecated: Use HelloReq.ProtoReflect.Descriptor instead.

func (*HelloReq) GetName

func (x *HelloReq) GetName() string

func (*HelloReq) ProtoMessage

func (*HelloReq) ProtoMessage()

func (*HelloReq) ProtoReflect

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

func (*HelloReq) Reset

func (x *HelloReq) Reset()

func (*HelloReq) String

func (x *HelloReq) String() string

func (*HelloReq) Validate

func (m *HelloReq) Validate() error

Validate checks the field values on HelloReq 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 (*HelloReq) ValidateAll

func (m *HelloReq) ValidateAll() error

ValidateAll checks the field values on HelloReq 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 HelloReqMultiError, or nil if none found.

type HelloReqMultiError

type HelloReqMultiError []error

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

func (HelloReqMultiError) AllErrors

func (m HelloReqMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HelloReqMultiError) Error

func (m HelloReqMultiError) Error() string

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

type HelloReqValidationError

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

HelloReqValidationError is the validation error returned by HelloReq.Validate if the designated constraints aren't met.

func (HelloReqValidationError) Cause

func (e HelloReqValidationError) Cause() error

Cause function returns cause value.

func (HelloReqValidationError) Error

func (e HelloReqValidationError) Error() string

Error satisfies the builtin error interface

func (HelloReqValidationError) ErrorName

func (e HelloReqValidationError) ErrorName() string

ErrorName returns error name.

func (HelloReqValidationError) Field

func (e HelloReqValidationError) Field() string

Field function returns field value.

func (HelloReqValidationError) Key

func (e HelloReqValidationError) Key() bool

Key function returns key value.

func (HelloReqValidationError) Reason

func (e HelloReqValidationError) Reason() string

Reason function returns reason value.

type HelloResp

type HelloResp 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 (*HelloResp) Descriptor deprecated

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

Deprecated: Use HelloResp.ProtoReflect.Descriptor instead.

func (*HelloResp) GetMessage

func (x *HelloResp) GetMessage() string

func (*HelloResp) ProtoMessage

func (*HelloResp) ProtoMessage()

func (*HelloResp) ProtoReflect

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

func (*HelloResp) Reset

func (x *HelloResp) Reset()

func (*HelloResp) String

func (x *HelloResp) String() string

func (*HelloResp) Validate

func (m *HelloResp) Validate() error

Validate checks the field values on HelloResp 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 (*HelloResp) ValidateAll

func (m *HelloResp) ValidateAll() error

ValidateAll checks the field values on HelloResp 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 HelloRespMultiError, or nil if none found.

type HelloRespMultiError

type HelloRespMultiError []error

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

func (HelloRespMultiError) AllErrors

func (m HelloRespMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (HelloRespMultiError) Error

func (m HelloRespMultiError) Error() string

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

type HelloRespValidationError

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

HelloRespValidationError is the validation error returned by HelloResp.Validate if the designated constraints aren't met.

func (HelloRespValidationError) Cause

func (e HelloRespValidationError) Cause() error

Cause function returns cause value.

func (HelloRespValidationError) Error

func (e HelloRespValidationError) Error() string

Error satisfies the builtin error interface

func (HelloRespValidationError) ErrorName

func (e HelloRespValidationError) ErrorName() string

ErrorName returns error name.

func (HelloRespValidationError) Field

func (e HelloRespValidationError) Field() string

Field function returns field value.

func (HelloRespValidationError) Key

Key function returns key value.

func (HelloRespValidationError) Reason

func (e HelloRespValidationError) Reason() string

Reason function returns reason value.

type MicroAppClient

type MicroAppClient interface {
	// Sends a greeting
	SayHello(ctx context.Context, in *HelloReq, opts ...grpc.CallOption) (*HelloResp, error)
}

MicroAppClient is the client API for MicroApp 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 NewMicroAppClient

func NewMicroAppClient(cc grpc.ClientConnInterface) MicroAppClient

type MicroAppServer

type MicroAppServer interface {
	// Sends a greeting
	SayHello(context.Context, *HelloReq) (*HelloResp, error)
	// contains filtered or unexported methods
}

MicroAppServer is the server API for MicroApp service. All implementations must embed UnimplementedMicroAppServer for forward compatibility

type UnimplementedMicroAppServer

type UnimplementedMicroAppServer struct {
}

UnimplementedMicroAppServer must be embedded to have forward compatible implementations.

func (UnimplementedMicroAppServer) SayHello

type UnsafeMicroAppServer

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

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

Jump to

Keyboard shortcuts

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