v1

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package v1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	SoleTemplateService_Health_FullMethodName  = "/searking.sole.api.soletemplate.v1.SoleTemplateService/Health"
	SoleTemplateService_Encrypt_FullMethodName = "/searking.sole.api.soletemplate.v1.SoleTemplateService/Encrypt"
	SoleTemplateService_Example_FullMethodName = "/searking.sole.api.soletemplate.v1.SoleTemplateService/Example"
)

Variables

View Source
var (
	SoleTemplateErrorEnum_SoleTemplateError_name = map[int32]string{
		0:    "OK",
		1:    "CANCELLED",
		2:    "UNKNOWN",
		3:    "INVALID_ARGUMENT",
		4:    "DEADLINE_EXCEEDED",
		5:    "NOT_FOUND",
		6:    "ALREADY_EXISTS",
		7:    "PERMISSION_DENIED",
		16:   "UNAUTHENTICATED",
		8:    "RESOURCE_EXHAUSTED",
		9:    "FAILED_PRECONDITION",
		10:   "ABORTED",
		11:   "OUT_OF_RANGE",
		12:   "UNIMPLEMENTED",
		13:   "INTERNAL",
		14:   "UNAVAILABLE",
		15:   "DATA_LOSS",
		1000: "INVALID_ARGUMENT_MESSAGE_EMPTY",
	}
	SoleTemplateErrorEnum_SoleTemplateError_value = map[string]int32{
		"OK":                             0,
		"CANCELLED":                      1,
		"UNKNOWN":                        2,
		"INVALID_ARGUMENT":               3,
		"DEADLINE_EXCEEDED":              4,
		"NOT_FOUND":                      5,
		"ALREADY_EXISTS":                 6,
		"PERMISSION_DENIED":              7,
		"UNAUTHENTICATED":                16,
		"RESOURCE_EXHAUSTED":             8,
		"FAILED_PRECONDITION":            9,
		"ABORTED":                        10,
		"OUT_OF_RANGE":                   11,
		"UNIMPLEMENTED":                  12,
		"INTERNAL":                       13,
		"UNAVAILABLE":                    14,
		"DATA_LOSS":                      15,
		"INVALID_ARGUMENT_MESSAGE_EMPTY": 1000,
	}
)

Enum value maps for SoleTemplateErrorEnum_SoleTemplateError.

View Source
var File_soletemplate_v1_soletemplate_configuration_proto protoreflect.FileDescriptor
View Source
var File_soletemplate_v1_soletemplate_errors_proto protoreflect.FileDescriptor
View Source
var File_soletemplate_v1_soletemplate_service_proto protoreflect.FileDescriptor
View Source
var SoleTemplateService_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "searking.sole.api.soletemplate.v1.SoleTemplateService",
	HandlerType: (*SoleTemplateServiceServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Health",
			Handler:    _SoleTemplateService_Health_Handler,
		},
		{
			MethodName: "Encrypt",
			Handler:    _SoleTemplateService_Encrypt_Handler,
		},
		{
			MethodName: "Example",
			Handler:    _SoleTemplateService_Example_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "soletemplate/v1/soletemplate.service.proto",
}

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

Functions

func RegisterSoleTemplateServiceHandler

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

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

func RegisterSoleTemplateServiceHandlerClient

func RegisterSoleTemplateServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SoleTemplateServiceClient) error

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

func RegisterSoleTemplateServiceHandlerFromEndpoint

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

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

func RegisterSoleTemplateServiceHandlerServer

func RegisterSoleTemplateServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SoleTemplateServiceServer) error

RegisterSoleTemplateServiceHandlerServer registers the http handlers for service SoleTemplateService to "mux". UnaryRPC :call SoleTemplateServiceServer 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 RegisterSoleTemplateServiceHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.

func RegisterSoleTemplateServiceServer

func RegisterSoleTemplateServiceServer(s grpc.ServiceRegistrar, srv SoleTemplateServiceServer)

Types

type Configuration

type Configuration struct {
	Log      *configuration.Log      `protobuf:"bytes,1,opt,name=log,proto3" json:"log,omitempty"`
	Web      *configuration.Web      `protobuf:"bytes,2,opt,name=web,proto3" json:"web,omitempty"`
	Otel     *configuration.Otel     `protobuf:"bytes,3,opt,name=otel,proto3" json:"otel,omitempty"`
	Category *Configuration_Category `protobuf:"bytes,4,opt,name=category,proto3" json:"category,omitempty"`
	// contains filtered or unexported fields
}

