service

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ServiceGoTSRPCProxyCommit       = "Commit"
	ServiceGoTSRPCProxyDelete       = "Delete"
	ServiceGoTSRPCProxyGetCommitted = "GetCommitted"
	ServiceGoTSRPCProxyGetVersion   = "GetVersion"
	ServiceGoTSRPCProxyList         = "List"
	ServiceGoTSRPCProxyValidate     = "Validate"
)

Variables

View Source
var (
	ErrCommitCouldNotCommit = newCommitError(ErrorCommitCouldNotCommit)
)
View Source
var (
	ErrCouldNotLoadTableFromStore = newGetError(ErrorGetCouldNotLoadTableFromStore)
)
View Source
var (
	ErrDeleteCouldNotDeleteVersion = newDeleteError(ErrorDeleteCouldNotDeleteVersion)
)
View Source
var (
	ErrValidationCouldNotValidate = newValidationError(ErrorValidationCouldNotValidate)
)

Functions

This section is empty.

Types

type ErrorCommit

type ErrorCommit string
const (
	ErrorCommitCouldNotCommit ErrorCommit = "COULD_NOT_COMMIT"
)

func (*ErrorCommit) Error

func (e *ErrorCommit) Error() string

type ErrorDelete

type ErrorDelete string
const (
	ErrorDeleteCouldNotDeleteVersion ErrorDelete = "COULD_NOT_DELETE_VERSION"
)

func (*ErrorDelete) Error

func (e *ErrorDelete) Error() string

func (*ErrorDelete) Is

func (e *ErrorDelete) Is(err error) bool

type ErrorGet

type ErrorGet string
const (
	ErrorGetCouldNotLoadTableFromStore ErrorGet = "COULD_NOT_LOAD_TABLE_FROM_STORE"
)

func (*ErrorGet) Error

func (e *ErrorGet) Error() string

type ErrorValidation

type ErrorValidation string
const (
	ErrorValidationCouldNotValidate ErrorValidation = "COULD_NOT_LOAD_TABLE_FROM_STORE"
)

func (*ErrorValidation) Error

func (e *ErrorValidation) Error() string

type HTTPServiceGoTSRPCClient

type HTTPServiceGoTSRPCClient struct {
	URL      string
	EndPoint string
	Client   gotsrpc.Client
}

func NewDefaultServiceGoTSRPCClient

func NewDefaultServiceGoTSRPCClient(url string) *HTTPServiceGoTSRPCClient

func NewServiceGoTSRPCClient

func NewServiceGoTSRPCClient(url string, endpoint string) *HTTPServiceGoTSRPCClient

func NewServiceGoTSRPCClientWithClient

func NewServiceGoTSRPCClientWithClient(url string, endpoint string, client *go_net_http.Client) *HTTPServiceGoTSRPCClient

func (*HTTPServiceGoTSRPCClient) Commit

func (*HTTPServiceGoTSRPCClient) Delete

func (*HTTPServiceGoTSRPCClient) List

func (tsc *HTTPServiceGoTSRPCClient) List(ctx go_context.Context) (retList_0 github_com_foomo_busser_table.Map, retList_1 *ErrorGet, clientErr error)

type Service

type Service interface {
	Validate(id table.ID) (t *table.Table, vt *validation.Table, err *ErrorValidation)
	GetVersion(id table.ID, version table.Version) (t *table.Table, vt *validation.Table, err *ErrorGet)
	GetCommitted(id table.ID) (t *table.Table, vt *validation.Table, err *ErrorGet)
	Delete(id table.ID, versions []table.Version) (err *ErrorDelete)
	Commit(id table.ID, version table.Version) *ErrorCommit
	List() (table.Map, *ErrorGet)
}

type ServiceGoTSRPCProxy

type ServiceGoTSRPCProxy struct {
	EndPoint string
	// contains filtered or unexported fields
}

func NewDefaultServiceGoTSRPCProxy

func NewDefaultServiceGoTSRPCProxy(service Service) *ServiceGoTSRPCProxy

func NewServiceGoTSRPCProxy

func NewServiceGoTSRPCProxy(service Service, endpoint string) *ServiceGoTSRPCProxy

func (*ServiceGoTSRPCProxy) ServeHTTP

func (p *ServiceGoTSRPCProxy) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP exposes your service

Jump to

Keyboard shortcuts

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