api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendRouters

func AppendRouters(log logging.Logger, appendTo *mux.Router, routers ...Router) *mux.Router

AppendRouters creates a new router for any number of api routers

func EncodeJSONResponse

func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error

EncodeJSONResponse uses the json encoder to write an interface to the http response with an optional status code

func Logger

func Logger(log logging.Logger, inner http.Handler, name string) http.Handler

func NewCredentialLogContext

func NewCredentialLogContext(credential *Credential) logging.LogContext

func NewIdentityLogContext

func NewIdentityLogContext(identity *Identity) logging.LogContext

func NewLoginLogContext

func NewLoginLogContext(login *Login) logging.LogContext

func ReadFormFileToTempFile

func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error)

ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file

Types

type Address

type Address = client.Address

type AuthenticationApiRouter added in v0.2.0

type AuthenticationApiRouter interface {
	LoginWithCredentials(http.ResponseWriter, *http.Request)
	RegisterWithCredentials(http.ResponseWriter, *http.Request)
}

AuthenticationApiRouter defines the required methods for binding the api requests to a responses for the AuthenticationApi The AuthenticationApiRouter implementation should parse necessary information from the http request, pass the data to a AuthenticationApiServicer to perform the required actions, then write the service results to the http response.

type AuthenticationApiServicer added in v0.2.0

type AuthenticationApiServicer interface {
	LoginWithCredentials(*http.Request, Login, string, string) (*http.Cookie, *client.LoggedIn, error)
	RegisterWithCredentials(*http.Request, Register, string, string, bool) (*http.Cookie, *client.LoggedIn, error)
}

AuthenticationApiServicer defines the api actions for the AuthenticationApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

type Credential

type Credential = client.Credential

Credential - Description of a successful OpenID connect credential

type CredentialsApiRouter

type CredentialsApiRouter interface {
	DisableCredentials(http.ResponseWriter, *http.Request)
	ListCredentials(http.ResponseWriter, *http.Request)
}

CredentialsApiRouter defines the required methods for binding the api requests to a responses for the CredentialsApi The CredentialsApiRouter implementation should parse necessary information from the http request, pass the data to a CredentialsApiServicer to perform the required actions, then write the service results to the http response.

type CredentialsApiServicer

type CredentialsApiServicer interface {
	DisableCredentials(tmw.TumblerClaims, string, string) (*Credential, error)
	ListCredentials(tmw.TumblerClaims, string) ([]Credential, error)
}

CredentialsApiServicer defines the api actions for the CredentialsApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

type IdentitiesApiRouter

type IdentitiesApiRouter interface {
	DisableIdentity(http.ResponseWriter, *http.Request)
	GetIdentity(http.ResponseWriter, *http.Request)
	ListIdentities(http.ResponseWriter, *http.Request)
	UpdateIdentity(http.ResponseWriter, *http.Request)
}

IdentitiesApiRouter defines the required methods for binding the api requests to a responses for the IdentitiesApi The IdentitiesApiRouter implementation should parse necessary information from the http request, pass the data to a IdentitiesApiServicer to perform the required actions, then write the service results to the http response.

type IdentitiesApiServicer

type IdentitiesApiServicer interface {
	DisableIdentity(tmw.TumblerClaims, string) error
	GetIdentity(tmw.TumblerClaims, string) (*Identity, error)
	ListIdentities(tmw.TumblerClaims, string) ([]Identity, error)
	UpdateIdentity(tmw.TumblerClaims, string, UpdateIdentity) (*Identity, error)
}

IdentitiesApiServicer defines the api actions for the IdentitiesApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

type Identity

type Identity = client.Identity

Identity - Properties of an Identity. These users will under-go KYC checks thus all the information

type IdentityID

type IdentityID uuid.UUID

func (*IdentityID) String

func (id *IdentityID) String() string

type Invite

type Invite = client.Invite

type InvitesApiRouter

type InvitesApiRouter interface {
	DeleteInvite(http.ResponseWriter, *http.Request)
	ListInvites(http.ResponseWriter, *http.Request)
	SendInvite(http.ResponseWriter, *http.Request)
}

InvitesApiRouter defines the required methods for binding the api requests to a responses for the InvitesApi The InvitesApiRouter implementation should parse necessary information from the http request, pass the data to a InvitesApiServicer to perform the required actions, then write the service results to the http response.

type InvitesApiServicer

type InvitesApiServicer interface {
	DisableInvite(tmw.TumblerClaims, string) error
	ListInvites(tmw.TumblerClaims) ([]Invite, error)
	SendInvite(tmw.TumblerClaims, SendInvite) (*Invite, string, error)
	Redeem(code string) (*Invite, error)
}

InvitesApiServicer defines the api actions for the InvitesApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.

type LastLogin

type LastLogin = client.LastLogin

LastLogin - Defines when and what credential was used for the last login

type LoggedIn

type LoggedIn = client.LoggedIn

type Login

type Login = client.Login

type OfacSearch

type OfacSearch = client.OfacSearch

type Phone

type Phone = client.Phone

type Register

type Register = client.Register

type RegisterAddress

type RegisterAddress = client.RegisterAddress

RegisterAddress - Address of the Identity

type RegisterPhone

type RegisterPhone = client.RegisterPhone

RegisterPhone - Phone number

type Route

type Route struct {
	Name        string
	Method      string
	Pattern     string
	HandlerFunc http.HandlerFunc
}

A Route defines the parameters for an api endpoint

type Router

type Router interface {
	Routes() Routes
}

Router defines the required methods for retrieving api routes

type Routes

type Routes []Route

Routes are a collection of defined api endpoints

type SendInvite

type SendInvite = client.SendInvite

type TenantID

type TenantID uuid.UUID

func (*TenantID) String

func (id *TenantID) String() string

type UpdateIdentity

type UpdateIdentity = client.UpdateIdentity

UpdateIdentity - Properties of an Identity. These users will under-go KYC checks thus all the information

Jump to

Keyboard shortcuts

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