func (*Configuration) Descriptor deprecated

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

Deprecated: Use Configuration.ProtoReflect.Descriptor instead.

func (*Configuration) GetCategory

func (x *Configuration) GetCategory() *Configuration_Category

func (*Configuration) GetLog

func (x *Configuration) GetLog() *configuration.Log

func (*Configuration) GetOtel

func (x *Configuration) GetOtel() *configuration.Otel

func (*Configuration) GetWeb

func (x *Configuration) GetWeb() *configuration.Web

func (*Configuration) ProtoMessage

func (*Configuration) ProtoMessage()

func (*Configuration) ProtoReflect

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

func (*Configuration) Reset

func (x *Configuration) Reset()

func (*Configuration) String

func (x *Configuration) String() string

type Configuration_Category

type Configuration_Category struct {
	DynamicEnvironments map[string]string            `` /* 206-byte string literal not displayed */
	System              *configuration.System        `protobuf:"bytes,2,opt,name=system,proto3" json:"system,omitempty"`
	FileCleaners        []*configuration.FileCleaner `protobuf:"bytes,3,rep,name=file_cleaners,json=fileCleaners,proto3" json:"file_cleaners,omitempty"`
	// contains filtered or unexported fields
}

func (*Configuration_Category) Descriptor deprecated

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

Deprecated: Use Configuration_Category.ProtoReflect.Descriptor instead.

func (*Configuration_Category) GetDynamicEnvironments

func (x *Configuration_Category) GetDynamicEnvironments() map[string]string

func (*Configuration_Category) GetFileCleaners

func (x *Configuration_Category) GetFileCleaners() []*configuration.FileCleaner

func (*Configuration_Category) GetSystem

func (*Configuration_Category) ProtoMessage

func (*Configuration_Category) ProtoMessage()

func (*Configuration_Category) ProtoReflect

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

func (*Configuration_Category) Reset

func (x *Configuration_Category) Reset()

func (*Configuration_Category) String

func (x *Configuration_Category) String() string

type EncryptRequest

type EncryptRequest struct {
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=RequestId,proto3" json:"request_id,omitempty"`  // unique id for the request
	AppId     string `protobuf:"bytes,2,opt,name=app_id,json=AppId,proto3" json:"app_id,omitempty"`              // the ID of the application
	PlainText []byte `protobuf:"bytes,10,opt,name=plain_text,json=PlainText,proto3" json:"plain_text,omitempty"` // plain text
	// contains filtered or unexported fields
}

func (*EncryptRequest) Descriptor deprecated

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

Deprecated: Use EncryptRequest.ProtoReflect.Descriptor instead.

func (*EncryptRequest) GetAppId

func (x *EncryptRequest) GetAppId() string

func (*EncryptRequest) GetPlainText

func (x *EncryptRequest) GetPlainText() []byte

func (*EncryptRequest) GetRequestId

func (x *EncryptRequest) GetRequestId() string

func (*EncryptRequest) ProtoMessage

func (*EncryptRequest) ProtoMessage()

func (*EncryptRequest) ProtoReflect

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

func (*EncryptRequest) Reset

func (x *EncryptRequest) Reset()

func (*EncryptRequest) String

func (x *EncryptRequest) String() string

type EncryptResponse

