Documentation ¶
Index ¶
- func DecodeDecryptRequest(_ context.Context, r *http.Request) (interface{}, error)
- func DecodeEncryptRequest(_ context.Context, r *http.Request) (interface{}, error)
- func EncodeResponse(_ context.Context, w http.ResponseWriter, response interface{}) error
- func MakeDecryptEndpoint(svc EncryptService) endpoint.Endpoint
- func MakeEncryptEndpoint(svc EncryptService) endpoint.Endpoint
- type DecryptRequest
- type DecryptResponse
- type EncryptRequest
- type EncryptResponse
- type EncryptService
- type EncryptServiceInstance
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeDecryptRequest ¶
DecodeDecryptRequest fills struct from JSON details of request
func DecodeEncryptRequest ¶
DecodeEncryptRequest fills struct from JSON details of request
func EncodeResponse ¶
func EncodeResponse(_ context.Context, w http.ResponseWriter, response interface{}) error
EncodeResponse is common for both the reponses from encrypt and decrypt services
func MakeDecryptEndpoint ¶
func MakeDecryptEndpoint(svc EncryptService) endpoint.Endpoint
MakeDecryptEndpoint forms endpoint for request/response of decrypt function
func MakeEncryptEndpoint ¶
func MakeEncryptEndpoint(svc EncryptService) endpoint.Endpoint
MakeEncryptEndpoint forms endpoint for request/response of encrypt function
Types ¶
type DecryptRequest ¶
DecryptRequest strctures request coming from client
type DecryptResponse ¶
DecryptResponse strctures response going to the client
type EncryptRequest ¶
EncryptRequest strctures request coming from client
type EncryptResponse ¶
EncryptResponse strctures response going to the client
type EncryptService ¶
type EncryptService interface { Encrypt(context.Context, string, string) (string, error) Decrypt(context.Context, string, string) (string, error) }
EncryptService is a blueprint for our service
type EncryptServiceInstance ¶
type EncryptServiceInstance struct{}
EncryptServiceInstance is the implementation of interface for micro service