database

package
v0.38.3 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePasswords

func ComparePasswords(hashedPwd string, plainPwd []byte) bool

ComparePasswords takes a password hash and compares it to entered password bytes returning true if matches false if not

func HashAndSalt

func HashAndSalt(pwd []byte) (string, error)

HashAndSalt takes a password byte and salt + hashes it returning a hash string to store in db

Types

type APIKey added in v0.16.0

type APIKey struct {
	ID          string    `json:"id"`
	Prefix      string    `json:"prefix"`
	UserID      string    `json:"userId"`
	Name        string    `json:"name"`
	Key         string    `json:"apiKey"`
	Active      bool      `json:"active"`
	CreatedDate time.Time `json:"createdDate"`
	UpdatedDate time.Time `json:"updatedDate"`
}

APIKey structure

type Alert added in v0.24.0

type Alert struct {
	AlertID        string `json:"id" db:"id"`
	Name           string `json:"name" db:"name"`
	Type           string `json:"type" db:"type"`
	Content        string `json:"content" db:"content"`
	Active         bool   `json:"active" db:"active"`
	AllowDismiss   bool   `json:"allowDismiss" db:"allow_dismiss"`
	RegisteredOnly bool   `json:"registeredOnly" db:"registered_only"`
	CreatedDate    string `json:"createdDate" db:"created_date"`
	UpdatedDate    string `json:"updatedDate" db:"updated_date"`
}

type ApplicationStats

type ApplicationStats struct {
	RegisteredCount           int `json:"registeredUserCount"`
	UnregisteredCount         int `json:"unregisteredUserCount"`
	StoryboardCount           int `json:"storyboardCount"`
	OrganizationCount         int `json:"organizationCount"`
	DepartmentCount           int `json:"departmentCount"`
	TeamCount                 int `json:"teamCount"`
	APIKeyCount               int `json:"apikeyCount"`
	ActiveStoryboardCount     int `json:"activeStoryboardCount"`
	ActiveStoryboardUserCount int `json:"activeStoryboardUserCount"`
}

ApplicationStats includes user, storyboard counts

type Color added in v0.20.0

type Color struct {
	Color  string `json:"color"`
	Legend string `json:"legend"`
}

Color is a color legend

type Config

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

Config holds all the configuration for the db

type Database

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

Database contains all the methods to interact with DB

func New

func New(AdminEmail string, schemaSQL string) *Database

New runs db migrations, sets up a db connection pool and sets previously active users to false during startup

func (*Database) AbandonStoryboard added in v0.16.0

func (d *Database) AbandonStoryboard(StoryboardID string, UserID string) ([]*StoryboardUser, error)

AbandonStoryboard removes a user from the current storyboard by ID and sets abandoned true

func (*Database) AddPersona added in v0.21.0

func (d *Database) AddPersona(StoryboardID string, UserID string, Name string, Role string, Description string) ([]*StoryboardPersona, error)

AddPersona adds a persona to a storyboard

func (*Database) AddStoryComment added in v0.20.0

func (d *Database) AddStoryComment(StoryboardID string, UserID string, StoryID string, Comment string) ([]*StoryboardGoal, error)

AddStoryComment adds a comment to a story

func (*Database) AddUserToStoryboard

func (d *Database) AddUserToStoryboard(StoryboardID string, UserID string) ([]*StoryboardUser, error)

AddUserToStoryboard adds a user by ID to the storyboard by ID

func (*Database) AlertDelete added in v0.24.0

func (d *Database) AlertDelete(AlertID string) error

AlertDelete deletes an alert

func (*Database) AlertsCreate added in v0.24.0

func (d *Database) AlertsCreate(Name string, Type string, Content string, Active bool, AllowDismiss bool, RegisteredOnly bool) error

AlertsCreate creates

func (*Database) AlertsList added in v0.24.0

func (d *Database) AlertsList(Limit int, Offset int) []interface{}

AlertsList gets alerts from db for admin listing

func (*Database) AlertsUpdate added in v0.24.0

func (d *Database) AlertsUpdate(ID string, Name string, Type string, Content string, Active bool, AllowDismiss bool, RegisteredOnly bool) error

AlertsUpdate updates an alert

func (*Database) AuthUser

func (d *Database) AuthUser(UserEmail string, UserPassword string) (*User, error)

AuthUser attempts to authenticate the user

