connector

package
v0.0.0-...-5cd89e3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cli iface.Client) *Client

func (*Client) FulfillEvent

func (c *Client) FulfillEvent(ctx context.Context, req FulfillEventRequest) *Error

func (*Client) VerifyPassport

func (c *Client) VerifyPassport(ctx context.Context, req VerifyPassportRequest) error

type Error

type Error struct {
	Code ErrorCode
	// contains filtered or unexported fields
}

func (*Error) Error

func (e *Error) Error() string

type ErrorCode

type ErrorCode string

ErrorCode represents an error with a code indicating the unhappy flow that occurred

const (
	CodeEventExpired  ErrorCode = "event_expired"   // event type is expired
	CodeEventDisabled ErrorCode = "event_disabled"  // event type is disabled or not configured
	CodeEventNotFound ErrorCode = "event_not_found" // specific event not found for user
	CodeDidUnknown    ErrorCode = "did_unknown"     // user DID is unknown, while external_id was provided
	CodeInternalError ErrorCode = "internal_error"  // other errors
)

func (ErrorCode) JSONAPIError

func (c ErrorCode) JSONAPIError() *jsonapi.ErrorObject

type FulfillEventRequest

type FulfillEventRequest struct {
	UserDID    string  `json:"user_did"`
	EventType  string  `json:"event_type"`
	ExternalID *string `json:"external_id,omitempty"`
}

type Pointer

type Pointer interface {
	Points() *Client
}

func NewPointer

func NewPointer(getter kv.Getter) Pointer

type VerifyPassportRequest

type VerifyPassportRequest struct {
	UserDID    string    `json:"user_did"`
	Hash       string    `json:"hash"`
	Expiry     time.Time `json:"expiry"`
	SharedData []string  `json:"shared_data"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL