userstore

package
v0.45.0 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateUserParams

type CreateUserParams struct {
	UserID          uuid.UUID
	Username        string
	OrgID           uuid.UUID
	PersonProfileID uuid.UUID
	CreateAppID     uuid.UUID
	CreateUserID    uuid.NullUUID
	CreateTimestamp time.Time
	UpdateAppID     uuid.UUID
	UpdateUserID    uuid.NullUUID
	UpdateTimestamp time.Time
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type FindUserByIDRow

type FindUserByIDRow struct {
	UserID          uuid.UUID
	Username        string
	OrgID           uuid.UUID
	OrgExtlID       string
	OrgName         string
	OrgDescription  string
	PersonProfileID uuid.UUID
	NamePrefix      sql.NullString
	FirstName       string
	MiddleName      sql.NullString
	LastName        string
	NameSuffix      sql.NullString
	Nickname        sql.NullString
	CompanyName     sql.NullString
	CompanyDept     sql.NullString
	JobTitle        sql.NullString
	BirthDate       sql.NullTime
	BirthYear       sql.NullInt64
	BirthMonth      sql.NullInt64
	BirthDay        sql.NullInt64
	LanguageID      uuid.NullUUID
	PersonID        uuid.UUID
}

type FindUserByUsernameParams

type FindUserByUsernameParams struct {
	Username string
	OrgID    uuid.UUID
}

type FindUserByUsernameRow

type FindUserByUsernameRow struct {
	UserID          uuid.UUID
	Username        string
	OrgID           uuid.UUID
	OrgExtlID       string
	OrgName         string
	OrgDescription  string
	PersonProfileID uuid.UUID
	NamePrefix      sql.NullString
	FirstName       string
	MiddleName      sql.NullString
	LastName        string
	NameSuffix      sql.NullString
	Nickname        sql.NullString
	CompanyName     sql.NullString
	CompanyDept     sql.NullString
	JobTitle        sql.NullString
	BirthDate       sql.NullTime
	BirthYear       sql.NullInt64
	BirthMonth      sql.NullInt64
	BirthDay        sql.NullInt64
	LanguageID      uuid.NullUUID
	PersonID        uuid.UUID
}

type Org

type Org struct {
	// Organization ID - Unique ID for table
	OrgID uuid.UUID
	// Organization Unique External ID to be given to outside callers.
	OrgExtlID string
	// Organization Name - a short name for the organization
	OrgName string
	// Organization Description - several sentences to describe the organization
	OrgDescription string
	// Foreign Key to org_kind table.
	OrgKindID uuid.UUID
	// The application which created this record.
	CreateAppID uuid.UUID
	// The user which created this record.
	CreateUserID uuid.NullUUID
	// The timestamp when this record was created.
	CreateTimestamp time.Time
	// The application which performed the most recent update to this record.
	UpdateAppID uuid.UUID
	// The user which performed the most recent update to this record.
	UpdateUserID uuid.NullUUID
	// The timestamp when the record was updated most recently.
	UpdateTimestamp time.Time
}

type OrgUser added in v0.41.0

type OrgUser struct {
	// The user ID is the unique ID for user (pk for table)
	UserID uuid.UUID
	// The username is a unique, human readable username.
	Username string
	// The organization ID for the organization that the user belongs to.
	OrgID uuid.UUID
	// The person profile ID - ID for the profile of the person to which this user belongs.
	PersonProfileID uuid.UUID
	// The application which created this record.
	CreateAppID uuid.UUID
	// The user which created this record.
	CreateUserID uuid.NullUUID
	// The timestamp when this record was created.
	CreateTimestamp time.Time
	// The application which performed the most recent update to this record.
	UpdateAppID uuid.UUID
	// The user which performed the most recent update to this record.
	UpdateUserID uuid.NullUUID
	// The timestamp when the record was updated most recently.
	UpdateTimestamp time.Time
}

type Person

type Person struct {
	PersonID        uuid.UUID
	OrgID           uuid.UUID
	CreateAppID     uuid.UUID
	CreateUserID    uuid.NullUUID
	CreateTimestamp time.Time
	UpdateAppID     uuid.UUID
	UpdateUserID    uuid.NullUUID
	UpdateTimestamp time.Time
}

type PersonProfile

type PersonProfile struct {
	PersonProfileID uuid.UUID
	PersonID        uuid.UUID
	NamePrefix      sql.NullString
	FirstName       string
	MiddleName      sql.NullString
	LastName        string
	NameSuffix      sql.NullString
	Nickname        sql.NullString
	CompanyName     sql.NullString
	CompanyDept     sql.NullString
	JobTitle        sql.NullString
	BirthDate       sql.NullTime
	BirthYear       sql.NullInt64
	BirthMonth      sql.NullInt64
	BirthDay        sql.NullInt64
	LanguageID      uuid.NullUUID
	CreateAppID     uuid.UUID
	CreateUserID    uuid.NullUUID
	CreateTimestamp time.Time
	UpdateAppID     uuid.UUID
	UpdateUserID    uuid.NullUUID
	UpdateTimestamp time.Time
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CreateUser

func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (int64, error)

func (*Queries) DeleteUser

func (q *Queries) DeleteUser(ctx context.Context, userID uuid.UUID) (int64, error)

func (*Queries) FindUserByID

func (q *Queries) FindUserByID(ctx context.Context, userID uuid.UUID) (FindUserByIDRow, error)

func (*Queries) FindUserByUsername

func (q *Queries) FindUserByUsername(ctx context.Context, arg FindUserByUsernameParams) (FindUserByUsernameRow, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

Jump to

Keyboard shortcuts

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