func (*Database) CleanGuests added in v0.17.0

func (d *Database) CleanGuests(DaysOld int) error

CleanGuests deletes guest users older than X days

func (*Database) CleanStoryboards added in v0.17.0

func (d *Database) CleanStoryboards(DaysOld int) error

CleanStoryboards deletes storyboards older than X days

func (*Database) ConfirmAdmin

func (d *Database) ConfirmAdmin(AdminID string) error

ConfirmAdmin confirms whether the user is infact a ADMIN

func (*Database) ConfirmOwner

func (d *Database) ConfirmOwner(StoryboardID string, userID string) error

ConfirmOwner confirms the user is infact owner of the storyboard

func (*Database) CreateStoryboard

func (d *Database) CreateStoryboard(OwnerID string, StoryboardName string) (*Storyboard, error)

CreateStoryboard adds a new storyboard to the db

func (*Database) CreateStoryboardColumn

func (d *Database) CreateStoryboardColumn(StoryboardID string, GoalID string, userID string) ([]*StoryboardGoal, error)

CreateStoryboardColumn adds a new column to a Storyboard

func (*Database) CreateStoryboardGoal

func (d *Database) CreateStoryboardGoal(StoryboardID string, userID string, GoalName string) ([]*StoryboardGoal, error)

CreateStoryboardGoal adds a new goal to a Storyboard

func (*Database) CreateStoryboardStory

func (d *Database) CreateStoryboardStory(StoryboardID string, GoalID string, ColumnID string, userID string) ([]*StoryboardGoal, error)

CreateStoryboardStory adds a new story to a Storyboard

func (*Database) CreateUserGuest

func (d *Database) CreateUserGuest(UserName string) (*User, error)

CreateUserGuest adds a new user guest to the db

func (*Database) CreateUserRegistered

func (d *Database) CreateUserRegistered(UserName string, UserEmail string, UserPassword string, ActiveUserID string) (NewUser *User, VerifyID string, RegisterErr error)

CreateUserRegistered adds a new user registered to the db

func (*Database) DeletePersona added in v0.21.0

func (d *Database) DeletePersona(StoryboardID string, UserID string, PersonaID string) ([]*StoryboardPersona, error)

DeletePersona deletes a storyboard persona

func (*Database) DeleteStoryboard

func (d *Database) DeleteStoryboard(StoryboardID string, userID string) error

DeleteStoryboard removes all storyboard associations and the storyboard itself from DB by StoryboardID

func (*Database) DeleteStoryboardColumn

func (d *Database) DeleteStoryboardColumn(StoryboardID string, userID string, ColumnID string) ([]*StoryboardGoal, error)

DeleteStoryboardColumn removes a column from the current board by ID

func (*Database) DeleteStoryboardGoal

func (d *Database) DeleteStoryboardGoal(StoryboardID string, userID string, GoalID string) ([]*StoryboardGoal, error)

DeleteStoryboardGoal removes a goal from the current board by ID

func (*Database) DeleteStoryboardStory

func (d *Database) DeleteStoryboardStory(StoryboardID string, userID string, StoryID string) ([]*StoryboardGoal, error)

DeleteStoryboardStory removes a story from the current board by ID

func (*Database) DeleteUser added in v0.17.0

func (d *Database) DeleteUser(UserID string) error

DeleteUser attempts to delete a user

func (*Database) DeleteUserAPIKey added in v0.16.0

func (d *Database) DeleteUserAPIKey(UserID string, KeyID string) ([]*APIKey, error)

DeleteUserAPIKey removes a users api key

func (*Database) DemoteUser added in v0.16.0

func (d *Database) DemoteUser(UserID string) error

DemoteUser demotes a user to REGISTERED type

func (*Database) DepartmentAddUser added in v0.23.0

func (d *Database) DepartmentAddUser(DepartmentID string, UserID string, Role string) (string, error)

DepartmentAddUser adds a user to an organization department

func (*Database) DepartmentCreate added in v0.23.0

func (d *Database) DepartmentCreate(OrgID string, OrgName string) (string, error)

DepartmentCreate creates an organization department

func (*Database) DepartmentGet added in v0.23.0

func (d *Database) DepartmentGet(DepartmentID string) (*Department, error)

DepartmentGet gets a department

func (*Database) DepartmentRemoveUser added in v0.23.0

