Documentation ¶
Index ¶
- Constants
- type BatchRequestMutator
- type CreateRequestMutator
- func SetCreateRequest_Age(value int64) CreateRequestMutator
- func SetCreateRequest_Employment(value privatepb.Person_Employment) CreateRequestMutator
- func SetCreateRequest_FirstName(value string) CreateRequestMutator
- func SetCreateRequest_FullName(value string) CreateRequestMutator
- func SetCreateRequest_Hobby(value *privatepb.Hobby) CreateRequestMutator
- func SetCreateRequest_Id(value string) CreateRequestMutator
- func SetCreateRequest_LastName(value string) CreateRequestMutator
- type DeleteRequestMutator
- type FetchRequestMutator
- type ListRequestMutator
- type PingRequestMutator
- type Service
- func (s *Service) Batch(ctx context.Context, in *privatepb.BatchRequest) (*privatepb.BatchResponse, error)
- func (s *Service) Create(ctx context.Context, in *privatepb.CreateRequest) (*privatepb.CreateResponse, error)
- func (s *Service) Delete(ctx context.Context, in *privatepb.DeleteRequest) (*privatepb.DeleteResponse, error)
- func (s *Service) Fetch(ctx context.Context, in *privatepb.FetchRequest) (*privatepb.FetchResponse, error)
- func (s *Service) List(ctx context.Context, in *privatepb.ListRequest) (*privatepb.ListResponse, error)
- func (s *Service) Ping(ctx context.Context, in *privatepb.PingRequest) (*privatepb.PingResponse, error)
- func (s *Service) Update(ctx context.Context, in *privatepb.UpdateRequest) (*privatepb.UpdateResponse, error)
- type UpdateRequestMutator
- type Validator
Constants ¶
View Source
const ( ConverterName = "example.private.Converter" ValidatorName = "example.private.Validator" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchRequestMutator ¶
type BatchRequestMutator func(*privatepb.BatchRequest)
func SetBatchRequest_Creates ¶
func SetBatchRequest_Creates(value []*privatepb.CreateRequest) BatchRequestMutator
type CreateRequestMutator ¶
type CreateRequestMutator func(*privatepb.CreateRequest)
func SetCreateRequest_Age ¶
func SetCreateRequest_Age(value int64) CreateRequestMutator
func SetCreateRequest_Employment ¶
func SetCreateRequest_Employment(value privatepb.Person_Employment) CreateRequestMutator
func SetCreateRequest_FirstName ¶
func SetCreateRequest_FirstName(value string) CreateRequestMutator
func SetCreateRequest_FullName ¶
func SetCreateRequest_FullName(value string) CreateRequestMutator
func SetCreateRequest_Hobby ¶
func SetCreateRequest_Hobby(value *privatepb.Hobby) CreateRequestMutator
func SetCreateRequest_Id ¶
func SetCreateRequest_Id(value string) CreateRequestMutator
func SetCreateRequest_LastName ¶
func SetCreateRequest_LastName(value string) CreateRequestMutator
type DeleteRequestMutator ¶
type DeleteRequestMutator func(*privatepb.DeleteRequest)
func SetDeleteRequest_Id ¶
func SetDeleteRequest_Id(value string) DeleteRequestMutator
type FetchRequestMutator ¶
type FetchRequestMutator func(*privatepb.FetchRequest)
func SetFetchRequest_Id ¶
func SetFetchRequest_Id(value string) FetchRequestMutator
type ListRequestMutator ¶
type ListRequestMutator func(*privatepb.ListRequest)
type PingRequestMutator ¶
type PingRequestMutator func(*privatepb.PingRequest)
type Service ¶
type Service struct { Validator Impl privatepb.PeopleServer }
func (*Service) Batch ¶
func (s *Service) Batch(ctx context.Context, in *privatepb.BatchRequest) (*privatepb.BatchResponse, error)
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, in *privatepb.CreateRequest) (*privatepb.CreateResponse, error)
func (*Service) Delete ¶
func (s *Service) Delete(ctx context.Context, in *privatepb.DeleteRequest) (*privatepb.DeleteResponse, error)
func (*Service) Fetch ¶
func (s *Service) Fetch(ctx context.Context, in *privatepb.FetchRequest) (*privatepb.FetchResponse, error)
func (*Service) List ¶
func (s *Service) List(ctx context.Context, in *privatepb.ListRequest) (*privatepb.ListResponse, error)
func (*Service) Ping ¶
func (s *Service) Ping(ctx context.Context, in *privatepb.PingRequest) (*privatepb.PingResponse, error)
func (*Service) Update ¶
func (s *Service) Update(ctx context.Context, in *privatepb.UpdateRequest) (*privatepb.UpdateResponse, error)
type UpdateRequestMutator ¶
type UpdateRequestMutator func(*privatepb.UpdateRequest)
func SetUpdateRequest_Id ¶
func SetUpdateRequest_Id(value string) UpdateRequestMutator
func SetUpdateRequest_Person ¶
func SetUpdateRequest_Person(value *privatepb.Person) UpdateRequestMutator
type Validator ¶
type Validator interface { Name() string ValidatePerson(*privatepb.Person) error ByPerson(interface{}) error ValidateHobby(*privatepb.Hobby) error ByHobby(interface{}) error ValidateCoding(*privatepb.Coding) error ByCoding(interface{}) error ValidateReading(*privatepb.Reading) error ByReading(interface{}) error ValidateCycling(*privatepb.Cycling) error ByCycling(interface{}) error ValidateCreateRequest(*privatepb.CreateRequest) error ByCreateRequest(interface{}) error ValidateCreateResponse(*privatepb.CreateResponse) error ByCreateResponse(interface{}) error ValidateFetchRequest(*privatepb.FetchRequest) error ByFetchRequest(interface{}) error ValidateFetchResponse(*privatepb.FetchResponse) error ByFetchResponse(interface{}) error ValidateDeleteRequest(*privatepb.DeleteRequest) error ByDeleteRequest(interface{}) error ValidateDeleteResponse(*privatepb.DeleteResponse) error ByDeleteResponse(interface{}) error ValidateListRequest(*privatepb.ListRequest) error ByListRequest(interface{}) error ValidateListResponse(*privatepb.ListResponse) error ByListResponse(interface{}) error ValidateUpdateRequest(*privatepb.UpdateRequest) error ByUpdateRequest(interface{}) error ValidateUpdateResponse(*privatepb.UpdateResponse) error ByUpdateResponse(interface{}) error ValidateBatchRequest(*privatepb.BatchRequest) error ByBatchRequest(interface{}) error ValidateBatchResponse(*privatepb.BatchResponse) error ByBatchResponse(interface{}) error ValidatePingRequest(*privatepb.PingRequest) error ByPingRequest(interface{}) error ValidatePingResponse(*privatepb.PingResponse) error ByPingResponse(interface{}) error ValidateExternalTimestamp(*exttimestamppb.Timestamp) error ByExternalTimestamp(interface{}) error }
func NewValidator ¶
func NewValidator() Validator
Click to show internal directories.
Click to hide internal directories.