Documentation
¶
Index ¶
- func MakeAEndpointCodecMap(ep AEndpointSet, ns ...string) jsonrpc.EndpointCodecMap
- func MakeATestMethodEndpoint(s InterfaceA) endpoint.Endpoint
- func MakeBCreateEndpoint(s InterfaceB) endpoint.Endpoint
- func MakeBDeleteEndpoint(s InterfaceB) endpoint.Endpoint
- func MakeBEndpointCodecMap(ep BEndpointSet, ns ...string) jsonrpc.EndpointCodecMap
- func MakeBGetAllEndpoint(s InterfaceB) endpoint.Endpoint
- func MakeBGetEndpoint(s InterfaceB) endpoint.Endpoint
- func MakeBTestMethod2Endpoint(s InterfaceB) endpoint.Endpoint
- func MakeBTestMethodEndpoint(s InterfaceB) endpoint.Endpoint
- func MakeHandlerJSONRPC(svcA InterfaceA, svcB InterfaceB, options ...ServerOption) (http.Handler, error)
- func MergeEndpointCodecMaps(ecms ...jsonrpc.EndpointCodecMap) jsonrpc.EndpointCodecMap
- type AEndpointSet
- type AInstrumentingMiddleware
- type ALoggingMiddleware
- type AliasData
- type AppClient
- type BCreateCreateRequest
- type BDeleteDeleteRequest
- type BDeleteDeleteResponse
- type BEndpointSet
- type BGetAllGetAllRequest
- type BGetGetRequest
- type BInstrumentingMiddleware
- func (s *BInstrumentingMiddleware) Create(ctx context.Context, newData Data, name string, data []byte) error
- func (s *BInstrumentingMiddleware) Delete(ctx context.Context, id uint) (string, string, error)
- func (s *BInstrumentingMiddleware) Get(ctx context.Context, id int, name string, fname string, price float32, n int, ...) (User, error)
- func (s *BInstrumentingMiddleware) GetAll(ctx context.Context, members Members) ([]*User, error)
- func (s *BInstrumentingMiddleware) TestMethod(data map[string]interface{}, ss interface{}) (map[string]map[int][]string, error)
- func (s *BInstrumentingMiddleware) TestMethod2(ctx context.Context, ns string, utype string, user string, restype string, ...) error
- type BLoggingMiddleware
- func (s *BLoggingMiddleware) Create(ctx context.Context, newData Data, name string, data []byte) error
- func (s *BLoggingMiddleware) Delete(ctx context.Context, id uint) (string, string, error)
- func (s *BLoggingMiddleware) Get(ctx context.Context, id int, name string, fname string, price float32, n int, ...) (User, error)
- func (s *BLoggingMiddleware) GetAll(ctx context.Context, members Members) ([]*User, error)
- func (s *BLoggingMiddleware) TestMethod(data map[string]interface{}, ss interface{}) (map[string]map[int][]string, error)
- func (s *BLoggingMiddleware) TestMethod2(ctx context.Context, ns string, utype string, user string, restype string, ...) error
- type BTestMethod2TestMethod2Request
- type BTestMethodTestMethodRequest
- type ClientOption
- func ATestMethodClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
- func ATestMethodClientOptions(opt ...jsonrpc.ClientOption) ClientOption
- func BCreateClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
- func BCreateClientOptions(opt ...jsonrpc.ClientOption) ClientOption
- func BDeleteClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
- func BDeleteClientOptions(opt ...jsonrpc.ClientOption) ClientOption
- func BGetAllClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
- func BGetAllClientOptions(opt ...jsonrpc.ClientOption) ClientOption
- func BGetClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
- func BGetClientOptions(opt ...jsonrpc.ClientOption) ClientOption
- func BTestMethod2ClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
- func BTestMethod2ClientOptions(opt ...jsonrpc.ClientOption) ClientOption
- func BTestMethodClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
- func BTestMethodClientOptions(opt ...jsonrpc.ClientOption) ClientOption
- func GenericClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
- func GenericClientOptions(opt ...jsonrpc.ClientOption) ClientOption
- type Data
- type ErrForbidden
- type ErrUnauthorized
- type GeoJSON
- type Info
- type InstrumentingOption
- type InterfaceA
- type InterfaceB
- type Member
- type Members
- type Profile
- type Recurse
- type ServerOption
- func ATestMethodServerEndpointMiddlewares(opt ...endpoint.Middleware) ServerOption
- func ATestMethodServerOptions(opt ...jsonrpc.ServerOption) ServerOption
- func BCreateServerEndpointMiddlewares(opt ...endpoint.Middleware) ServerOption
- func BCreateServerOptions(opt ...jsonrpc.ServerOption) ServerOption
- func BDeleteServerEndpointMiddlewares(opt ...endpoint.Middleware) ServerOption
- func BDeleteServerOptions(opt ...jsonrpc.ServerOption) ServerOption
- func BGetAllServerEndpointMiddlewares(opt ...endpoint.Middleware) ServerOption
- func BGetAllServerOptions(opt ...jsonrpc.ServerOption) ServerOption
- func BGetServerEndpointMiddlewares(opt ...endpoint.Middleware) ServerOption
- func BGetServerOptions(opt ...jsonrpc.ServerOption) ServerOption
- func BTestMethod2ServerEndpointMiddlewares(opt ...endpoint.Middleware) ServerOption
- func BTestMethod2ServerOptions(opt ...jsonrpc.ServerOption) ServerOption
- func BTestMethodServerEndpointMiddlewares(opt ...endpoint.Middleware) ServerOption
- func BTestMethodServerOptions(opt ...jsonrpc.ServerOption) ServerOption
- func GenericServerEndpointMiddlewares(v ...endpoint.Middleware) ServerOption
- func GenericServerOptions(v ...jsonrpc.ServerOption) ServerOption
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeAEndpointCodecMap ¶
func MakeAEndpointCodecMap(ep AEndpointSet, ns ...string) jsonrpc.EndpointCodecMap
func MakeATestMethodEndpoint ¶
func MakeATestMethodEndpoint(s InterfaceA) endpoint.Endpoint
func MakeBCreateEndpoint ¶
func MakeBCreateEndpoint(s InterfaceB) endpoint.Endpoint
func MakeBDeleteEndpoint ¶
func MakeBDeleteEndpoint(s InterfaceB) endpoint.Endpoint
func MakeBEndpointCodecMap ¶
func MakeBEndpointCodecMap(ep BEndpointSet, ns ...string) jsonrpc.EndpointCodecMap
func MakeBGetAllEndpoint ¶
func MakeBGetAllEndpoint(s InterfaceB) endpoint.Endpoint
func MakeBGetEndpoint ¶
func MakeBGetEndpoint(s InterfaceB) endpoint.Endpoint
func MakeBTestMethod2Endpoint ¶
func MakeBTestMethod2Endpoint(s InterfaceB) endpoint.Endpoint
func MakeBTestMethodEndpoint ¶
func MakeBTestMethodEndpoint(s InterfaceB) endpoint.Endpoint
func MakeHandlerJSONRPC ¶
func MakeHandlerJSONRPC(svcA InterfaceA, svcB InterfaceB, options ...ServerOption) (http.Handler, error)
HTTP JSONRPC Transport
func MergeEndpointCodecMaps ¶
func MergeEndpointCodecMaps(ecms ...jsonrpc.EndpointCodecMap) jsonrpc.EndpointCodecMap
Types ¶
type AEndpointSet ¶
func MakeAEndpointSet ¶
func MakeAEndpointSet(svc InterfaceA) AEndpointSet
type AInstrumentingMiddleware ¶
type AInstrumentingMiddleware struct {
// contains filtered or unexported fields
}
func (*AInstrumentingMiddleware) TestMethod ¶
func (s *AInstrumentingMiddleware) TestMethod()
type ALoggingMiddleware ¶
type ALoggingMiddleware struct {
// contains filtered or unexported fields
}
func (*ALoggingMiddleware) TestMethod ¶
func (s *ALoggingMiddleware) TestMethod()
type AppClient ¶
type AppClient struct { AClient InterfaceA BClient InterfaceB }
func NewClientJSONRPC ¶
func NewClientJSONRPC(tgt string, opts ...ClientOption) (*AppClient, error)
type BCreateCreateRequest ¶
type BDeleteDeleteRequest ¶
type BDeleteDeleteRequest struct {
Id uint `json:"id"`
}
type BDeleteDeleteResponse ¶
type BEndpointSet ¶
type BEndpointSet struct { CreateEndpoint endpoint.Endpoint DeleteEndpoint endpoint.Endpoint GetEndpoint endpoint.Endpoint GetAllEndpoint endpoint.Endpoint TestMethodEndpoint endpoint.Endpoint TestMethod2Endpoint endpoint.Endpoint }
func MakeBEndpointSet ¶
func MakeBEndpointSet(svc InterfaceB) BEndpointSet
type BGetAllGetAllRequest ¶
type BGetAllGetAllRequest struct {
Members Members `json:"members"`
}
type BGetGetRequest ¶
type BInstrumentingMiddleware ¶
type BInstrumentingMiddleware struct {
// contains filtered or unexported fields
}
func (*BInstrumentingMiddleware) TestMethod ¶
type BLoggingMiddleware ¶
type BLoggingMiddleware struct {
// contains filtered or unexported fields
}
func (*BLoggingMiddleware) TestMethod ¶
type BTestMethodTestMethodRequest ¶
type BTestMethodTestMethodRequest struct { Data map[string]interface{} `json:"data"` Ss interface{} `json:"ss"` }
type ClientOption ¶
type ClientOption func(*clientOpts)
func ATestMethodClientEndpointMiddlewares ¶
func ATestMethodClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
func ATestMethodClientOptions ¶
func ATestMethodClientOptions(opt ...jsonrpc.ClientOption) ClientOption
func BCreateClientEndpointMiddlewares ¶
func BCreateClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
func BCreateClientOptions ¶
func BCreateClientOptions(opt ...jsonrpc.ClientOption) ClientOption
func BDeleteClientEndpointMiddlewares ¶
func BDeleteClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
func BDeleteClientOptions ¶
func BDeleteClientOptions(opt ...jsonrpc.ClientOption) ClientOption
func BGetAllClientEndpointMiddlewares ¶
func BGetAllClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
func BGetAllClientOptions ¶
func BGetAllClientOptions(opt ...jsonrpc.ClientOption) ClientOption
func BGetClientEndpointMiddlewares ¶
func BGetClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
func BGetClientOptions ¶
func BGetClientOptions(opt ...jsonrpc.ClientOption) ClientOption
func BTestMethod2ClientEndpointMiddlewares ¶
func BTestMethod2ClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
func BTestMethod2ClientOptions ¶
func BTestMethod2ClientOptions(opt ...jsonrpc.ClientOption) ClientOption
func BTestMethodClientEndpointMiddlewares ¶
func BTestMethodClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
func BTestMethodClientOptions ¶
func BTestMethodClientOptions(opt ...jsonrpc.ClientOption) ClientOption
func GenericClientEndpointMiddlewares ¶
func GenericClientEndpointMiddlewares(opt ...endpoint.Middleware) ClientOption
func GenericClientOptions ¶
func GenericClientOptions(opt ...jsonrpc.ClientOption) ClientOption
type ErrForbidden ¶
type ErrForbidden struct{}
ErrForbidden forbidden.
func (ErrForbidden) Error ¶
func (ErrForbidden) Error() string
func (ErrForbidden) ErrorCode ¶
func (ErrForbidden) ErrorCode() int
ErrorCode error value implements ErrorCoder, the ErrorCode will be used when encoding the error.
func (ErrForbidden) StatusCode ¶
func (ErrForbidden) StatusCode() int
StatusCode error value implements StatusCoder, the StatusCode will be used when encoding the error.
type ErrUnauthorized ¶
type ErrUnauthorized struct{}
ErrUnauthorized unauthorized.
func (ErrUnauthorized) Error ¶
func (ErrUnauthorized) Error() string
func (ErrUnauthorized) ErrorCode ¶
func (ErrUnauthorized) ErrorCode() int
ErrorCode error value implements ErrorCoder, the ErrorCode will be used when encoding the error.
func (ErrUnauthorized) StatusCode ¶
func (ErrUnauthorized) StatusCode() int
StatusCode error value implements StatusCoder, the StatusCode will be used when encoding the error.
type InstrumentingOption ¶
type InstrumentingOption func(*instrumentingOpts)
func Namespace ¶
func Namespace(v string) InstrumentingOption
func RequestCount ¶
func RequestCount(requestCount metrics.Counter) InstrumentingOption
func RequestLatency ¶
func RequestLatency(requestLatency metrics.Histogram) InstrumentingOption
func Subsystem ¶
func Subsystem(v string) InstrumentingOption
type InterfaceA ¶
type InterfaceA interface {
TestMethod()
}
func NewClientJSONRPCA ¶
func NewClientJSONRPCA(tgt string, options ...ClientOption) (InterfaceA, error)
func NewInstrumentingAMiddleware ¶
func NewInstrumentingAMiddleware(s InterfaceA, opts ...InstrumentingOption) InterfaceA
func NewLoggingAMiddleware ¶
func NewLoggingAMiddleware(s InterfaceA, logger log.Logger) InterfaceA
type InterfaceB ¶
type InterfaceB interface { // Create new item of item. Create(ctx context.Context, newData AliasData, name string, data []byte) (err error) // Get item. Get(ctx context.Context, id int, name, fname string, price float32, n, b, cc int) (data User, err error) // GetAll more comment and more and more comment and more and more comment and more. // New line comment. GetAll(ctx context.Context, members Members) ([]*User, error) Delete(ctx context.Context, id uint) (a string, b string, err error) TestMethod(data map[string]interface{}, ss interface{}) (states map[string]map[int][]string, err error) TestMethod2(ctx context.Context, ns string, utype string, user string, restype string, resource string, permission string) error }
func NewClientJSONRPCB ¶
func NewClientJSONRPCB(tgt string, options ...ClientOption) (InterfaceB, error)
func NewInstrumentingBMiddleware ¶
func NewInstrumentingBMiddleware(s InterfaceB, opts ...InstrumentingOption) InterfaceB
func NewLoggingBMiddleware ¶
func NewLoggingBMiddleware(s InterfaceB, logger log.Logger) InterfaceB
type ServerOption ¶
type ServerOption func(*serverOpts)
func ATestMethodServerEndpointMiddlewares ¶
func ATestMethodServerEndpointMiddlewares(opt ...endpoint.Middleware) ServerOption
func ATestMethodServerOptions ¶
func ATestMethodServerOptions(opt ...jsonrpc.ServerOption) ServerOption
func BCreateServerEndpointMiddlewares ¶
func BCreateServerEndpointMiddlewares(opt ...endpoint.Middleware) ServerOption
func BCreateServerOptions ¶
func BCreateServerOptions(opt ...jsonrpc.ServerOption) ServerOption
func BDeleteServerEndpointMiddlewares ¶
func BDeleteServerEndpointMiddlewares(opt ...endpoint.Middleware) ServerOption
func BDeleteServerOptions ¶
func BDeleteServerOptions(opt ...jsonrpc.ServerOption) ServerOption
func BGetAllServerEndpointMiddlewares ¶
func BGetAllServerEndpointMiddlewares(opt ...endpoint.Middleware) ServerOption
func BGetAllServerOptions ¶
func BGetAllServerOptions(opt ...jsonrpc.ServerOption) ServerOption
func BGetServerEndpointMiddlewares ¶
func BGetServerEndpointMiddlewares(opt ...endpoint.Middleware) ServerOption
func BGetServerOptions ¶
func BGetServerOptions(opt ...jsonrpc.ServerOption) ServerOption
func BTestMethod2ServerEndpointMiddlewares ¶
func BTestMethod2ServerEndpointMiddlewares(opt ...endpoint.Middleware) ServerOption
func BTestMethod2ServerOptions ¶
func BTestMethod2ServerOptions(opt ...jsonrpc.ServerOption) ServerOption
func BTestMethodServerEndpointMiddlewares ¶
func BTestMethodServerEndpointMiddlewares(opt ...endpoint.Middleware) ServerOption
func BTestMethodServerOptions ¶
func BTestMethodServerOptions(opt ...jsonrpc.ServerOption) ServerOption
func GenericServerEndpointMiddlewares ¶
func GenericServerEndpointMiddlewares(v ...endpoint.Middleware) ServerOption
func GenericServerOptions ¶
func GenericServerOptions(v ...jsonrpc.ServerOption) ServerOption
type User ¶
type User struct { *Info ID uuid.UUID `json:"id"` Name string `json:"name"` Password string `json:"password"` Point GeoJSON `json:"point"` LastSeen time.Time `json:"last_seen"` Data AliasData `json:"data"` Photo []byte `json:"photo"` User *User `json:"user"` //Users []*User `json:"users"` Profile *Profile `json:"profile"` Recurse *Recurse `json:"recurse"` CreatedAt *time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Click to show internal directories.
Click to hide internal directories.