func (d *Database) DepartmentRemoveUser(DepartmentID string, UserID string) error

DepartmentRemoveUser removes a user from a department (and department teams)

func (*Database) DepartmentTeamCreate added in v0.23.0

func (d *Database) DepartmentTeamCreate(DepartmentID string, TeamName string) (string, error)

DepartmentTeamCreate creates a department team

func (*Database) DepartmentTeamList added in v0.23.0

func (d *Database) DepartmentTeamList(DepartmentID string, Limit int, Offset int) []*Team

DepartmentTeamList gets a list of department teams

func (*Database) DepartmentTeamUserRole added in v0.23.0

func (d *Database) DepartmentTeamUserRole(UserID string, OrgID string, DepartmentID string, TeamID string) (string, string, string, error)

DepartmentTeamUserRole gets a users role in organization department team

func (*Database) DepartmentUserList added in v0.23.0

func (d *Database) DepartmentUserList(DepartmentID string, Limit int, Offset int) []*DepartmentUser

DepartmentUserList gets a list of department users

func (*Database) DepartmentUserRole added in v0.23.0

func (d *Database) DepartmentUserRole(UserID string, OrgID string, DepartmentID string) (string, string, error)

DepartmentUserRole gets a users role in department (and organization)

func (*Database) GenerateAPIKey added in v0.16.0

func (d *Database) GenerateAPIKey(UserID string, KeyName string) (*APIKey, error)

GenerateAPIKey generates a new API key for a User

func (*Database) GetAPIKeys added in v0.24.0

func (d *Database) GetAPIKeys(Limit int, Offset int) []*APIKey

GetAPIKeys gets a list of api keys

func (*Database) GetActiveAlerts added in v0.24.0

func (d *Database) GetActiveAlerts() []interface{}

GetActiveAlerts gets alerts from db for UI display

func (*Database) GetActiveCountries added in v0.24.0

func (d *Database) GetActiveCountries() ([]string, error)

GetActiveCountries gets a list of user countries

func (*Database) GetAppStats

func (d *Database) GetAppStats() (*ApplicationStats, error)

GetAppStats gets counts of users (registered and unregistered), and storyboards

func (*Database) GetRegisteredUsers

func (d *Database) GetRegisteredUsers(Limit int, Offset int) []*User

GetRegisteredUsers retrieves the registered users from db

func (*Database) GetStoryboard

func (d *Database) GetStoryboard(StoryboardID string) (*Storyboard, error)

GetStoryboard gets a storyboard by ID

func (*Database) GetStoryboardGoals

func (d *Database) GetStoryboardGoals(StoryboardID string) []*StoryboardGoal

GetStoryboardGoals retrieves goals for given storyboard from db

func (*Database) GetStoryboardPersonas added in v0.21.0

func (d *Database) GetStoryboardPersonas(StoryboardID string) []*StoryboardPersona

GetStoryboardPersonas retrieves the personas for a given storyboard from db

func (*Database) GetStoryboardUser

func (d *Database) GetStoryboardUser(StoryboardID string, UserID string) (*StoryboardUser, error)

GetStoryboardUser gets a user from db by ID and checks storyboard active status

func (*Database) GetStoryboardUsers

func (d *Database) GetStoryboardUsers(StoryboardID string) []*StoryboardUser

GetStoryboardUsers retrieves the users for a given storyboard from db

func (*Database) GetStoryboardsByUser

func (d *Database) GetStoryboardsByUser(UserID string) ([]*Storyboard, error)

GetStoryboardsByUser gets a list of storyboards by UserID

func (*Database) GetUser

func (d *Database) GetUser(UserID string) (*User, error)

GetUser gets a user from db by ID

func (*Database) GetUserAPIKeys added in v0.16.0

func (d *Database) GetUserAPIKeys(UserID string) ([]*APIKey, error)

GetUserAPIKeys gets a list of api keys for a user

func (*Database) GetUserByEmail

func (d *Database) GetUserByEmail(UserEmail string) (*User, error)

GetUserByEmail gets a user by email

func (*Database) HashAPIKey added in v0.16.0

func (d *Database) HashAPIKey(apikey string) string

HashAPIKey hashes the API key using SHA256 (not reversible)

func (*Database) MoveStoryboardStory

