Documentation ¶
Overview ¶
Package api - service integration and contract types
Index ¶
- func ClientEndpoints() transport.HTTPEndpoints
- type ClientService
- type CreateIdentityRequest
- type CreateIdentityResponse
- type FulfillOrderRequest
- type FulfillOrderResponse
- type FulfillOrderSecretRequest
- type FulfillOrderSecretResponse
- type GetIdentityRequest
- type GetIdentityResponse
- type GetOrderRequest
- type GetOrderResponse
- type IdentityListRequest
- type IdentityListResponse
- type MilagroClientService
- type OrderListRequest
- type OrderListResponse
- type OrderRequest
- type OrderResponse
- type OrderSecretRequest
- type OrderSecretResponse
- type StatusResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientEndpoints ¶
func ClientEndpoints() transport.HTTPEndpoints
ClientEndpoints return only the exported endpoints
Types ¶
type ClientService ¶
type ClientService interface { FulfillOrder(req *FulfillOrderRequest) (*FulfillOrderResponse, error) FulfillOrderSecret(req *FulfillOrderSecretRequest) (*FulfillOrderSecretResponse, error) Status(token string) (*StatusResponse, error) }
ClientService - enables service to be mocked
func NewHTTPClient ¶
func NewHTTPClient(instance string, logger *logger.Logger) (ClientService, error)
NewHTTPClient returns Service backed by an HTTP server living at the remote instance
type CreateIdentityRequest ¶
type CreateIdentityRequest struct { Name string `json:"name,omitempty" validate:"required,alphanum"` Extension map[string]string `json:"extension,omitempty"` }
CreateIdentityRequest -
type CreateIdentityResponse ¶
type CreateIdentityResponse struct { IDDocumentCID string `json:"idDocumentCID,omitempty"` Extension map[string]string `json:"extension,omitempty"` }
CreateIdentityResponse -
type FulfillOrderRequest ¶
type FulfillOrderRequest struct { OrderPart1CID string `json:"orderPart1CID,omitempty" validate:"IPFS"` DocumentCID string `json:"documentCID,omitempty" validate:"IPFS"` Extension map[string]string `json:"extension,omitempty"` }
FulfillOrderRequest -
type FulfillOrderResponse ¶
type FulfillOrderResponse struct { OrderPart2CID string `json:"orderPart2CID,omitempty"` Extension map[string]string `json:"extension,omitempty"` }
FulfillOrderResponse -
type FulfillOrderSecretRequest ¶
type FulfillOrderSecretRequest struct { OrderPart3CID string `json:"orderPart3CID,omitempty" validate:"IPFS"` SenderDocumentCID string `json:"documentCID,omitempty" validate:"IPFS"` Extension map[string]string `json:"extension,omitempty"` }
FulfillOrderSecretRequest -
type FulfillOrderSecretResponse ¶
type FulfillOrderSecretResponse struct { OrderPart4CID string `json:"orderPart4CID,omitempty"` Extension map[string]string `json:"extension,omitempty"` }
FulfillOrderSecretResponse -
type GetIdentityRequest ¶
type GetIdentityRequest struct {
IDDocumentCID string `json:"idDocumentCID" validate:"IPFS"`
}
GetIdentityRequest -
type GetIdentityResponse ¶
type GetIdentityResponse struct { IDDocumentCID string `json:"idDocumentCID,omitempty"` AuthenticationReference string `json:"authenticationReference,omitempty"` BeneficiaryECPublicKey string `json:"beneficiaryECPublicKey,omitempty"` SikePublicKey string `json:"sikePublicKey,omitempty"` BLSPublicKey string `json:"blsPublicKey,omitempty"` Handle string `json:"handle,omitempty"` Email string `json:"email,omitempty"` Username string `json:"string,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` Extension map[string]string `json:"extension,omitempty"` }
GetIdentityResponse -
type GetOrderRequest ¶
type GetOrderRequest struct { OrderReference string `json:"orderReference,omitempty"` Extension map[string]string `json:"extension,omitempty"` }
GetOrderRequest -
type GetOrderResponse ¶
type GetOrderResponse struct { OrderCID string `json:"orderCID,omitempty"` Order string `json:"order,omitempty"` Timestamp int64 `json:"timestamp,omitempty"` Extension map[string]string `json:"extension,omitempty"` }
GetOrderResponse -
type IdentityListRequest ¶
type IdentityListRequest struct { Page int `json:"page,omitempty"` PerPage int `json:"perPage,omitempty"` SortBy string `json:"sortBy,omitempty"` Extension map[string]string `json:"extension,omitempty"` }
IdentityListRequest -
type IdentityListResponse ¶
type IdentityListResponse struct { IDDocumentList []GetIdentityResponse `json:"idDocumentList,omitempty"` Extension map[string]string `json:"extension,omitempty"` }
IdentityListResponse -
type MilagroClientService ¶
type MilagroClientService struct {
// contains filtered or unexported fields
}
MilagroClientService - implements Service Interface
func (MilagroClientService) FulfillOrder ¶
func (c MilagroClientService) FulfillOrder(req *FulfillOrderRequest) (*FulfillOrderResponse, error)
FulfillOrder -
func (MilagroClientService) FulfillOrderSecret ¶
func (c MilagroClientService) FulfillOrderSecret(req *FulfillOrderSecretRequest) (*FulfillOrderSecretResponse, error)
FulfillOrderSecret -
func (MilagroClientService) Status ¶
func (c MilagroClientService) Status(token string) (*StatusResponse, error)
Status - Allows a client to see the status of the server that it is connecting too
type OrderListRequest ¶
type OrderListRequest struct { Page int `json:"page,omitempty"` PerPage int `json:"perPage,omitempty"` SortBy string `json:"sortBy,omitempty"` Extension map[string]string `json:"extension,omitempty"` }
OrderListRequest -
type OrderListResponse ¶
type OrderListResponse struct { OrderReference []string `json:"orderReference,omitempty"` Extension map[string]string `json:"extension,omitempty"` }
OrderListResponse -
type OrderRequest ¶
type OrderRequest struct { // BeneficiaryIDDocumentCID string `json:"BeneficiaryIDDocumentCID,omitempty" validate:"omitempty,IPFS"` BeneficiaryIDDocumentCID string `json:"beneficiaryIDDocumentCID,omitempty"` Extension map[string]string `json:"extension,omitempty"` }
OrderRequest -
type OrderResponse ¶
type OrderResponse struct { // OrderPart1CID string `json:"orderPart1CID,omitempty" validate:"omitempty,IPFS"` // OrderPart2CID string `json:"orderPart2CID,omitempty" validate:"omitempty,IPFS"` OrderReference string `json:"orderReference,omitempty" validate:"omitempty"` Commitment string `json:"commitment,omitempty"` CreatedAt int64 `json:"createdAt,omitempty"` Extension map[string]string `json:"extension,omitempty"` }
OrderResponse -
type OrderSecretRequest ¶
type OrderSecretRequest struct { OrderReference string `json:"orderReference,omitempty" validate:"omitempty"` BeneficiaryIDDocumentCID string `json:"beneficiaryIDDocumentCID,omitempty" validate:"omitempty,IPFS"` Extension map[string]string `json:"extension,omitempty"` }
OrderSecretRequest -
type OrderSecretResponse ¶
type OrderSecretResponse struct { Secret string `json:"secret,omitempty"` Commitment string `json:"commitment,omitempty"` OrderReference string `json:"orderReference,omitempty" validate:"omitempty"` Extension map[string]string `json:"extension,omitempty"` }
OrderSecretResponse -
type StatusResponse ¶
type StatusResponse struct { Application string `json:"application,omitempty"` TimeStamp time.Time `json:"timeStamp,omitempty"` APIVersion string `json:"apiVersion,omitempty"` NodeCID string `json:"nodeCID,omitempty"` ExtensionVendor string `json:"extensionVendor,omitempty"` Extension map[string]string `json:"extension,omitempty"` Plugin string `json:"plugin,omitempty"` NodeType string `json:"nodeType,omitempty"` }
StatusResponse -