Documentation ¶
Overview ¶
Package sprinklesv1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Constants
- Variables
- func DeleteHelloGormModels(ctx context.Context, tx *gorm.DB, ids []string) error
- func RegisterApiHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ApiClient) error
- func RegisterApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ApiServer) error
- func RegisterApiServer(s grpc.ServiceRegistrar, srv ApiServer)
- type ApiClient
- type ApiServer
- type DeleteRequest
- func (*DeleteRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteRequest) GetIds() []string
- func (msg *DeleteRequest) MarshalJSON() ([]byte, error)
- func (*DeleteRequest) ProtoMessage()
- func (x *DeleteRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteRequest) Reset()
- func (x *DeleteRequest) String() string
- func (msg *DeleteRequest) UnmarshalJSON(b []byte) error
- func (m *DeleteRequest) Validate() error
- func (m *DeleteRequest) ValidateAll() error
- type DeleteRequestMultiError
- type DeleteRequestValidationError
- func (e DeleteRequestValidationError) Cause() error
- func (e DeleteRequestValidationError) Error() string
- func (e DeleteRequestValidationError) ErrorName() string
- func (e DeleteRequestValidationError) Field() string
- func (e DeleteRequestValidationError) Key() bool
- func (e DeleteRequestValidationError) Reason() string
- type DeleteResponse
- func (*DeleteResponse) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteResponse) GetErrors() []string
- func (msg *DeleteResponse) MarshalJSON() ([]byte, error)
- func (*DeleteResponse) ProtoMessage()
- func (x *DeleteResponse) ProtoReflect() protoreflect.Message
- func (x *DeleteResponse) Reset()
- func (x *DeleteResponse) String() string
- func (msg *DeleteResponse) UnmarshalJSON(b []byte) error
- func (m *DeleteResponse) Validate() error
- func (m *DeleteResponse) ValidateAll() error
- type DeleteResponseMultiError
- type DeleteResponseValidationError
- func (e DeleteResponseValidationError) Cause() error
- func (e DeleteResponseValidationError) Error() string
- func (e DeleteResponseValidationError) ErrorName() string
- func (e DeleteResponseValidationError) Field() string
- func (e DeleteResponseValidationError) Key() bool
- func (e DeleteResponseValidationError) Reason() string
- type Empty
- func (*Empty) Descriptor() ([]byte, []int)deprecated
- func (msg *Empty) MarshalJSON() ([]byte, error)
- func (*Empty) ProtoMessage()
- func (x *Empty) ProtoReflect() protoreflect.Message
- func (x *Empty) Reset()
- func (x *Empty) String() string
- func (msg *Empty) UnmarshalJSON(b []byte) error
- func (m *Empty) Validate() error
- func (m *Empty) ValidateAll() error
- type EmptyMultiError
- type EmptyValidationError
- type GetRequest
- func (*GetRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetRequest) GetIds() []string
- func (msg *GetRequest) MarshalJSON() ([]byte, error)
- func (*GetRequest) ProtoMessage()
- func (x *GetRequest) ProtoReflect() protoreflect.Message
- func (x *GetRequest) Reset()
- func (x *GetRequest) String() string
- func (msg *GetRequest) UnmarshalJSON(b []byte) error
- func (m *GetRequest) Validate() error
- func (m *GetRequest) ValidateAll() error
- type GetRequestMultiError
- type GetRequestValidationError
- type Hello
- func (*Hello) Descriptor() ([]byte, []int)deprecated
- func (x *Hello) GetCreatedAt() *timestamppb.Timestamp
- func (x *Hello) GetHelloType() HelloType
- func (x *Hello) GetId() string
- func (x *Hello) GetPersonName() string
- func (x *Hello) GetUpdatedAt() *timestamppb.Timestamp
- func (msg *Hello) MarshalJSON() ([]byte, error)
- func (*Hello) ProtoMessage()
- func (x *Hello) ProtoReflect() protoreflect.Message
- func (x *Hello) Reset()
- func (x *Hello) String() string
- func (p *Hello) ToModel() (theModel *HelloGormModel, err error)
- func (msg *Hello) UnmarshalJSON(b []byte) error
- func (m *Hello) Validate() error
- func (m *Hello) ValidateAll() error
- type HelloGormModel
- type HelloGormModels
- type HelloMultiError
- type HelloProtos
- func (p *HelloProtos) GetByIds(ctx context.Context, tx *gorm.DB, ids []string, preloads ...string) (err error)
- func (p *HelloProtos) List(ctx context.Context, tx *gorm.DB, limit, offset int, order interface{}, ...) (err error)
- func (p HelloProtos) ToModels() (models HelloGormModels, err error)
- func (p *HelloProtos) Upsert(ctx context.Context, tx *gorm.DB, selects, omits []string, ...) (err error)
- type HelloType
- type HelloValidationError
- type Hellos
- func (*Hellos) Descriptor() ([]byte, []int)deprecated
- func (x *Hellos) GetHellos() []*Hello
- func (msg *Hellos) MarshalJSON() ([]byte, error)
- func (*Hellos) ProtoMessage()
- func (x *Hellos) ProtoReflect() protoreflect.Message
- func (x *Hellos) Reset()
- func (x *Hellos) String() string
- func (msg *Hellos) UnmarshalJSON(b []byte) error
- func (m *Hellos) Validate() error
- func (m *Hellos) ValidateAll() error
- type HellosMultiError
- type HellosValidationError
- type ListRequest
- func (*ListRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListRequest) GetLimit() int32
- func (x *ListRequest) GetOffset() int32
- func (x *ListRequest) GetOrderBy() string
- func (msg *ListRequest) MarshalJSON() ([]byte, error)
- func (*ListRequest) ProtoMessage()
- func (x *ListRequest) ProtoReflect() protoreflect.Message
- func (x *ListRequest) Reset()
- func (x *ListRequest) String() string
- func (msg *ListRequest) UnmarshalJSON(b []byte) error
- func (m *ListRequest) Validate() error
- func (m *ListRequest) ValidateAll() error
- type ListRequestMultiError
- type ListRequestValidationError
- func (e ListRequestValidationError) Cause() error
- func (e ListRequestValidationError) Error() string
- func (e ListRequestValidationError) ErrorName() string
- func (e ListRequestValidationError) Field() string
- func (e ListRequestValidationError) Key() bool
- func (e ListRequestValidationError) Reason() string
- type UnimplementedApiServer
- func (UnimplementedApiServer) DeleteHellos(context.Context, *DeleteRequest) (*DeleteResponse, error)
- func (UnimplementedApiServer) GetHellos(context.Context, *GetRequest) (*Hellos, error)
- func (UnimplementedApiServer) Healthy(context.Context, *Empty) (*Empty, error)
- func (UnimplementedApiServer) ListHellos(context.Context, *ListRequest) (*Hellos, error)
- func (UnimplementedApiServer) Ready(context.Context, *Empty) (*Empty, error)
- func (UnimplementedApiServer) UpsertHellos(context.Context, *UpsertHellosRequest) (*Hellos, error)
- type UnsafeApiServer
- type UpsertHellosRequest
- func (*UpsertHellosRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpsertHellosRequest) GetFields() []string
- func (x *UpsertHellosRequest) GetHellos() []*Hello
- func (msg *UpsertHellosRequest) MarshalJSON() ([]byte, error)
- func (*UpsertHellosRequest) ProtoMessage()
- func (x *UpsertHellosRequest) ProtoReflect() protoreflect.Message
- func (x *UpsertHellosRequest) Reset()
- func (x *UpsertHellosRequest) String() string
- func (msg *UpsertHellosRequest) UnmarshalJSON(b []byte) error
- func (m *UpsertHellosRequest) Validate() error
- func (m *UpsertHellosRequest) ValidateAll() error
- type UpsertHellosRequestMultiError
- type UpsertHellosRequestValidationError
- func (e UpsertHellosRequestValidationError) Cause() error
- func (e UpsertHellosRequestValidationError) Error() string
- func (e UpsertHellosRequestValidationError) ErrorName() string
- func (e UpsertHellosRequestValidationError) Field() string
- func (e UpsertHellosRequestValidationError) Key() bool
- func (e UpsertHellosRequestValidationError) Reason() string
Constants ¶
const ( Api_UpsertHellos_FullMethodName = "/sprinkles.v1.Api/UpsertHellos" Api_DeleteHellos_FullMethodName = "/sprinkles.v1.Api/DeleteHellos" Api_ListHellos_FullMethodName = "/sprinkles.v1.Api/ListHellos" Api_GetHellos_FullMethodName = "/sprinkles.v1.Api/GetHellos" Api_Healthy_FullMethodName = "/sprinkles.v1.Api/Healthy" Api_Ready_FullMethodName = "/sprinkles.v1.Api/Ready" )
Variables ¶
var ( HelloType_name = map[int32]string{ 0: "HELLO_GENERIC", 1: "HELLO_SPECIFIC", } HelloType_value = map[string]int32{ "HELLO_GENERIC": 0, "HELLO_SPECIFIC": 1, } )
Enum value maps for HelloType.
var Api_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sprinkles.v1.Api", HandlerType: (*ApiServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UpsertHellos", Handler: _Api_UpsertHellos_Handler, }, { MethodName: "DeleteHellos", Handler: _Api_DeleteHellos_Handler, }, { MethodName: "ListHellos", Handler: _Api_ListHellos_Handler, }, { MethodName: "GetHellos", Handler: _Api_GetHellos_Handler, }, { MethodName: "Healthy", Handler: _Api_Healthy_Handler, }, { MethodName: "Ready", Handler: _Api_Ready_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "sprinkles/v1/api.proto", }
Api_ServiceDesc is the grpc.ServiceDesc for Api service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_sprinkles_v1_api_proto protoreflect.FileDescriptor
var File_sprinkles_v1_enums_proto protoreflect.FileDescriptor
var File_sprinkles_v1_requests_proto protoreflect.FileDescriptor
var File_sprinkles_v1_types_proto protoreflect.FileDescriptor
Functions ¶
func DeleteHelloGormModels ¶
func RegisterApiHandler ¶
RegisterApiHandler registers the http handlers for service Api to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterApiHandlerClient ¶
RegisterApiHandlerClient registers the http handlers for service Api to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ApiClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ApiClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ApiClient" to call the correct interceptors.
func RegisterApiHandlerFromEndpoint ¶
func RegisterApiHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterApiHandlerFromEndpoint is same as RegisterApiHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterApiHandlerServer ¶
RegisterApiHandlerServer registers the http handlers for service Api to "mux". UnaryRPC :call ApiServer 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 RegisterApiHandlerFromEndpoint instead.
func RegisterApiServer ¶
func RegisterApiServer(s grpc.ServiceRegistrar, srv ApiServer)
Types ¶
type ApiClient ¶
type ApiClient interface { UpsertHellos(ctx context.Context, in *UpsertHellosRequest, opts ...grpc.CallOption) (*Hellos, error) DeleteHellos(ctx context.Context, in *DeleteRequest, opts ...grpc.CallOption) (*DeleteResponse, error) ListHellos(ctx context.Context, in *ListRequest, opts ...grpc.CallOption) (*Hellos, error) GetHellos(ctx context.Context, in *GetRequest, opts ...grpc.CallOption) (*Hellos, error) // Health check Healthy(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) // Readiness check Ready(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) }
ApiClient is the client API for Api 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 NewApiClient ¶
func NewApiClient(cc grpc.ClientConnInterface) ApiClient
type ApiServer ¶
type ApiServer interface { UpsertHellos(context.Context, *UpsertHellosRequest) (*Hellos, error) DeleteHellos(context.Context, *DeleteRequest) (*DeleteResponse, error) ListHellos(context.Context, *ListRequest) (*Hellos, error) GetHellos(context.Context, *GetRequest) (*Hellos, error) // Health check Healthy(context.Context, *Empty) (*Empty, error) // Readiness check Ready(context.Context, *Empty) (*Empty, error) }
ApiServer is the server API for Api service. All implementations should embed UnimplementedApiServer for forward compatibility
type DeleteRequest ¶
type DeleteRequest struct { Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*DeleteRequest) Descriptor
deprecated
func (*DeleteRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteRequest.ProtoReflect.Descriptor instead.
func (*DeleteRequest) GetIds ¶
func (x *DeleteRequest) GetIds() []string
func (*DeleteRequest) MarshalJSON ¶
func (msg *DeleteRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*DeleteRequest) ProtoMessage ¶
func (*DeleteRequest) ProtoMessage()
func (*DeleteRequest) ProtoReflect ¶
func (x *DeleteRequest) ProtoReflect() protoreflect.Message
func (*DeleteRequest) Reset ¶
func (x *DeleteRequest) Reset()
func (*DeleteRequest) String ¶
func (x *DeleteRequest) String() string
func (*DeleteRequest) UnmarshalJSON ¶
func (msg *DeleteRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*DeleteRequest) Validate ¶
func (m *DeleteRequest) Validate() error
Validate checks the field values on DeleteRequest 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 (*DeleteRequest) ValidateAll ¶
func (m *DeleteRequest) ValidateAll() error
ValidateAll checks the field values on DeleteRequest 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 DeleteRequestMultiError, or nil if none found.
type DeleteRequestMultiError ¶
type DeleteRequestMultiError []error
DeleteRequestMultiError is an error wrapping multiple validation errors returned by DeleteRequest.ValidateAll() if the designated constraints aren't met.
func (DeleteRequestMultiError) AllErrors ¶
func (m DeleteRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeleteRequestMultiError) Error ¶
func (m DeleteRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeleteRequestValidationError ¶
type DeleteRequestValidationError struct {
// contains filtered or unexported fields
}
DeleteRequestValidationError is the validation error returned by DeleteRequest.Validate if the designated constraints aren't met.
func (DeleteRequestValidationError) Cause ¶
func (e DeleteRequestValidationError) Cause() error
Cause function returns cause value.
func (DeleteRequestValidationError) Error ¶
func (e DeleteRequestValidationError) Error() string
Error satisfies the builtin error interface
func (DeleteRequestValidationError) ErrorName ¶
func (e DeleteRequestValidationError) ErrorName() string
ErrorName returns error name.
func (DeleteRequestValidationError) Field ¶
func (e DeleteRequestValidationError) Field() string
Field function returns field value.
func (DeleteRequestValidationError) Key ¶
func (e DeleteRequestValidationError) Key() bool
Key function returns key value.
func (DeleteRequestValidationError) Reason ¶
func (e DeleteRequestValidationError) Reason() string
Reason function returns reason value.
type DeleteResponse ¶
type DeleteResponse struct { Errors []string `protobuf:"bytes,1,rep,name=errors,proto3" json:"errors,omitempty"` // contains filtered or unexported fields }
func (*DeleteResponse) Descriptor
deprecated
func (*DeleteResponse) Descriptor() ([]byte, []int)
Deprecated: Use DeleteResponse.ProtoReflect.Descriptor instead.
func (*DeleteResponse) GetErrors ¶
func (x *DeleteResponse) GetErrors() []string
func (*DeleteResponse) MarshalJSON ¶
func (msg *DeleteResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) ProtoReflect ¶
func (x *DeleteResponse) ProtoReflect() protoreflect.Message
func (*DeleteResponse) Reset ¶
func (x *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (x *DeleteResponse) String() string
func (*DeleteResponse) UnmarshalJSON ¶
func (msg *DeleteResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*DeleteResponse) Validate ¶
func (m *DeleteResponse) Validate() error
Validate checks the field values on DeleteResponse 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 (*DeleteResponse) ValidateAll ¶
func (m *DeleteResponse) ValidateAll() error
ValidateAll checks the field values on DeleteResponse 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 DeleteResponseMultiError, or nil if none found.
type DeleteResponseMultiError ¶
type DeleteResponseMultiError []error
DeleteResponseMultiError is an error wrapping multiple validation errors returned by DeleteResponse.ValidateAll() if the designated constraints aren't met.
func (DeleteResponseMultiError) AllErrors ¶
func (m DeleteResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeleteResponseMultiError) Error ¶
func (m DeleteResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeleteResponseValidationError ¶
type DeleteResponseValidationError struct {
// contains filtered or unexported fields
}
DeleteResponseValidationError is the validation error returned by DeleteResponse.Validate if the designated constraints aren't met.
func (DeleteResponseValidationError) Cause ¶
func (e DeleteResponseValidationError) Cause() error
Cause function returns cause value.
func (DeleteResponseValidationError) Error ¶
func (e DeleteResponseValidationError) Error() string
Error satisfies the builtin error interface
func (DeleteResponseValidationError) ErrorName ¶
func (e DeleteResponseValidationError) ErrorName() string
ErrorName returns error name.
func (DeleteResponseValidationError) Field ¶
func (e DeleteResponseValidationError) Field() string
Field function returns field value.
func (DeleteResponseValidationError) Key ¶
func (e DeleteResponseValidationError) Key() bool
Key function returns key value.
func (DeleteResponseValidationError) Reason ¶
func (e DeleteResponseValidationError) Reason() string
Reason function returns reason value.
type Empty ¶
type Empty struct {
// contains filtered or unexported fields
}
Do not delete these unless you know what you're doing
func (*Empty) Descriptor
deprecated
func (*Empty) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
func (*Empty) ProtoReflect ¶
func (x *Empty) ProtoReflect() protoreflect.Message
func (*Empty) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
func (*Empty) Validate ¶
Validate checks the field values on Empty 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 (*Empty) ValidateAll ¶
ValidateAll checks the field values on Empty 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 EmptyMultiError, or nil if none found.
type EmptyMultiError ¶
type EmptyMultiError []error
EmptyMultiError is an error wrapping multiple validation errors returned by Empty.ValidateAll() if the designated constraints aren't met.
func (EmptyMultiError) AllErrors ¶
func (m EmptyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (EmptyMultiError) Error ¶
func (m EmptyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type EmptyValidationError ¶
type EmptyValidationError struct {
// contains filtered or unexported fields
}
EmptyValidationError is the validation error returned by Empty.Validate if the designated constraints aren't met.
func (EmptyValidationError) Cause ¶
func (e EmptyValidationError) Cause() error
Cause function returns cause value.
func (EmptyValidationError) Error ¶
func (e EmptyValidationError) Error() string
Error satisfies the builtin error interface
func (EmptyValidationError) ErrorName ¶
func (e EmptyValidationError) ErrorName() string
ErrorName returns error name.
func (EmptyValidationError) Field ¶
func (e EmptyValidationError) Field() string
Field function returns field value.
func (EmptyValidationError) Key ¶
func (e EmptyValidationError) Key() bool
Key function returns key value.
func (EmptyValidationError) Reason ¶
func (e EmptyValidationError) Reason() string
Reason function returns reason value.
type GetRequest ¶
type GetRequest struct { Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*GetRequest) Descriptor
deprecated
func (*GetRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetRequest.ProtoReflect.Descriptor instead.
func (*GetRequest) GetIds ¶
func (x *GetRequest) GetIds() []string
func (*GetRequest) MarshalJSON ¶
func (msg *GetRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*GetRequest) ProtoMessage ¶
func (*GetRequest) ProtoMessage()
func (*GetRequest) ProtoReflect ¶
func (x *GetRequest) ProtoReflect() protoreflect.Message
func (*GetRequest) Reset ¶
func (x *GetRequest) Reset()
func (*GetRequest) String ¶
func (x *GetRequest) String() string
func (*GetRequest) UnmarshalJSON ¶
func (msg *GetRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*GetRequest) Validate ¶
func (m *GetRequest) Validate() error
Validate checks the field values on GetRequest 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 (*GetRequest) ValidateAll ¶
func (m *GetRequest) ValidateAll() error
ValidateAll checks the field values on GetRequest 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 GetRequestMultiError, or nil if none found.
type GetRequestMultiError ¶
type GetRequestMultiError []error
GetRequestMultiError is an error wrapping multiple validation errors returned by GetRequest.ValidateAll() if the designated constraints aren't met.
func (GetRequestMultiError) AllErrors ¶
func (m GetRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetRequestMultiError) Error ¶
func (m GetRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetRequestValidationError ¶
type GetRequestValidationError struct {
// contains filtered or unexported fields
}
GetRequestValidationError is the validation error returned by GetRequest.Validate if the designated constraints aren't met.
func (GetRequestValidationError) Cause ¶
func (e GetRequestValidationError) Cause() error
Cause function returns cause value.
func (GetRequestValidationError) Error ¶
func (e GetRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetRequestValidationError) ErrorName ¶
func (e GetRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetRequestValidationError) Field ¶
func (e GetRequestValidationError) Field() string
Field function returns field value.
func (GetRequestValidationError) Key ¶
func (e GetRequestValidationError) Key() bool
Key function returns key value.
func (GetRequestValidationError) Reason ¶
func (e GetRequestValidationError) Reason() string
Reason function returns reason value.
type Hello ¶
type Hello struct { // @gotags: fake:"skip" Id *string `protobuf:"bytes,1,opt,name=id,proto3,oneof" json:"id,omitempty" fake:"skip"` // @gotags: fake:"skip" CreatedAt *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=created_at,proto3" json:"created_at,omitempty" fake:"skip"` // @gotags: fake:"skip" UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=updated_at,proto3" json:"updated_at,omitempty" fake:"skip"` // @gotags: fake:"{number:1,1}" HelloType HelloType `protobuf:"varint,4,opt,name=hello_type,proto3,enum=sprinkles.v1.HelloType" json:"hello_type,omitempty" fake:"{number:1,1}"` // @gotags: fake:"{beername}" PersonName *string `protobuf:"bytes,5,opt,name=person_name,proto3,oneof" json:"person_name,omitempty" fake:"{beername}"` // contains filtered or unexported fields }
func (*Hello) Descriptor
deprecated
func (*Hello) GetCreatedAt ¶
func (x *Hello) GetCreatedAt() *timestamppb.Timestamp
func (*Hello) GetHelloType ¶
func (*Hello) GetPersonName ¶
func (*Hello) GetUpdatedAt ¶
func (x *Hello) GetUpdatedAt() *timestamppb.Timestamp
func (*Hello) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*Hello) ProtoMessage ¶
func (*Hello) ProtoMessage()
func (*Hello) ProtoReflect ¶
func (x *Hello) ProtoReflect() protoreflect.Message
func (*Hello) ToModel ¶
func (p *Hello) ToModel() (theModel *HelloGormModel, err error)
func (*Hello) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
func (*Hello) Validate ¶
Validate checks the field values on Hello 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 (*Hello) ValidateAll ¶
ValidateAll checks the field values on Hello 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 HelloMultiError, or nil if none found.
type HelloGormModel ¶
type HelloGormModel struct { // @gotags: fake:"skip" Id *string `gorm:"type:uuid;primaryKey;default:uuid_generate_v4();" json:"id" fake:"skip"` // @gotags: fake:"skip" CreatedAt *time.Time `gorm:"type:timestamp;" json:"created_at" fake:"skip"` // @gotags: fake:"skip" UpdatedAt *time.Time `gorm:"type:timestamp;" json:"updated_at" fake:"skip"` // @gotags: fake:"{number:1,1}" HelloType int `json:"hello_type" fake:"{number:1,1}"` // @gotags: fake:"{beername}" PersonName *string `json:"person_name" fake:"{beername}"` }
func (*HelloGormModel) TableName ¶
func (m *HelloGormModel) TableName() string
func (*HelloGormModel) ToProto ¶
func (m *HelloGormModel) ToProto() (theProto *Hello, err error)
type HelloGormModels ¶
type HelloGormModels []*HelloGormModel
func (HelloGormModels) GetByModelIds ¶
func (HelloGormModels) ToProtos ¶
func (m HelloGormModels) ToProtos() (protos HelloProtos, err error)
type HelloMultiError ¶
type HelloMultiError []error
HelloMultiError is an error wrapping multiple validation errors returned by Hello.ValidateAll() if the designated constraints aren't met.
func (HelloMultiError) AllErrors ¶
func (m HelloMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HelloMultiError) Error ¶
func (m HelloMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HelloProtos ¶
type HelloProtos []*Hello
func (HelloProtos) ToModels ¶
func (p HelloProtos) ToModels() (models HelloGormModels, err error)
type HelloType ¶
type HelloType int32
func (HelloType) Descriptor ¶
func (HelloType) Descriptor() protoreflect.EnumDescriptor
func (HelloType) EnumDescriptor
deprecated
func (HelloType) Number ¶
func (x HelloType) Number() protoreflect.EnumNumber
func (HelloType) Type ¶
func (HelloType) Type() protoreflect.EnumType
type HelloValidationError ¶
type HelloValidationError struct {
// contains filtered or unexported fields
}
HelloValidationError is the validation error returned by Hello.Validate if the designated constraints aren't met.
func (HelloValidationError) Cause ¶
func (e HelloValidationError) Cause() error
Cause function returns cause value.
func (HelloValidationError) Error ¶
func (e HelloValidationError) Error() string
Error satisfies the builtin error interface
func (HelloValidationError) ErrorName ¶
func (e HelloValidationError) ErrorName() string
ErrorName returns error name.
func (HelloValidationError) Field ¶
func (e HelloValidationError) Field() string
Field function returns field value.
func (HelloValidationError) Key ¶
func (e HelloValidationError) Key() bool
Key function returns key value.
func (HelloValidationError) Reason ¶
func (e HelloValidationError) Reason() string
Reason function returns reason value.
type Hellos ¶
type Hellos struct { Hellos []*Hello `protobuf:"bytes,1,rep,name=hellos,proto3" json:"hellos,omitempty"` // contains filtered or unexported fields }
Below here are the messages that aren't generic
func (*Hellos) Descriptor
deprecated
func (*Hellos) MarshalJSON ¶
MarshalJSON implements json.Marshaler
func (*Hellos) ProtoMessage ¶
func (*Hellos) ProtoMessage()
func (*Hellos) ProtoReflect ¶
func (x *Hellos) ProtoReflect() protoreflect.Message
func (*Hellos) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler
func (*Hellos) Validate ¶
Validate checks the field values on Hellos 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 (*Hellos) ValidateAll ¶
ValidateAll checks the field values on Hellos 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 HellosMultiError, or nil if none found.
type HellosMultiError ¶
type HellosMultiError []error
HellosMultiError is an error wrapping multiple validation errors returned by Hellos.ValidateAll() if the designated constraints aren't met.
func (HellosMultiError) AllErrors ¶
func (m HellosMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (HellosMultiError) Error ¶
func (m HellosMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type HellosValidationError ¶
type HellosValidationError struct {
// contains filtered or unexported fields
}
HellosValidationError is the validation error returned by Hellos.Validate if the designated constraints aren't met.
func (HellosValidationError) Cause ¶
func (e HellosValidationError) Cause() error
Cause function returns cause value.
func (HellosValidationError) Error ¶
func (e HellosValidationError) Error() string
Error satisfies the builtin error interface
func (HellosValidationError) ErrorName ¶
func (e HellosValidationError) ErrorName() string
ErrorName returns error name.
func (HellosValidationError) Field ¶
func (e HellosValidationError) Field() string
Field function returns field value.
func (HellosValidationError) Key ¶
func (e HellosValidationError) Key() bool
Key function returns key value.
func (HellosValidationError) Reason ¶
func (e HellosValidationError) Reason() string
Reason function returns reason value.
type ListRequest ¶
type ListRequest struct { Limit int32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"` Offset int32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"` OrderBy string `protobuf:"bytes,3,opt,name=orderBy,proto3" json:"orderBy,omitempty"` // contains filtered or unexported fields }
func (*ListRequest) Descriptor
deprecated
func (*ListRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListRequest.ProtoReflect.Descriptor instead.
func (*ListRequest) GetLimit ¶
func (x *ListRequest) GetLimit() int32
func (*ListRequest) GetOffset ¶
func (x *ListRequest) GetOffset() int32
func (*ListRequest) GetOrderBy ¶
func (x *ListRequest) GetOrderBy() string
func (*ListRequest) MarshalJSON ¶
func (msg *ListRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*ListRequest) ProtoMessage ¶
func (*ListRequest) ProtoMessage()
func (*ListRequest) ProtoReflect ¶
func (x *ListRequest) ProtoReflect() protoreflect.Message
func (*ListRequest) Reset ¶
func (x *ListRequest) Reset()
func (*ListRequest) String ¶
func (x *ListRequest) String() string
func (*ListRequest) UnmarshalJSON ¶
func (msg *ListRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*ListRequest) Validate ¶
func (m *ListRequest) Validate() error
Validate checks the field values on ListRequest 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 (*ListRequest) ValidateAll ¶
func (m *ListRequest) ValidateAll() error
ValidateAll checks the field values on ListRequest 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 ListRequestMultiError, or nil if none found.
type ListRequestMultiError ¶
type ListRequestMultiError []error
ListRequestMultiError is an error wrapping multiple validation errors returned by ListRequest.ValidateAll() if the designated constraints aren't met.
func (ListRequestMultiError) AllErrors ¶
func (m ListRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListRequestMultiError) Error ¶
func (m ListRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListRequestValidationError ¶
type ListRequestValidationError struct {
// contains filtered or unexported fields
}
ListRequestValidationError is the validation error returned by ListRequest.Validate if the designated constraints aren't met.
func (ListRequestValidationError) Cause ¶
func (e ListRequestValidationError) Cause() error
Cause function returns cause value.
func (ListRequestValidationError) Error ¶
func (e ListRequestValidationError) Error() string
Error satisfies the builtin error interface
func (ListRequestValidationError) ErrorName ¶
func (e ListRequestValidationError) ErrorName() string
ErrorName returns error name.
func (ListRequestValidationError) Field ¶
func (e ListRequestValidationError) Field() string
Field function returns field value.
func (ListRequestValidationError) Key ¶
func (e ListRequestValidationError) Key() bool
Key function returns key value.
func (ListRequestValidationError) Reason ¶
func (e ListRequestValidationError) Reason() string
Reason function returns reason value.
type UnimplementedApiServer ¶
type UnimplementedApiServer struct { }
UnimplementedApiServer should be embedded to have forward compatible implementations.
func (UnimplementedApiServer) DeleteHellos ¶
func (UnimplementedApiServer) DeleteHellos(context.Context, *DeleteRequest) (*DeleteResponse, error)
func (UnimplementedApiServer) GetHellos ¶
func (UnimplementedApiServer) GetHellos(context.Context, *GetRequest) (*Hellos, error)
func (UnimplementedApiServer) ListHellos ¶
func (UnimplementedApiServer) ListHellos(context.Context, *ListRequest) (*Hellos, error)
func (UnimplementedApiServer) UpsertHellos ¶
func (UnimplementedApiServer) UpsertHellos(context.Context, *UpsertHellosRequest) (*Hellos, error)
type UnsafeApiServer ¶
type UnsafeApiServer interface {
// contains filtered or unexported methods
}
UnsafeApiServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ApiServer will result in compilation errors.
type UpsertHellosRequest ¶
type UpsertHellosRequest struct { Hellos []*Hello `protobuf:"bytes,1,rep,name=hellos,proto3" json:"hellos,omitempty"` Fields []string `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"` // contains filtered or unexported fields }
func (*UpsertHellosRequest) Descriptor
deprecated
func (*UpsertHellosRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpsertHellosRequest.ProtoReflect.Descriptor instead.
func (*UpsertHellosRequest) GetFields ¶
func (x *UpsertHellosRequest) GetFields() []string
func (*UpsertHellosRequest) GetHellos ¶
func (x *UpsertHellosRequest) GetHellos() []*Hello
func (*UpsertHellosRequest) MarshalJSON ¶
func (msg *UpsertHellosRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler
func (*UpsertHellosRequest) ProtoMessage ¶
func (*UpsertHellosRequest) ProtoMessage()
func (*UpsertHellosRequest) ProtoReflect ¶
func (x *UpsertHellosRequest) ProtoReflect() protoreflect.Message
func (*UpsertHellosRequest) Reset ¶
func (x *UpsertHellosRequest) Reset()
func (*UpsertHellosRequest) String ¶
func (x *UpsertHellosRequest) String() string
func (*UpsertHellosRequest) UnmarshalJSON ¶
func (msg *UpsertHellosRequest) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler
func (*UpsertHellosRequest) Validate ¶
func (m *UpsertHellosRequest) Validate() error
Validate checks the field values on UpsertHellosRequest 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 (*UpsertHellosRequest) ValidateAll ¶
func (m *UpsertHellosRequest) ValidateAll() error
ValidateAll checks the field values on UpsertHellosRequest 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 UpsertHellosRequestMultiError, or nil if none found.
type UpsertHellosRequestMultiError ¶
type UpsertHellosRequestMultiError []error
UpsertHellosRequestMultiError is an error wrapping multiple validation errors returned by UpsertHellosRequest.ValidateAll() if the designated constraints aren't met.
func (UpsertHellosRequestMultiError) AllErrors ¶
func (m UpsertHellosRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpsertHellosRequestMultiError) Error ¶
func (m UpsertHellosRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpsertHellosRequestValidationError ¶
type UpsertHellosRequestValidationError struct {
// contains filtered or unexported fields
}
UpsertHellosRequestValidationError is the validation error returned by UpsertHellosRequest.Validate if the designated constraints aren't met.
func (UpsertHellosRequestValidationError) Cause ¶
func (e UpsertHellosRequestValidationError) Cause() error
Cause function returns cause value.
func (UpsertHellosRequestValidationError) Error ¶
func (e UpsertHellosRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpsertHellosRequestValidationError) ErrorName ¶
func (e UpsertHellosRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpsertHellosRequestValidationError) Field ¶
func (e UpsertHellosRequestValidationError) Field() string
Field function returns field value.
func (UpsertHellosRequestValidationError) Key ¶
func (e UpsertHellosRequestValidationError) Key() bool
Key function returns key value.
func (UpsertHellosRequestValidationError) Reason ¶
func (e UpsertHellosRequestValidationError) Reason() string
Reason function returns reason value.