func (d *Database) MoveStoryboardStory(StoryboardID string, userID string, StoryID string, GoalID string, ColumnID string, PlaceBefore string) ([]*StoryboardGoal, error)

MoveStoryboardStory moves the story by ID to Goal/Column by ID

func (*Database) OrganizationAddUser added in v0.23.0

func (d *Database) OrganizationAddUser(OrgID string, UserID string, Role string) (string, error)

OrganizationAddUser adds a user to an organization

func (*Database) OrganizationCreate added in v0.23.0

func (d *Database) OrganizationCreate(UserID string, OrgName string) (string, error)

OrganizationCreate creates an organization

func (*Database) OrganizationDepartmentList added in v0.23.0

func (d *Database) OrganizationDepartmentList(OrgID string, Limit int, Offset int) []*Department

OrganizationDepartmentList gets a list of organization departments

func (*Database) OrganizationGet added in v0.23.0

func (d *Database) OrganizationGet(OrgID string) (*Organization, error)

OrganizationGet gets an organization

func (*Database) OrganizationList added in v0.23.0

func (d *Database) OrganizationList(Limit int, Offset int) []*Organization

OrganizationList gets a list of organizations

func (*Database) OrganizationListByUser added in v0.23.0

func (d *Database) OrganizationListByUser(UserID string, Limit int, Offset int) []*Organization

OrganizationList gets a list of organizations the user is apart of

func (*Database) OrganizationRemoveUser added in v0.23.0

func (d *Database) OrganizationRemoveUser(OrganizationID string, UserID string) error

OrganizationRemoveUser removes a user from a organization

func (*Database) OrganizationTeamCreate added in v0.23.0

func (d *Database) OrganizationTeamCreate(OrgID string, TeamName string) (string, error)

OrganizationTeamCreate creates an organization team

func (*Database) OrganizationTeamList added in v0.23.0

func (d *Database) OrganizationTeamList(OrgID string, Limit int, Offset int) []*Team

OrganizationTeamList gets a list of organization teams

func (*Database) OrganizationTeamUserRole added in v0.23.0

func (d *Database) OrganizationTeamUserRole(UserID string, OrgID string, TeamID string) (string, string, error)

OrganizationTeamUserRole gets a users role in organization team

func (*Database) OrganizationUserList added in v0.23.0

func (d *Database) OrganizationUserList(OrgID string, Limit int, Offset int) []*OrganizationUser

OrganizationUserList gets a list of organization users

func (*Database) OrganizationUserRole added in v0.23.0

func (d *Database) OrganizationUserRole(UserID string, OrgID string) (string, error)

OrganizationUserRole gets a users role in organization

func (*Database) PromoteUser

func (d *Database) PromoteUser(UserID string) error

PromoteUser promotes a user to ADMIN type

func (*Database) RetreatUser

func (d *Database) RetreatUser(StoryboardID string, UserID string) []*StoryboardUser

RetreatUser removes a user from the current storyboard by ID

func (*Database) ReviseColorLegend added in v0.20.0

func (d *Database) ReviseColorLegend(StoryboardID string, UserID string, ColorLegend string) (*Storyboard, error)

ReviseColorLegend revises the storyboard color legend by StoryboardID

func (*Database) ReviseGoalName

func (d *Database) ReviseGoalName(StoryboardID string, userID string, GoalID string, GoalName string) ([]*StoryboardGoal, error)

ReviseGoalName updates the plan name by ID

func (*Database) ReviseStoryClosed added in v0.19.0

func (d *Database) ReviseStoryClosed(StoryboardID string, userID string, StoryID string, Closed bool) ([]*StoryboardGoal, error)

ReviseStoryClosed updates the story closed status by ID

func (*Database) ReviseStoryColor

func (d *Database) ReviseStoryColor(StoryboardID string, userID string, StoryID string, StoryColor string) ([]*StoryboardGoal, error)

ReviseStoryColor updates the story color by ID

func (*Database) ReviseStoryContent

func (d *Database) ReviseStoryContent(StoryboardID string, userID string, StoryID string, StoryContent string) ([]*StoryboardGoal, error)

ReviseStoryContent updates the story content by ID

func (*Database) ReviseStoryName

func (d *Database) ReviseStoryName(StoryboardID string, userID string, StoryID string, StoryName string) ([]*StoryboardGoal, error)

ReviseStoryName updates the story name by ID

