Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var HTTPEndpoints = map[Endpoint]*HTTPEndpoint{ GetCard: { Method: http.MethodGet, URL: "%s/v4/card/%s", ServiceType: ROCardService, Params: 1, }, SearchCards: { Method: http.MethodPost, URL: "%s/v4/card/actions/search", ServiceType: ROCardService, }, CreateCard: { Method: http.MethodPost, URL: "%s/v1/card", ServiceType: VRAService, }, RevokeCard: { Method: http.MethodDelete, URL: "%s/v1/card/%s", ServiceType: VRAService, Params: 1, }, VerifyIdentity: { Method: http.MethodPost, URL: "%s/v1/verify", ServiceType: IdentityService, }, ConfirmIdentity: { Method: http.MethodPost, URL: "%s/v1/confirm", ServiceType: IdentityService, }, ValidateIdentity: { Method: http.MethodPost, URL: "%s/v1/validate", ServiceType: IdentityService, }, AddRelation: { Method: http.MethodPost, URL: "%s/v4/card/%s/collections/relations", ServiceType: Cardservice, Params: 1, }, DeleteRelation: { Method: http.MethodDelete, URL: "%s/v4/card/%s/collections/relations", ServiceType: Cardservice, Params: 1, }, }
Functions ¶
func TransportClientDoer ¶
func TransportClientDoer(client Doer) func(t *TransportClient)
TransportClientDoer set a doer to Http Transport client
Types ¶
type HTTPEndpoint ¶
type HTTPEndpoint struct { URL string Method string ServiceType ServiceType Params int }
type ServiceType ¶
type ServiceType int
const ( Cardservice ServiceType = iota ROCardService IdentityService VRAService )
type TransportClient ¶
type TransportClient struct {
// contains filtered or unexported fields
}
TransportClient is implementation for virgil client transport protocol
func NewTransportClient ¶
func NewTransportClient(serviceURL string, roServiceURL string, identityServiceURL string, vraServiceURL string, opts ...func(t *TransportClient)) *TransportClient
NewTransportClient create a new instance of HTTP Transport protocol for Virgil Client You can send nil for second paramter and by defaolt will be used http.Client
func (*TransportClient) Call ¶
func (c *TransportClient) Call(endpoint endpoints.Endpoint, payload interface{}, returnObj interface{}, params ...interface{}) error
func (*TransportClient) SetToken ¶
func (c *TransportClient) SetToken(token string)
func (*TransportClient) ToServiceURL ¶
func (c *TransportClient) ToServiceURL(serviceType ServiceType) (string, error)
Click to show internal directories.
Click to hide internal directories.