account

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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