func (*Database) ReviseStoryPoints added in v0.19.0

func (d *Database) ReviseStoryPoints(StoryboardID string, userID string, StoryID string, Points int) ([]*StoryboardGoal, error)

ReviseStoryPoints updates the story points by ID

func (*Database) ReviseStoryboardColumn added in v0.19.0

func (d *Database) ReviseStoryboardColumn(StoryboardID string, UserID string, ColumnID string, ColumnName string) ([]*StoryboardGoal, error)

ReviseStoryboardColumn revises a storyboard column

func (*Database) SetStoryboardOwner

func (d *Database) SetStoryboardOwner(StoryboardID string, userID string, OwnerID string) (*Storyboard, error)

SetStoryboardOwner sets the ownerId for the storyboard

func (*Database) TeamAddStoryboard added in v0.23.0

func (d *Database) TeamAddStoryboard(TeamID string, StoryboardID string) error

TeamAddStoryboard adds a storyboard to a team

func (*Database) TeamAddUser added in v0.23.0

func (d *Database) TeamAddUser(TeamID string, UserID string, Role string) (string, error)

TeamAddUser adds a user to a team

func (*Database) TeamCreate added in v0.23.0

func (d *Database) TeamCreate(UserID string, TeamName string) (string, error)

TTeamCreate creates a team with current user as an ADMIN

func (*Database) TeamDelete added in v0.23.0

func (d *Database) TeamDelete(TeamID string) error

TeamDelete deletes a team

func (*Database) TeamGet added in v0.23.0

func (d *Database) TeamGet(TeamID string) (*Team, error)

TeamGet gets an team

func (*Database) TeamList added in v0.23.0

func (d *Database) TeamList(Limit int, Offset int) []*Team

TeamList gets a list of teams

func (*Database) TeamListByUser added in v0.23.0

func (d *Database) TeamListByUser(UserID string, Limit int, Offset int) []*Team

TeamListByUser gets a list of teams the user is on

func (*Database) TeamRemoveStoryboard added in v0.23.0

func (d *Database) TeamRemoveStoryboard(TeamID string, StoryboardID string) error

TeamRemoveStoryboard removes a storyboard from a team

func (*Database) TeamRemoveUser added in v0.23.0

func (d *Database) TeamRemoveUser(TeamID string, UserID string) error

TeamRemoveUser removes a user from a team

func (*Database) TeamStoryboardList added in v0.23.0

func (d *Database) TeamStoryboardList(TeamID string, Limit int, Offset int) []*Storyboard

TeamStoryboardList gets a list of team storyboards

func (*Database) TeamUserList added in v0.23.0

func (d *Database) TeamUserList(TeamID string, Limit int, Offset int) []*OrganizationUser

TeamUserList gets a list of team users

func (*Database) TeamUserRole added in v0.23.0

func (d *Database) TeamUserRole(UserID string, TeamID string) (string, error)

TeamUserRole gets a users role in team

func (*Database) UpdatePersona added in v0.21.0

func (d *Database) UpdatePersona(StoryboardID string, UserID string, PersonaID string, Name string, Role string, Description string) ([]*StoryboardPersona, error)

UpdatePersona updates a storyboard persona

func (*Database) UpdateUserAPIKey added in v0.16.0

func (d *Database) UpdateUserAPIKey(UserID string, KeyID string, Active bool) ([]*APIKey, error)

UpdateUserAPIKey updates a users api key (active column only)

func (*Database) UpdateUserProfile

func (d *Database) UpdateUserProfile(UserID string, UserName string, UserAvatar string, Country string, Locale string, Company string, JobTitle string) error

UpdateUserProfile attempts to update the users profile

func (*Database) UserResetPassword

func (d *Database) UserResetPassword(ResetID string, UserPassword string) (userName string, userEmail string, resetErr error)

UserResetPassword attempts to reset a users password

func (*Database) UserResetRequest

func (d *Database) UserResetRequest(UserEmail string) (resetID string, userName string, resetErr error)

UserResetRequest inserts a new user reset request

func (*Database) UserUpdatePassword

func (d *Database) UserUpdatePassword(UserID string, UserPassword string) (userName string, userEmail string, resetErr error)

UserUpdatePassword attempts to update a users password

func (*Database) ValidateAPIKey added in v0.16.0

func (d *Database) ValidateAPIKey(APK string) (UserID string, ValidatationErr error)

