user

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: MPL-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NewUserQueueID    = "gov.user.new"
	DeleteUserQueueID = "gov.user.delete"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteUserProps added in v0.2.4

type DeleteUserProps struct {
	Userid string `json:"userid"`
}

DeleteUserProps are properties of a deleted user

func DecodeDeleteUserProps added in v0.2.4

func DecodeDeleteUserProps(msgdata []byte) (*DeleteUserProps, error)

DecodeDeleteUserProps marshals json encoded delete user props into a struct

type NewUserProps added in v0.2.4

type NewUserProps struct {
	Userid       string `json:"userid"`
	Username     string `json:"username"`
	Email        string `json:"email"`
	FirstName    string `json:"first_name"`
	LastName     string `json:"last_name"`
	CreationTime int64  `json:"creation_time"`
}

NewUserProps are properties of a newly created user

func DecodeNewUserProps added in v0.2.4

func DecodeNewUserProps(msgdata []byte) (*NewUserProps, error)

DecodeNewUserProps marshals json encoded new user props into a struct

type ResUserGet

type ResUserGet struct {
	ResUserGetPublic
	Email string `json:"email"`
}

ResUserGet holds all the fields of a user

type ResUserGetPublic

type ResUserGetPublic struct {
	Userid       string `json:"userid"`
	Username     string `json:"username"`
	AuthTags     string `json:"auth_tags"`
	FirstName    string `json:"first_name"`
	LastName     string `json:"last_name"`
	CreationTime int64  `json:"creation_time"`
}

ResUserGetPublic holds the public fields of a user

type Service

type Service interface {
	governor.Service
	User
}

func New

func New(users usermodel.Repo, sessions sessionmodel.Repo, approvals approvalmodel.Repo, roles role.Role, apikeys apikey.Apikey, kv kvstore.KVStore, queue msgqueue.Msgqueue, mailer mail.Mail, tokenizer token.Tokenizer, g gate.Gate) Service

New creates a new User

type User

type User interface {
	GetByID(userid string) (*ResUserGet, error)
}

User is a user management service

Directories

Path Synopsis
approval
session

Jump to

Keyboard shortcuts

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