identities

package
v0.2.1 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 NewIdentitiesController

func NewIdentitiesController(s api.IdentitiesApiServicer) api.Router

NewIdentitiesController creates a default api controller

Types

type Controller

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

A Controller binds http requests to an api service and writes the service results to the http response

func (*Controller) DisableIdentity

func (c *Controller) DisableIdentity(w http.ResponseWriter, r *http.Request)

DisableIdentity - Disable an identity. Its left around for historical reporting

func (*Controller) GetIdentity

func (c *Controller) GetIdentity(w http.ResponseWriter, r *http.Request)

GetIdentity - List identities and associates userId

func (*Controller) ListIdentities

func (c *Controller) ListIdentities(w http.ResponseWriter, r *http.Request)

ListIdentities - List identities and associates userId

func (*Controller) Routes

func (c *Controller) Routes() api.Routes

Routes returns all of the api route for the IdentitiesApiController

func (*Controller) UpdateIdentity

func (c *Controller) UpdateIdentity(w http.ResponseWriter, r *http.Request)

UpdateIdentity - Update a specific Identity

type Repository

type Repository interface {
	// contains filtered or unexported methods
}

Repository - Used for interacting identities on the data store

func NewIdentityRepository

func NewIdentityRepository(db *sql.DB) Repository

NewIdentityRepository - Builds a new repository tied to the DB passed in.

type Service

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

Service - Service that implents the logic for the IdentitiesApiServicer This service should implement the business logic for every endpoint for the IdentitiesApi API. Include any external packages or services that will be required by this service.

func NewIdentitiesService

func NewIdentitiesService(time stime.TimeService, repository Repository) *Service

NewIdentitiesService creates a default service

func (*Service) DisableIdentity

func (s *Service) DisableIdentity(claims tmw.TumblerClaims, identityID string) error

DisableIdentity - Disable an identity. Its left around for historical reporting

func (*Service) GetIdentity

func (s *Service) GetIdentity(claims tmw.TumblerClaims, identityID string) (*api.Identity, error)

GetIdentity - List identities and associates userId

func (*Service) GetIdentityByID

func (s *Service) GetIdentityByID(identityID string) (*api.Identity, error)

GetIdentityByID - Returns the Identity specified by the ID. Used after a login session to get identity information

func (*Service) ListIdentities

func (s *Service) ListIdentities(claims tmw.TumblerClaims, orgID string) ([]api.Identity, error)

ListIdentities - List identities and associates userId

func (*Service) Register

func (s *Service) Register(register api.Register, invite *api.Invite) (*api.Identity, error)

Register - Takes an invite and the registration information and creates the new identity from it.

func (*Service) UpdateIdentity

func (s *Service) UpdateIdentity(claims tmw.TumblerClaims, identityID string, update api.UpdateIdentity) (*api.Identity, error)

UpdateIdentity - Update a specific Identity

Jump to

Keyboard shortcuts

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