type EncryptResponse struct {
	RequestId  string               `protobuf:"bytes,1,opt,name=request_id,json=RequestId,proto3" json:"request_id,omitempty"`     // same as request_id in the request, generate if not set
	CipherText []byte               `protobuf:"bytes,10,opt,name=cipher_text,json=CipherText,proto3" json:"cipher_text,omitempty"` // cipher text
	Error      *errors.Error_Status `protobuf:"bytes,1000,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*EncryptResponse) Descriptor deprecated

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

Deprecated: Use EncryptResponse.ProtoReflect.Descriptor instead.

func (*EncryptResponse) GetCipherText

func (x *EncryptResponse) GetCipherText() []byte

func (*EncryptResponse) GetError

func (x *EncryptResponse) GetError() *errors.Error_Status

func (*EncryptResponse) GetRequestId

func (x *EncryptResponse) GetRequestId() string

func (*EncryptResponse) ProtoMessage

func (*EncryptResponse) ProtoMessage()

func (*EncryptResponse) ProtoReflect

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

func (*EncryptResponse) Reset

func (x *EncryptResponse) Reset()

func (*EncryptResponse) String

func (x *EncryptResponse) String() string

type ErrorCode

type ErrorCode struct {

	// The list of error enums
	//
	// Types that are assignable to ErrorCode:
	//
	//	*ErrorCode_SoleTemplateError
	ErrorCode isErrorCode_ErrorCode `protobuf_oneof:"error_code"`
	// contains filtered or unexported fields
}

The error reason represented by type and enum.

func (*ErrorCode) Descriptor deprecated

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

Deprecated: Use ErrorCode.ProtoReflect.Descriptor instead.

func (*ErrorCode) GetErrorCode

func (m *ErrorCode) GetErrorCode() isErrorCode_ErrorCode

func (*ErrorCode) GetSoleTemplateError

func (x *ErrorCode) GetSoleTemplateError() SoleTemplateErrorEnum_SoleTemplateError

func (*ErrorCode) ProtoMessage

func (*ErrorCode) ProtoMessage()

func (*ErrorCode) ProtoReflect

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

func (*ErrorCode) Reset

func (x *ErrorCode) Reset()

func (*ErrorCode) String

func (x *ErrorCode) String() string

type ErrorCode_SoleTemplateError

type ErrorCode_SoleTemplateError struct {
	SoleTemplateError SoleTemplateErrorEnum_SoleTemplateError `` /* 163-byte string literal not displayed */
}

type ExampleRequest

type ExampleRequest struct {
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=RequestId,proto3" json:"request_id,omitempty"` // unique id for the request
	AppId     string `protobuf:"bytes,2,opt,name=app_id,json=AppId,proto3" json:"app_id,omitempty"`             // the ID of the application
	Message   string `protobuf:"bytes,10,opt,name=message,json=Message,proto3" json:"message,omitempty"`        // message
	// contains filtered or unexported fields
}

func (*ExampleRequest) Descriptor deprecated

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

Deprecated: Use ExampleRequest.ProtoReflect.Descriptor instead.

func (*ExampleRequest) GetAppId

func (x *ExampleRequest) GetAppId() string

func (*ExampleRequest) GetMessage

func (x *ExampleRequest) GetMessage() string

func (*ExampleRequest) GetRequestId

func (x *ExampleRequest) GetRequestId() string

func (*ExampleRequest) ProtoMessage

func (*ExampleRequest) ProtoMessage()

func (*ExampleRequest) ProtoReflect

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

func (*ExampleRequest) Reset

func (x *ExampleRequest) Reset()

func (*ExampleRequest) String

func (x *ExampleRequest) String() string

type ExampleResponse

