v2

package
v0.0.0-...-d095f68 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

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

type Service struct {
	Validator
	Converter
	publicpb.PeopleServer
	Private *private.Service
}

func (*Service) Batch

func (*Service) Create

func (*Service) Delete

func (*Service) Get

func (*Service) Ping

func (*Service) Update

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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