orgstore

package
v0.42.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 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 App added in v0.41.0

type App struct {
	// The Unique ID for the table.
	AppID uuid.UUID
	// The organization ID for the organization that the app belongs to.
	OrgID uuid.UUID
	// The unique application External ID to be given to outside callers.
	AppExtlID string
	// The application name is a short name for the application.
	AppName string
	// The application description is several sentences to describe the application.
	AppDescription string
	// 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
}

app stores data about applications that interact with the system

type CreateOrgKindParams added in v0.40.0

type CreateOrgKindParams struct {
	OrgKindID       uuid.UUID
	OrgKindExtlID   string
	OrgKindDesc     string
	CreateAppID     uuid.UUID
	CreateUserID    uuid.NullUUID
	CreateTimestamp time.Time
	UpdateAppID     uuid.UUID
	UpdateUserID    uuid.NullUUID
	UpdateTimestamp time.Time
}

type CreateOrgParams

type CreateOrgParams struct {
	OrgID           uuid.UUID
	OrgExtlID       string
	OrgName         string
	OrgDescription  string
	OrgKindID       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 FindOrgByExtlIDRow added in v0.41.0

type FindOrgByExtlIDRow struct {
	OrgID          uuid.UUID
	OrgExtlID      string
	OrgName        string
	OrgDescription string
	OrgKindID      uuid.UUID
	OrgKindExtlID  string
	OrgKindDesc    string
}

type FindOrgByExtlIDWithAuditRow added in v0.41.0

type FindOrgByExtlIDWithAuditRow struct {
	OrgID                uuid.UUID
	OrgExtlID            string
	OrgName              string
	OrgDescription       string
	OrgKindID            uuid.UUID
	OrgKindExtlID        string
	OrgKindDesc          string
	CreateAppID          uuid.UUID
	CreateAppOrgID       uuid.UUID
	CreateAppExtlID      string
	CreateAppName        string
	CreateAppDescription string
	CreateUserID         uuid.NullUUID
	CreateUsername       string
	CreateUserOrgID      uuid.UUID
	CreateUserFirstName  string
	CreateUserLastName   string
	CreateTimestamp      time.Time
	UpdateAppID          uuid.UUID
	UpdateAppOrgID       uuid.UUID
	UpdateAppExtlID      string
	UpdateAppName        string
	UpdateAppDescription string
	UpdateUserID         uuid.NullUUID
	UpdateUsername       string
	UpdateUserOrgID      uuid.UUID
	UpdateUserFirstName  string
	UpdateUserLastName   string
	UpdateTimestamp      time.Time
}

type FindOrgByIDRow added in v0.41.0

type FindOrgByIDRow struct {
	OrgID          uuid.UUID
	OrgExtlID      string
	OrgName        string
	OrgDescription string
	OrgKindID      uuid.UUID
	OrgKindExtlID  string
	OrgKindDesc    string
}

type FindOrgByIDWithAuditRow added in v0.41.0

type FindOrgByIDWithAuditRow struct {
	OrgID                uuid.UUID
	OrgExtlID            string
	OrgName              string
	OrgDescription       string
	OrgKindID            uuid.UUID
	OrgKindExtlID        string
	OrgKindDesc          string
	CreateAppID          uuid.UUID
	CreateAppOrgID       uuid.UUID
	CreateAppExtlID      string
	CreateAppName        string
	CreateAppDescription string
	CreateUserID         uuid.NullUUID
	CreateUsername       string
	CreateUserOrgID      uuid.UUID
	CreateUserFirstName  string
	CreateUserLastName   string
	CreateTimestamp      time.Time
	UpdateAppID          uuid.UUID
	UpdateAppOrgID       uuid.UUID
	UpdateAppExtlID      string
	UpdateAppName        string
	UpdateAppDescription string
	UpdateUserID         uuid.NullUUID
	UpdateUsername       string
	UpdateUserOrgID      uuid.UUID
	UpdateUserFirstName  string
	UpdateUserLastName   string
	UpdateTimestamp      time.Time
}

type FindOrgByNameRow added in v0.41.0

type FindOrgByNameRow struct {
	OrgID          uuid.UUID
	OrgExtlID      string
	OrgName        string
	OrgDescription string
	OrgKindID      uuid.UUID
	OrgKindExtlID  string
	OrgKindDesc    string
}

type FindOrgByNameWithAuditRow added in v0.41.0

type FindOrgByNameWithAuditRow struct {
	OrgID                uuid.UUID
	OrgExtlID            string
	OrgName              string
	OrgDescription       string
	OrgKindID            uuid.UUID
	OrgKindExtlID        string
	OrgKindDesc          string
	CreateAppID          uuid.UUID
	CreateAppOrgID       uuid.UUID
	CreateAppExtlID      string
	CreateAppName        string
	CreateAppDescription string
	CreateUserID         uuid.NullUUID
	CreateUsername       string
	CreateUserOrgID      uuid.UUID
	CreateUserFirstName  string
	CreateUserLastName   string
	CreateTimestamp      time.Time
	UpdateAppID          uuid.UUID
	UpdateAppOrgID       uuid.UUID
	UpdateAppExtlID      string
	UpdateAppName        string
	UpdateAppDescription string
	UpdateUserID         uuid.NullUUID
	UpdateUsername       string
	UpdateUserOrgID      uuid.UUID
	UpdateUserFirstName  string
	UpdateUserLastName   string
	UpdateTimestamp      time.Time
}

type FindOrgsByKindExtlIDRow added in v0.41.0

type FindOrgsByKindExtlIDRow struct {
	OrgID          uuid.UUID
	OrgExtlID      string
	OrgName        string
	OrgDescription string
	OrgKindExtlID  string
	OrgKindDesc    string
}

type FindOrgsRow added in v0.41.0

type FindOrgsRow struct {
	OrgID          uuid.UUID
	OrgExtlID      string
	OrgName        string
	OrgDescription string
	OrgKindID      uuid.UUID
	OrgKindExtlID  string
	OrgKindDesc    string
}

type FindOrgsWithAuditRow added in v0.41.0

type FindOrgsWithAuditRow struct {
	OrgID                uuid.UUID
	OrgExtlID            string
	OrgName              string
	OrgDescription       string
	OrgKindID            uuid.UUID
	OrgKindExtlID        string
	OrgKindDesc          string
	CreateAppID          uuid.UUID
	CreateAppOrgID       uuid.UUID
	CreateAppExtlID      string
	CreateAppName        string
	CreateAppDescription string
	CreateUserID         uuid.NullUUID
	CreateUsername       string
	CreateUserOrgID      uuid.UUID
	CreateUserFirstName  string
	CreateUserLastName   string
	CreateTimestamp      time.Time
	UpdateAppID          uuid.UUID
	UpdateAppOrgID       uuid.UUID
	UpdateAppExtlID      string
	UpdateAppName        string
	UpdateAppDescription string
	UpdateUserID         uuid.NullUUID
	UpdateUsername       string
	UpdateUserOrgID      uuid.UUID
	UpdateUserFirstName  string
	UpdateUserLastName   string
	UpdateTimestamp      time.Time
}

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 OrgKind added in v0.40.0

type OrgKind struct {
	// Organization Kind ID - pk for table
	OrgKindID uuid.UUID
	// A short code denoting the organization kind
	OrgKindExtlID string
	// A longer descriptor of the organization kind
	OrgKindDesc string
	// 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
}

Organization Kind is a reference table denoting an organization's (org) classification. Examples are Genesis, Test, Standard

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 PersonProfile added in v0.41.0

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) CreateOrg