type ExampleResponse struct {
	RequestId string               `protobuf:"bytes,1,opt,name=request_id,json=RequestId,proto3" json:"request_id,omitempty"` // same as request_id in the request, generate if not set
	Message   string               `protobuf:"bytes,10,opt,name=message,json=Message,proto3" json:"message,omitempty"`        // message echo
	Error     *errors.Error_Status `protobuf:"bytes,1000,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*ExampleResponse) Descriptor deprecated

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

Deprecated: Use ExampleResponse.ProtoReflect.Descriptor instead.

func (*ExampleResponse) GetError

func (x *ExampleResponse) GetError() *errors.Error_Status

func (*ExampleResponse) GetMessage

func (x *ExampleResponse) GetMessage() string

func (*ExampleResponse) GetRequestId

func (x *ExampleResponse) GetRequestId() string

func (*ExampleResponse) ProtoMessage

func (*ExampleResponse) ProtoMessage()

func (*ExampleResponse) ProtoReflect

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

func (*ExampleResponse) Reset

func (x *ExampleResponse) Reset()

func (*ExampleResponse) String

func (x *ExampleResponse) String() string

type HealthRequest

type HealthRequest struct {
	RequestId string `protobuf:"bytes,1,opt,name=request_id,json=RequestId,proto3" json:"request_id,omitempty"` // unique id for the request
	AppId     string `protobuf:"bytes,2,opt,name=app_id,json=AppId,proto3" json:"app_id,omitempty"`             // the ID of the application
	// contains filtered or unexported fields
}

func (*HealthRequest) Descriptor deprecated

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

Deprecated: Use HealthRequest.ProtoReflect.Descriptor instead.

func (*HealthRequest) GetAppId

func (x *HealthRequest) GetAppId() string

func (*HealthRequest) GetRequestId

func (x *HealthRequest) GetRequestId() string

func (*HealthRequest) ProtoMessage

func (*HealthRequest) ProtoMessage()

func (*HealthRequest) ProtoReflect

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

func (*HealthRequest) Reset

func (x *HealthRequest) Reset()

func (*HealthRequest) String

func (x *HealthRequest) String() string

type HealthResponse

type HealthResponse struct {
	RequestId string               `protobuf:"bytes,1,opt,name=request_id,json=RequestId,proto3" json:"request_id,omitempty"` // same as request_id in the request, generate if not set
	Status    string               `protobuf:"bytes,10,opt,name=status,json=Status,proto3" json:"status,omitempty"`           // health check status
	Date      string               `protobuf:"bytes,11,opt,name=date,json=Date,proto3" json:"date,omitempty"`                 // query date time
	Error     *errors.Error_Status `protobuf:"bytes,1000,opt,name=error,proto3" json:"error,omitempty"`
	// contains filtered or unexported fields
}

func (*HealthResponse) Descriptor deprecated

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

Deprecated: Use HealthResponse.ProtoReflect.Descriptor instead.

func (*HealthResponse) GetDate

func (x *HealthResponse) GetDate() string

func (*HealthResponse) GetError

func (x *HealthResponse) GetError() *errors.Error_Status

func (*HealthResponse) GetRequestId

func (x *HealthResponse) GetRequestId() string

func (*HealthResponse) GetStatus

func (x *HealthResponse) GetStatus() string

func (*HealthResponse) ProtoMessage

func (*HealthResponse) ProtoMessage()

func (*HealthResponse) ProtoReflect

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

func (*HealthResponse) Reset

func (x *HealthResponse) Reset()

func (*HealthResponse) String

func (x *HealthResponse) String() string

type SoleTemplateErrorEnum

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

Container for enum describing possible date errors. https://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html

func (*SoleTemplateErrorEnum) Descriptor deprecated

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

Deprecated: Use SoleTemplateErrorEnum.ProtoReflect.Descriptor instead.

func (*SoleTemplateErrorEnum) ProtoMessage

func (*SoleTemplateErrorEnum) ProtoMessage()

func (*SoleTemplateErrorEnum) ProtoReflect

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

func (*SoleTemplateErrorEnum) Reset

func (x *SoleTemplateErrorEnum) Reset()

func (*SoleTemplateErrorEnum) String

func (x *SoleTemplateErrorEnum) String() string

type SoleTemplateErrorEnum_SoleTemplateError

type SoleTemplateErrorEnum_SoleTemplateError int32

Enum describing possible face driver reasons.

const (
	// The canonical error codes for gRPC APIs.
	// https://github.com/googleapis/googleapis/blob/master/google/rpc/code.proto
	// Not an error; returned on success.
	// 无错误。
	SoleTemplateErrorEnum_OK SoleTemplateErrorEnum_SoleTemplateError = 0
	// The operation was cancelled, typically by the caller.
	// 请求被客户端取消。
	SoleTemplateErrorEnum_CANCELLED SoleTemplateErrorEnum_SoleTemplateError = 1
	// Unknown error.  For example, this error may be returned when
	// a `Status` value received from another address space belongs to
	// an error space that is not known in this address space.  Also
	// errors raised by APIs that do not return enough error information
	// may be converted to this error.
	// 出现未知的服务器错误。通常是服务器错误。
	SoleTemplateErrorEnum_UNKNOWN SoleTemplateErrorEnum_SoleTemplateError = 2
	// The client specified an invalid argument.  Note that this differs
	// from `FAILED_PRECONDITION`.  `INVALID_ARGUMENT` indicates arguments
	// that are problematic regardless of the state of the system
	// (e.g., a malformed file name).
	// 客户端指定了无效参数。如需了解详情,请查看错误消息和错误详细信息。
	SoleTemplateErrorEnum_INVALID_ARGUMENT SoleTemplateErrorEnum_SoleTemplateError = 3
	// The deadline expired before the operation could complete. For operations
	// that change the state of the system, this error may be returned
	// even if the operation has completed successfully.  For example, a
	// successful response from a server could have been delayed long
	// enough for the deadline to expire.
	// 超出请求时限。仅当调用者设置的时限比方法的默认时限短(即请求的时限不足以让服务器处理请求)并且请求未在时限范围内完成时,才会发生这种情况。
	SoleTemplateErrorEnum_DEADLINE_EXCEEDED SoleTemplateErrorEnum_SoleTemplateError = 4
	// Some requested entity (e.g., file or directory) was not found.
	//
	// Note to server developers: if a request is denied for an entire class
	// of users, such as gradual feature rollout or undocumented allowlist,
	// `NOT_FOUND` may be used. If a request is denied for some users within
	// a class of users, such as user-based access control, `PERMISSION_DENIED`
	// must be used.
	// 未找到指定的资源。
	SoleTemplateErrorEnum_NOT_FOUND SoleTemplateErrorEnum_SoleTemplateError = 5
	// The entity that a client attempted to create (e.g., file or directory)
	// already exists.
	// 客户端尝试创建的资源已存在。
	SoleTemplateErrorEnum_ALREADY_EXISTS SoleTemplateErrorEnum_SoleTemplateError = 6
	// The caller does not have permission to execute the specified
	// operation. `PERMISSION_DENIED` must not be used for rejections
	// caused by exhausting some resource (use `RESOURCE_EXHAUSTED`
	// instead for those errors). `PERMISSION_DENIED` must not be
	// used if the caller can not be identified (use `UNAUTHENTICATED`
	// instead for those errors). This error code does not imply the
	// request is valid or the requested entity exists or satisfies
	// other pre-conditions.
	// 客户端权限不足。这可能是因为 OAuth 令牌没有正确的范围、客户端没有权限或者 API 尚未启用。
	SoleTemplateErrorEnum_PERMISSION_DENIED SoleTemplateErrorEnum_SoleTemplateError = 7
	// The request does not have valid authentication credentials for the
	// operation.
	// 由于 OAuth 令牌丢失、无效或过期,请求未通过身份验证。
	SoleTemplateErrorEnum_UNAUTHENTICATED SoleTemplateErrorEnum_SoleTemplateError = 16
	// Some resource has been exhausted, perhaps a per-user quota, or
	// perhaps the entire file system is out of space.
	// 资源配额不足或达到速率限制。如需了解详情,请查看错误消息和错误详细信息。
	SoleTemplateErrorEnum_RESOURCE_EXHAUSTED SoleTemplateErrorEnum_SoleTemplateError = 8
	// The operation was rejected because the system is not in a state
	// required for the operation's execution.  For example, the directory
	// to be deleted is non-empty, an rmdir operation is applied to
	// a non-directory, etc.
	//
	// Service implementors can use the following guidelines to decide
	// between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`:
	//
	//	(a) Use `UNAVAILABLE` if the client can retry just the failing call.
	//	(b) Use `ABORTED` if the client should retry at a higher level. For
	//	    example, when a client-specified test-and-set fails, indicating the
	//	    client should restart a read-modify-write sequence.
	//	(c) Use `FAILED_PRECONDITION` if the client should not retry until
	//	    the system state has been explicitly fixed. For example, if an "rmdir"
	//	    fails because the directory is non-empty, `FAILED_PRECONDITION`
	//	    should be returned since the client should not retry unless
	//	    the files are deleted from the directory.
	//
	// 请求无法在当前系统状态下执行,例如删除非空目录。
	SoleTemplateErrorEnum_FAILED_PRECONDITION SoleTemplateErrorEnum_SoleTemplateError = 9
	// The operation was aborted, typically due to a concurrency issue such as
	// a sequencer check failure or transaction abort.
	//
	// See the guidelines above for deciding between `FAILED_PRECONDITION`,
	// `ABORTED`, and `UNAVAILABLE`.
	// 并发冲突,例如读取/修改/写入冲突
	SoleTemplateErrorEnum_ABORTED SoleTemplateErrorEnum_SoleTemplateError = 10
	// The operation was attempted past the valid range.  E.g., seeking or
	// reading past end-of-file.
	//
	// Unlike `INVALID_ARGUMENT`, this error indicates a problem that may
	// be fixed if the system state changes. For example, a 32-bit file
	// system will generate `INVALID_ARGUMENT` if asked to read at an
	// offset that is not in the range [0,2^32-1], but it will generate
	// `OUT_OF_RANGE` if asked to read from an offset past the current
	// file size.
	//
	// There is a fair bit of overlap between `FAILED_PRECONDITION` and
	// `OUT_OF_RANGE`.  We recommend using `OUT_OF_RANGE` (the more specific
	// error) when it applies so that callers who are iterating through
	// a space can easily look for an `OUT_OF_RANGE` error to detect when
	// they are done.
	// 客户端指定了无效范围
	SoleTemplateErrorEnum_OUT_OF_RANGE SoleTemplateErrorEnum_SoleTemplateError = 11
	// The operation is not implemented or is not supported/enabled in this
	// service.
	// API 方法未通过服务器实现
	SoleTemplateErrorEnum_UNIMPLEMENTED SoleTemplateErrorEnum_SoleTemplateError = 12
	// Internal errors.  This means that some invariants expected by the
	// underlying system have been broken.  This error code is reserved
	// for serious errors.
	// 出现内部服务器错误。通常是服务器错误
	SoleTemplateErrorEnum_INTERNAL SoleTemplateErrorEnum_SoleTemplateError = 13
	// The service is currently unavailable.  This is most likely a
	// transient condition, which can be corrected by retrying with
	// a backoff. Note that it is not always safe to retry
	// non-idempotent operations.
	//
	// See the guidelines above for deciding between `FAILED_PRECONDITION`,
	// `ABORTED`, and `UNAVAILABLE`.
	// 服务不可用。通常是服务器已关闭
	SoleTemplateErrorEnum_UNAVAILABLE SoleTemplateErrorEnum_SoleTemplateError = 14
	// Unrecoverable data loss or corruption.
	// 出现不可恢复的数据丢失或数据损坏。客户端应该向用户报告错误
	SoleTemplateErrorEnum_DATA_LOSS                      SoleTemplateErrorEnum_SoleTemplateError = 15   // Reserved for gRPC
	SoleTemplateErrorEnum_INVALID_ARGUMENT_MESSAGE_EMPTY SoleTemplateErrorEnum_SoleTemplateError = 1000 // message should not be empty
)

