account

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID            string         `json:"id"`
	Name          string         `json:"name"`
	CommsChannels []CommsChannel `json:"comms_channels"`
	Parent        *Account       `json:"parent"`
}

func GetAccountDetails

func GetAccountDetails(id string) (Account, error)

type AccountCreate

type AccountCreate struct {
	Name        string
	Email       string
	Cellphone   int
	CountryCode int `json:"countryCode"`
}

type CommsChannel

type CommsChannel struct {
	Name      string `json:"name"`
	Preferred bool   `json:"preferred"`
}

type Request

type Request struct {
	Config  config.Config
	Request events.APIGatewayProxyRequest
	Account AccountCreate
}

func NewHTTPRequest

func NewHTTPRequest(c config.Config) *Request

func (Request) Create

func (r Request) Create() (Response, error)

func (Request) CreateHandler

func (r Request) CreateHandler(w http.ResponseWriter, hr *http.Request)

func (Request) Delete

func (r Request) Delete() (Response, error)

func (Request) DeleteHandler

func (r Request) DeleteHandler(w http.ResponseWriter, hr *http.Request)

func (Request) Login

func (r Request) Login() (Response, error)

func (Request) LoginHandler

func (r Request) LoginHandler(w http.ResponseWriter, hr *http.Request)

func (Request) Parse

func (r Request) Parse() (Response, error)

type Response

type Response struct {
	Body    interface{}
	Headers map[string]string
}

Jump to

Keyboard shortcuts

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