Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Deserialize ¶
Deserialize is the standard way to decode objects. correspond to Serialize().
Types ¶
type AuthorizedHandler ¶
type AuthorizedHandler func(requestbody []byte, auth SignatureInfo) (interface{}, error)
AuthorizedHandler is the function executed when a call should be authorized first
type Handler ¶
Handler is the function executed when a call matches its name
type ServiceError ¶
type ServiceError struct {
ErrorMessage string `json:"errmsg"`
}
ServiceError is the standard error response
type ServiceServer ¶
ServiceServer is the server instance
func NewServiceServer ¶
func NewServiceServer(addr string) ServiceServer
NewServiceServer creates a service server
func (ServiceServer) AuthorizedCallable ¶
func (ss ServiceServer) AuthorizedCallable(name string, handler AuthorizedHandler)
AuthorizedCallable sets a callable function and its handler
func (ServiceServer) Callable ¶
func (ss ServiceServer) Callable(name string, handler Handler)
Callable sets a callable function and its handler
func (ServiceServer) StartServing ¶
func (ss ServiceServer) StartServing() error
StartServing starts the http server according to the info of ss
Click to show internal directories.
Click to hide internal directories.