Documentation ¶
Index ¶
- Constants
- type Converter
- type Service
- func (s *Service) Batch(ctx context.Context, in *publicpb.BatchRequest) (*publicpb.BatchResponse, error)
- func (s *Service) BatchImpl(ctx context.Context, in *publicpb.BatchRequest, ...) (*publicpb.BatchResponse, *privatepb.BatchResponse, error)
- func (s *Service) Create(ctx context.Context, in *publicpb.CreateRequest) (*publicpb.CreateResponse, error)
- func (s *Service) CreateImpl(ctx context.Context, in *publicpb.CreateRequest, ...) (*publicpb.CreateResponse, *privatepb.CreateResponse, error)
- func (s *Service) Delete(ctx context.Context, in *publicpb.DeleteRequest) (*publicpb.DeleteResponse, error)
- func (s *Service) DeleteImpl(ctx context.Context, in *publicpb.DeleteRequest, ...) (*publicpb.DeleteResponse, *privatepb.DeleteResponse, error)
- func (s *Service) Get(ctx context.Context, in *publicpb.GetRequest) (*publicpb.GetResponse, error)
- func (s *Service) GetImpl(ctx context.Context, in *publicpb.GetRequest, ...) (*publicpb.GetResponse, *privatepb.FetchResponse, error)
- func (s *Service) Ping(ctx context.Context, in *publicpb.PingRequest) (*publicpb.PingResponse, error)
- func (s *Service) PingImpl(ctx context.Context, in *publicpb.PingRequest, ...) (*publicpb.PingResponse, *privatepb.PingResponse, error)
- func (s *Service) Update(ctx context.Context, in *publicpb.UpdateRequest) (*publicpb.UpdateResponse, error)
- func (s *Service) UpdateImpl(ctx context.Context, in *publicpb.UpdateRequest, ...) (*publicpb.UpdateResponse, *privatepb.UpdateResponse, error)
- type Validator
Constants ¶
View Source
const ( ConverterName = "example.v2.Converter" ValidatorName = "example.v2.Validator" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Converter ¶
type Converter interface { Name() string ToPublicPerson(*privatepb.Person) (*publicpb.Person, error) ToDeprecatedPublicPerson(*privatepb.Person) (*publicpb.Person, error) ToPrivatePerson(*publicpb.Person) *privatepb.Person ToPublicHobby(*privatepb.Hobby) (*publicpb.Hobby, error) ToDeprecatedPublicHobby(*privatepb.Hobby) (*publicpb.Hobby, error) ToPrivateHobby(*publicpb.Hobby) *privatepb.Hobby ToPublicCoding(*privatepb.Coding) (*publicpb.Coding, error) ToDeprecatedPublicCoding(*privatepb.Coding) (*publicpb.Coding, error) ToPrivateCoding(*publicpb.Coding) *privatepb.Coding ToPublicReading(*privatepb.Reading) (*publicpb.Reading, error) ToDeprecatedPublicReading(*privatepb.Reading) (*publicpb.Reading, error) ToPrivateReading(*publicpb.Reading) *privatepb.Reading ToPublicCycling(*privatepb.Cycling) (*publicpb.Cycling, error) ToDeprecatedPublicCycling(*privatepb.Cycling) (*publicpb.Cycling, error) ToPrivateCycling(*publicpb.Cycling) *privatepb.Cycling ToPublicCreateRequest(*privatepb.CreateRequest) (*publicpb.CreateRequest, error) ToDeprecatedPublicCreateRequest(*privatepb.CreateRequest) (*publicpb.CreateRequest, error) ToPrivateCreateRequest(*publicpb.CreateRequest) *privatepb.CreateRequest ToPublicCreateResponse(*privatepb.CreateResponse) (*publicpb.CreateResponse, error) ToDeprecatedPublicCreateResponse(*privatepb.CreateResponse) (*publicpb.CreateResponse, error) ToPrivateCreateResponse(*publicpb.CreateResponse) *privatepb.CreateResponse ToPublicGetRequest(*privatepb.FetchRequest) (*publicpb.GetRequest, error) ToDeprecatedPublicGetRequest(*privatepb.FetchRequest) (*publicpb.GetRequest, error) ToPrivateFetchRequest(*publicpb.GetRequest) *privatepb.FetchRequest ToPublicGetResponse(*privatepb.FetchResponse) (*publicpb.GetResponse, error) ToDeprecatedPublicGetResponse(*privatepb.FetchResponse) (*publicpb.GetResponse, error) ToPrivateFetchResponse(*publicpb.GetResponse) *privatepb.FetchResponse ToPublicDeleteRequest(*privatepb.DeleteRequest) (*publicpb.DeleteRequest, error) ToDeprecatedPublicDeleteRequest(*privatepb.DeleteRequest) (*publicpb.DeleteRequest, error) ToPrivateDeleteRequest(*publicpb.DeleteRequest) *privatepb.DeleteRequest ToPublicDeleteResponse(*privatepb.DeleteResponse) (*publicpb.DeleteResponse, error) ToDeprecatedPublicDeleteResponse(*privatepb.DeleteResponse) (*publicpb.DeleteResponse, error) ToPrivateDeleteResponse(*publicpb.DeleteResponse) *privatepb.DeleteResponse ToPublicUpdateRequest(*privatepb.UpdateRequest) (*publicpb.UpdateRequest, error) ToDeprecatedPublicUpdateRequest(*privatepb.UpdateRequest) (*publicpb.UpdateRequest, error) ToPrivateUpdateRequest(*publicpb.UpdateRequest) *privatepb.UpdateRequest ToPublicUpdateResponse(*privatepb.UpdateResponse) (*publicpb.UpdateResponse, error) ToDeprecatedPublicUpdateResponse(*privatepb.UpdateResponse) (*publicpb.UpdateResponse, error) ToPrivateUpdateResponse(*publicpb.UpdateResponse) *privatepb.UpdateResponse ToPublicBatchRequest(*privatepb.BatchRequest) (*publicpb.BatchRequest, error) ToDeprecatedPublicBatchRequest(*privatepb.BatchRequest) (*publicpb.BatchRequest, error) ToPrivateBatchRequest(*publicpb.BatchRequest) *privatepb.BatchRequest ToPublicBatchResponse(*privatepb.BatchResponse) (*publicpb.BatchResponse, error) ToDeprecatedPublicBatchResponse(*privatepb.BatchResponse) (*publicpb.BatchResponse, error) ToPrivateBatchResponse(*publicpb.BatchResponse) *privatepb.BatchResponse ToPublicPingRequest(*privatepb.PingRequest) (*publicpb.PingRequest, error) ToDeprecatedPublicPingRequest(*privatepb.PingRequest) (*publicpb.PingRequest, error) ToPrivatePingRequest(*publicpb.PingRequest) *privatepb.PingRequest ToPublicPingResponse(*privatepb.PingResponse) (*publicpb.PingResponse, error) ToDeprecatedPublicPingResponse(*privatepb.PingResponse) (*publicpb.PingResponse, error) ToPrivatePingResponse(*publicpb.PingResponse) *privatepb.PingResponse ToPublicExternalTimestamp(*exttimestamppb.Timestamp) (*exttimestamppb.Timestamp, error) ToDeprecatedPublicExternalTimestamp(*exttimestamppb.Timestamp) (*exttimestamppb.Timestamp, error) ToPrivateExternalTimestamp(*exttimestamppb.Timestamp) *exttimestamppb.Timestamp }
func NewConverter ¶
func NewConverter() Converter
type Service ¶
func (*Service) Batch ¶
func (s *Service) Batch(ctx context.Context, in *publicpb.BatchRequest) (*publicpb.BatchResponse, error)
func (*Service) BatchImpl ¶
func (s *Service) BatchImpl(ctx context.Context, in *publicpb.BatchRequest, mutators ...private.BatchRequestMutator) (*publicpb.BatchResponse, *privatepb.BatchResponse, error)
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, in *publicpb.CreateRequest) (*publicpb.CreateResponse, error)
func (*Service) CreateImpl ¶
func (s *Service) CreateImpl(ctx context.Context, in *publicpb.CreateRequest, mutators ...private.CreateRequestMutator) (*publicpb.CreateResponse, *privatepb.CreateResponse, error)
func (*Service) Delete ¶
func (s *Service) Delete(ctx context.Context, in *publicpb.DeleteRequest) (*publicpb.DeleteResponse, error)
func (*Service) DeleteImpl ¶
func (s *Service) DeleteImpl(ctx context.Context, in *publicpb.DeleteRequest, mutators ...private.DeleteRequestMutator) (*publicpb.DeleteResponse, *privatepb.DeleteResponse, error)
func (*Service) Get ¶
func (s *Service) Get(ctx context.Context, in *publicpb.GetRequest) (*publicpb.GetResponse, error)
func (*Service) GetImpl ¶
func (s *Service) GetImpl(ctx context.Context, in *publicpb.GetRequest, mutators ...private.FetchRequestMutator) (*publicpb.GetResponse, *privatepb.FetchResponse, error)
func (*Service) Ping ¶
func (s *Service) Ping(ctx context.Context, in *publicpb.PingRequest) (*publicpb.PingResponse, error)
func (*Service) PingImpl ¶
func (s *Service) PingImpl(ctx context.Context, in *publicpb.PingRequest, mutators ...private.PingRequestMutator) (*publicpb.PingResponse, *privatepb.PingResponse, error)
func (*Service) Update ¶
func (s *Service) Update(ctx context.Context, in *publicpb.UpdateRequest) (*publicpb.UpdateResponse, error)
func (*Service) UpdateImpl ¶
func (s *Service) UpdateImpl(ctx context.Context, in *publicpb.UpdateRequest, mutators ...private.UpdateRequestMutator) (*publicpb.UpdateResponse, *privatepb.UpdateResponse, error)
type Validator ¶
type Validator interface { Name() string ValidatePerson(*publicpb.Person) error ByPerson(interface{}) error ValidateHobby(*publicpb.Hobby) error ByHobby(interface{}) error ValidateCoding(*publicpb.Coding) error ByCoding(interface{}) error ValidateReading(*publicpb.Reading) error ByReading(interface{}) error ValidateCycling(*publicpb.Cycling) error ByCycling(interface{}) error ValidateCreateRequest(*publicpb.CreateRequest) error ByCreateRequest(interface{}) error ValidateCreateResponse(*publicpb.CreateResponse) error ByCreateResponse(interface{}) error ValidateGetRequest(*publicpb.GetRequest) error ByGetRequest(interface{}) error ValidateGetResponse(*publicpb.GetResponse) error ByGetResponse(interface{}) error ValidateDeleteRequest(*publicpb.DeleteRequest) error ByDeleteRequest(interface{}) error ValidateDeleteResponse(*publicpb.DeleteResponse) error ByDeleteResponse(interface{}) error ValidateUpdateRequest(*publicpb.UpdateRequest) error ByUpdateRequest(interface{}) error ValidateUpdateResponse(*publicpb.UpdateResponse) error ByUpdateResponse(interface{}) error ValidateBatchRequest(*publicpb.BatchRequest) error ByBatchRequest(interface{}) error ValidateBatchResponse(*publicpb.BatchResponse) error ByBatchResponse(interface{}) error ValidatePingRequest(*publicpb.PingRequest) error ByPingRequest(interface{}) error ValidatePingResponse(*publicpb.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.