func (q *Queries) CreateOrg(ctx context.Context, arg CreateOrgParams) (int64, error)

func (*Queries) CreateOrgKind added in v0.40.0

func (q *Queries) CreateOrgKind(ctx context.Context, arg CreateOrgKindParams) (int64, error)

func (*Queries) DeleteOrg

func (q *Queries) DeleteOrg(ctx context.Context, orgID uuid.UUID) (int64, error)

func (*Queries) FindOrgByExtlID

func (q *Queries) FindOrgByExtlID(ctx context.Context, orgExtlID string) (FindOrgByExtlIDRow, error)

func (*Queries) FindOrgByExtlIDWithAudit added in v0.41.0

func (q *Queries) FindOrgByExtlIDWithAudit(ctx context.Context, orgExtlID string) (FindOrgByExtlIDWithAuditRow, error)

func (*Queries) FindOrgByID

func (q *Queries) FindOrgByID(ctx context.Context, orgID uuid.UUID) (FindOrgByIDRow, error)

func (*Queries) FindOrgByIDWithAudit added in v0.41.0

func (q *Queries) FindOrgByIDWithAudit(ctx context.Context, orgID uuid.UUID) (FindOrgByIDWithAuditRow, error)

func (*Queries) FindOrgByName added in v0.41.0

func (q *Queries) FindOrgByName(ctx context.Context, orgName string) (FindOrgByNameRow, error)

func (*Queries) FindOrgByNameWithAudit added in v0.41.0

func (q *Queries) FindOrgByNameWithAudit(ctx context.Context, orgName string) (FindOrgByNameWithAuditRow, error)

func (*Queries) FindOrgKindByExtlID added in v0.40.0

func (q *Queries) FindOrgKindByExtlID(ctx context.Context, orgKindExtlID string) (OrgKind, error)

func (*Queries) FindOrgKinds added in v0.40.0

func (q *Queries) FindOrgKinds(ctx context.Context) ([]OrgKind, error)

func (*Queries) FindOrgs

func (q *Queries) FindOrgs(ctx context.Context) ([]FindOrgsRow, error)

func (*Queries) FindOrgsByKindExtlID added in v0.41.0

func (q *Queries) FindOrgsByKindExtlID(ctx context.Context, orgKindExtlID string) ([]FindOrgsByKindExtlIDRow, error)

func (*Queries) FindOrgsWithAudit added in v0.41.0

func (q *Queries) FindOrgsWithAudit(ctx context.Context) ([]FindOrgsWithAuditRow, error)

func (*Queries) UpdateOrg

func (q *Queries) UpdateOrg(ctx context.Context, arg UpdateOrgParams) (int64, error)

func (*Queries) WithTx

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

type UpdateOrgParams

type UpdateOrgParams struct {
	OrgName         string
	OrgDescription  string
	UpdateAppID     uuid.UUID
	UpdateUserID    uuid.NullUUID
	UpdateTimestamp time.Time
	OrgID           uuid.UUID
}

Jump to

Keyboard shortcuts

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