Documentation ¶
Index ¶
- func DecodeSecureRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)
- func DecodeSigninRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)
- func EncodeSecureResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
- func EncodeSigninResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
- func NewSecureHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewSecurePayload(message *secured_servicepb.SecureRequest, token string) *securedservice.SecurePayload
- func NewSecureResponse(result string) *secured_servicepb.SecureResponse
- func NewSigninHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewSigninPayload(username string, password string) *securedservice.SigninPayload
- func NewSigninResponse(result *securedservice.Creds) *secured_servicepb.SigninResponse
- func ValidateSecureRequest(message *secured_servicepb.SecureRequest) (err error)
- type ErrorNamer
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeSecureRequest ¶
DecodeSecureRequest decodes requests sent to "secured_service" service "secure" endpoint.
func DecodeSigninRequest ¶
DecodeSigninRequest decodes requests sent to "secured_service" service "signin" endpoint.
func EncodeSecureResponse ¶
func EncodeSecureResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
EncodeSecureResponse encodes responses from the "secured_service" service "secure" endpoint.
func EncodeSigninResponse ¶
func EncodeSigninResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
EncodeSigninResponse encodes responses from the "secured_service" service "signin" endpoint.
func NewSecureHandler ¶
func NewSecureHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
NewSecureHandler creates a gRPC handler which serves the "secured_service" service "secure" endpoint.
func NewSecurePayload ¶
func NewSecurePayload(message *secured_servicepb.SecureRequest, token string) *securedservice.SecurePayload
NewSecurePayload builds the payload of the "secure" endpoint of the "secured_service" service from the gRPC request type.
func NewSecureResponse ¶
func NewSecureResponse(result string) *secured_servicepb.SecureResponse
NewSecureResponse builds the gRPC response type from the result of the "secure" endpoint of the "secured_service" service.
func NewSigninHandler ¶
func NewSigninHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
NewSigninHandler creates a gRPC handler which serves the "secured_service" service "signin" endpoint.
func NewSigninPayload ¶
func NewSigninPayload(username string, password string) *securedservice.SigninPayload
NewSigninPayload builds the payload of the "signin" endpoint of the "secured_service" service from the gRPC request type.
func NewSigninResponse ¶
func NewSigninResponse(result *securedservice.Creds) *secured_servicepb.SigninResponse
NewSigninResponse builds the gRPC response type from the result of the "signin" endpoint of the "secured_service" service.
func ValidateSecureRequest ¶
func ValidateSecureRequest(message *secured_servicepb.SecureRequest) (err error)
ValidateSecureRequest runs the validations defined on SecureRequest.
Types ¶
type ErrorNamer ¶
type ErrorNamer interface {
ErrorName() string
}
ErrorNamer is an interface implemented by generated error structs that exposes the name of the error as defined in the expr.
type Server ¶
type Server struct { SigninH goagrpc.UnaryHandler SecureH goagrpc.UnaryHandler }
Server implements the secured_servicepb.SecuredServiceServer interface.
func New ¶
func New(e *securedservice.Endpoints, uh goagrpc.UnaryHandler) *Server
New instantiates the server struct with the secured_service service endpoints.
func (*Server) Secure ¶
func (s *Server) Secure(ctx context.Context, message *secured_servicepb.SecureRequest) (*secured_servicepb.SecureResponse, error)
Secure implements the "Secure" method in secured_servicepb.SecuredServiceServer interface.
func (*Server) Signin ¶
func (s *Server) Signin(ctx context.Context, message *secured_servicepb.SigninRequest) (*secured_servicepb.SigninResponse, error)
Signin implements the "Signin" method in secured_servicepb.SecuredServiceServer interface.