func (SoleTemplateErrorEnum_SoleTemplateError) Descriptor

func (SoleTemplateErrorEnum_SoleTemplateError) Enum

func (SoleTemplateErrorEnum_SoleTemplateError) EnumDescriptor deprecated

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

Deprecated: Use SoleTemplateErrorEnum_SoleTemplateError.Descriptor instead.

func (SoleTemplateErrorEnum_SoleTemplateError) Number

func (SoleTemplateErrorEnum_SoleTemplateError) String

func (SoleTemplateErrorEnum_SoleTemplateError) Type

type SoleTemplateServiceClient

type SoleTemplateServiceClient interface {
	// Health Check
	Health(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error)
	// Text Encrypt
	Encrypt(ctx context.Context, in *EncryptRequest, opts ...grpc.CallOption) (*EncryptResponse, error)
	// Example Service Interface
	// TODO: Replace with your own service interface
	Example(ctx context.Context, in *ExampleRequest, opts ...grpc.CallOption) (*ExampleResponse, error)
}

SoleTemplateServiceClient is the client API for SoleTemplateService 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.

Sole Template Service

type SoleTemplateServiceServer

type SoleTemplateServiceServer interface {
	// Health Check
	Health(context.Context, *HealthRequest) (*HealthResponse, error)
	// Text Encrypt
	Encrypt(context.Context, *EncryptRequest) (*EncryptResponse, error)
	// Example Service Interface
	// TODO: Replace with your own service interface
	Example(context.Context, *ExampleRequest) (*ExampleResponse, error)
	// contains filtered or unexported methods
}

SoleTemplateServiceServer is the server API for SoleTemplateService service. All implementations must embed UnimplementedSoleTemplateServiceServer for forward compatibility.

Sole Template Service

type UnimplementedSoleTemplateServiceServer

type UnimplementedSoleTemplateServiceServer struct{}

UnimplementedSoleTemplateServiceServer 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 (UnimplementedSoleTemplateServiceServer) Encrypt

func (UnimplementedSoleTemplateServiceServer) Example

func (UnimplementedSoleTemplateServiceServer) Health

type UnsafeSoleTemplateServiceServer

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

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

Jump to

Keyboard shortcuts

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