sprinklesv1

package
v0.0.0-...-0a7fcff Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: Apache-2.0 Imports: 36 Imported by: 5

Documentation

Overview

Package sprinklesv1 is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
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

View Source
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.

View Source
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)

View Source
var File_sprinkles_v1_api_proto protoreflect.FileDescriptor
View Source
var File_sprinkles_v1_enums_proto protoreflect.FileDescriptor
View Source
var File_sprinkles_v1_requests_proto protoreflect.FileDescriptor
View Source
var File_sprinkles_v1_types_proto protoreflect.FileDescriptor

Functions

func DeleteHelloGormModels

func DeleteHelloGormModels(ctx context.Context, tx *gorm.DB, ids []string) error

func RegisterApiHandler

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

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

func RegisterApiHandlerClient

func RegisterApiHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ApiClient) error

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

func RegisterApiHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ApiServer) error

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

Cause function returns cause value.

func (DeleteRequestValidationError) Error

Error satisfies the builtin error interface

func (DeleteRequestValidationError) ErrorName

func (e DeleteRequestValidationError) ErrorName() string

ErrorName returns error name.

func (DeleteRequestValidationError) Field

Field function returns field value.

func (DeleteRequestValidationError) Key

Key function returns key value.

func (DeleteRequestValidationError) Reason

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

Cause function returns cause value.

func (DeleteResponseValidationError) Error

Error satisfies the builtin error interface

func (DeleteResponseValidationError) ErrorName

func (e DeleteResponseValidationError) ErrorName() string

ErrorName returns error name.

func (DeleteResponseValidationError) Field

Field function returns field value.

func (DeleteResponseValidationError) Key

Key function returns key value.

func (DeleteResponseValidationError) Reason

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) Descriptor() ([]byte, []int)

Deprecated: Use Empty.ProtoReflect.Descriptor instead.

func (*Empty) MarshalJSON

func (msg *Empty) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*Empty) ProtoMessage

func (*Empty) ProtoMessage()

func (*Empty) ProtoReflect

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

func (*Empty) Reset

func (x *Empty) Reset()

func (*Empty) String

func (x *Empty) String() string

func (*Empty) UnmarshalJSON

func (msg *Empty) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

func (*Empty) Validate

func (m *Empty) Validate() error

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

func (m *Empty) ValidateAll() error

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

Error satisfies the builtin error interface

func (GetRequestValidationError) ErrorName

func (e GetRequestValidationError) ErrorName() string

ErrorName returns error name.

func (GetRequestValidationError) Field

Field function returns field value.

func (GetRequestValidationError) Key

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) Descriptor() ([]byte, []int)

Deprecated: Use Hello.ProtoReflect.Descriptor instead.

func (*Hello) GetCreatedAt

func (x *Hello) GetCreatedAt() *timestamppb.Timestamp

func (*Hello) GetHelloType

func (x *Hello) GetHelloType() HelloType

func (*Hello) GetId

func (x *Hello) GetId() string

func (*Hello) GetPersonName

func (x *Hello) GetPersonName() string

func (*Hello) GetUpdatedAt

func (x *Hello) GetUpdatedAt() *timestamppb.Timestamp

func (*Hello) MarshalJSON

func (msg *Hello) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*Hello) ProtoMessage

func (*Hello) ProtoMessage()

func (*Hello) ProtoReflect

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

func (*Hello) Reset

func (x *Hello) Reset()

func (*Hello) String

func (x *Hello) String() string

func (*Hello) ToModel

func (p *Hello) ToModel() (theModel *HelloGormModel, err error)

func (*Hello) UnmarshalJSON

func (msg *Hello) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

func (*Hello) Validate

func (m *Hello) Validate() error

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

func (m *Hello) ValidateAll() error

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 (m HelloGormModels) GetByModelIds(ctx context.Context, tx *gorm.DB, preloads ...string) (err error)

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) GetByIds

func (p *HelloProtos) GetByIds(ctx context.Context, tx *gorm.DB, ids []string, preloads ...string) (err error)

func (*HelloProtos) List

func (p *HelloProtos) List(ctx context.Context, tx *gorm.DB, limit, offset int, order interface{}, preloads ...string) (err error)

func (HelloProtos) ToModels

func (p HelloProtos) ToModels() (models HelloGormModels, err error)

func (*HelloProtos) Upsert

func (p *HelloProtos) Upsert(ctx context.Context, tx *gorm.DB, selects, omits []string, fullSaveAssociations bool, preloads ...string) (err error)

type HelloType

type HelloType int32
const (
	HelloType_HELLO_GENERIC  HelloType = 0
	HelloType_HELLO_SPECIFIC HelloType = 1
)

func (HelloType) Descriptor

func (HelloType) Descriptor() protoreflect.EnumDescriptor

func (HelloType) Enum

func (x HelloType) Enum() *HelloType

func (HelloType) EnumDescriptor deprecated

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

Deprecated: Use HelloType.Descriptor instead.

func (HelloType) Number

func (x HelloType) Number() protoreflect.EnumNumber

func (HelloType) String

func (x HelloType) String() string

func (HelloType) Type

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) Descriptor() ([]byte, []int)

Deprecated: Use Hellos.ProtoReflect.Descriptor instead.

func (*Hellos) GetHellos

func (x *Hellos) GetHellos() []*Hello

func (*Hellos) MarshalJSON

func (msg *Hellos) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler

func (*Hellos) ProtoMessage

func (*Hellos) ProtoMessage()

func (*Hellos) ProtoReflect

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

func (*Hellos) Reset

func (x *Hellos) Reset()

func (*Hellos) String

func (x *Hellos) String() string

func (*Hellos) UnmarshalJSON

func (msg *Hellos) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler

func (*Hellos) Validate

func (m *Hellos) Validate() error

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

func (m *Hellos) ValidateAll() error

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

Cause function returns cause value.

func (ListRequestValidationError) Error

Error satisfies the builtin error interface

func (ListRequestValidationError) ErrorName

func (e ListRequestValidationError) ErrorName() string

ErrorName returns error name.

func (ListRequestValidationError) Field

Field function returns field value.

func (ListRequestValidationError) Key

Key function returns key value.

func (ListRequestValidationError) Reason

Reason function returns reason value.

type UnimplementedApiServer

type UnimplementedApiServer struct {
}

UnimplementedApiServer should be embedded to have forward compatible implementations.

func (UnimplementedApiServer) DeleteHellos

func (UnimplementedApiServer) GetHellos

func (UnimplementedApiServer) Healthy

func (UnimplementedApiServer) ListHellos

func (UnimplementedApiServer) Ready

func (UnimplementedApiServer) UpsertHellos

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

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

Cause function returns cause value.

func (UpsertHellosRequestValidationError) Error

Error satisfies the builtin error interface

func (UpsertHellosRequestValidationError) ErrorName

ErrorName returns error name.

func (UpsertHellosRequestValidationError) Field

Field function returns field value.

func (UpsertHellosRequestValidationError) Key

Key function returns key value.

func (UpsertHellosRequestValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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