ValidateAPIKey checks to see if the API key exists in the database and if so returns UserID

func (*Database) VerifyUserAccount

func (d *Database) VerifyUserAccount(VerifyID string) error

VerifyUserAccount attempts to verify a users account email

type Department added in v0.23.0

type Department struct {
	DepartmentID string `json:"id"`
	Name         string `json:"name"`
	CreatedDate  string `json:"createdDate"`
	UpdatedDate  string `json:"updatedDate"`
}

type DepartmentUser added in v0.23.0

type DepartmentUser struct {
	UserID string `json:"id"`
	Name   string `json:"name"`
	Email  string `json:"email"`
	Role   string `json:"role"`
}

type Organization added in v0.23.0

type Organization struct {
	OrganizationID string `json:"id"`
	Name           string `json:"name"`
	CreatedDate    string `json:"createdDate"`
	UpdatedDate    string `json:"updatedDate"`
}

Organization can be a company

type OrganizationUser added in v0.23.0

type OrganizationUser struct {
	UserID string `json:"id"`
	Name   string `json:"name"`
	Email  string `json:"email"`
	Role   string `json:"role"`
}

type StoryComment added in v0.19.0

type StoryComment struct {
	StoryID    string `json:"story_id"`
	UserID     string `json:"user_id"`
	Comment    string `json:"comment"`
	CreateDate string `json:"created_date"`
}

StoryComment A story comment by a user

type Storyboard

type Storyboard struct {
	StoryboardID   string               `json:"id"`
	OwnerID        string               `json:"owner_id"`
	StoryboardName string               `json:"name"`
	Users          []*StoryboardUser    `json:"users"`
	Goals          []*StoryboardGoal    `json:"goals"`
	ColorLegend    []*Color             `json:"color_legend"`
	Personas       []*StoryboardPersona `json:"personas"`
}

Storyboard A story mapping board

type StoryboardColumn

type StoryboardColumn struct {
	ColumnID   string             `json:"id"`
	ColumnName string             `json:"name"`
	Stories    []*StoryboardStory `json:"stories"`
	SortOrder  int                `json:"sort_order"`
}

StoryboardColumn A column in a storyboard goal

type StoryboardGoal

type StoryboardGoal struct {
	GoalID    string              `json:"id"`
	GoalName  string              `json:"name"`
	Columns   []*StoryboardColumn `json:"columns"`
	SortOrder int                 `json:"sort_order"`
}

StoryboardGoal A row in a story mapping board

type StoryboardPersona added in v0.21.0

type StoryboardPersona struct {
	PersonaID   string `json:"id"`
	Name        string `json:"name"`
	Role        string `json:"role"`
	Description string `json:"description"`
}

StoryboardPersona A storyboards personas

type StoryboardStory

type StoryboardStory struct {
	StoryID      string          `json:"id"`
	StoryName    string          `json:"name"`
	StoryContent string          `json:"content"`
	StoryColor   string          `json:"color"`
	StoryPoints  int             `json:"points"`
	StoryClosed  bool            `json:"closed"`
	SortOrder    int             `json:"sort_order"`
	Comments     []*StoryComment `json:"comments"`
}

StoryboardStory A story in a storyboard goal column

type StoryboardUser

type StoryboardUser struct {
	UserID   string `json:"id"`
	UserName string `json:"name"`
	Active   bool   `json:"active"`
}

StoryboardUser aka user

type Team added in v0.23.0

type Team struct {
	TeamID      string `json:"id"`
	Name        string `json:"name"`
	CreatedDate string `json:"createdDate"`
	UpdatedDate string `json:"updatedDate"`
}

type TeamUser added in v0.23.0

type TeamUser struct {
	UserID string `json:"id"`
	Name   string `json:"name"`
	Email  string `json:"email"`
	Role   string `json:"role"`
}

type User

type User struct {
	UserID     string `json:"id"`
	UserName   string `json:"name"`
	UserEmail  string `json:"email"`
	UserAvatar string `json:"avatar"`
	UserType   string `json:"type"`
	Verified   bool   `json:"verified"`
	Country    string `json:"country"`
	Locale     string `json:"locale"`
	Company    string `json:"company"`
	JobTitle   string `json:"jobTitle"`
}

User aka user

Jump to

Keyboard shortcuts

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