Documentation
¶
Index ¶
- func NewIdentitiesController(s api.IdentitiesApiServicer) api.Router
- type Controller
- func (c *Controller) DisableIdentity(w http.ResponseWriter, r *http.Request)
- func (c *Controller) GetIdentity(w http.ResponseWriter, r *http.Request)
- func (c *Controller) ListIdentities(w http.ResponseWriter, r *http.Request)
- func (c *Controller) Routes() api.Routes
- func (c *Controller) UpdateIdentity(w http.ResponseWriter, r *http.Request)
- type Repository
- type Service
- func (s *Service) DisableIdentity(claims tmw.TumblerClaims, identityID string) error
- func (s *Service) GetIdentity(claims tmw.TumblerClaims, identityID string) (*api.Identity, error)
- func (s *Service) GetIdentityByID(identityID string) (*api.Identity, error)
- func (s *Service) ListIdentities(claims tmw.TumblerClaims, orgID string) ([]api.Identity, error)
- func (s *Service) Register(invite api.Invite, register api.Register) (*api.Identity, error)
- func (s *Service) UpdateIdentity(claims tmw.TumblerClaims, identityID string, update api.UpdateIdentity) (*api.Identity, error)
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 ¶
GetIdentity - List identities and associates userId
func (*Service) GetIdentityByID ¶
GetIdentityByID - Returns the Identity specified by the ID. Used after a login session to get identity information
func (*Service) ListIdentities ¶
ListIdentities - List identities and associates userId
func (*Service) Register ¶
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