uid

package
v0.1581.0-MLPAB2540tra... Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package uid provides a client for calling the UID service.

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 New

func New(baseURL string, lambdaClient Doer) *Client

func (*Client) CheckHealth added in v0.892.0

func (c *Client) CheckHealth(ctx context.Context) error

func (*Client) CreateCase

func (c *Client) CreateCase(ctx context.Context, body *CreateCaseRequestBody) (string, error)

type CreateCaseRequestBody

type CreateCaseRequestBody struct {
	Type   string       `json:"type"`
	Source string       `json:"source"`
	Donor  DonorDetails `json:"donor"`
}

func (CreateCaseRequestBody) Valid

func (b CreateCaseRequestBody) Valid() bool

type CreateCaseResponse

type CreateCaseResponse struct {
	UID              string                              `json:"uid"`
	BadRequestErrors []CreateCaseResponseBadRequestError `json:"errors"`
}

func (*CreateCaseResponse) Error

func (c *CreateCaseResponse) Error() error

type CreateCaseResponseBadRequestError

type CreateCaseResponseBadRequestError struct {
	Source string `json:"source"`
	Detail string `json:"detail"`
}

type Doer

type Doer interface {
	Do(*http.Request) (*http.Response, error)
}

type DonorDetails

type DonorDetails struct {
	Name     string    `json:"name"`
	Dob      date.Date `json:"dob"`
	Postcode string    `json:"postcode"`
}

Jump to

Keyboard shortcuts

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