user

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the user type in the database.
	Label = "user"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldEmail holds the string denoting the email field in the database.
	FieldEmail = "email"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldPasswordHash holds the string denoting the password_hash field in the database.
	FieldPasswordHash = "password_hash"
	// FieldRole holds the string denoting the role field in the database.
	FieldRole = "role"
	// FieldAuthProvider holds the string denoting the auth_provider field in the database.
	FieldAuthProvider = "auth_provider"
	// FieldAuthProviderID holds the string denoting the auth_provider_id field in the database.
	FieldAuthProviderID = "auth_provider_id"
	// FieldAvatarURL holds the string denoting the avatar_url field in the database.
	FieldAvatarURL = "avatar_url"
	// FieldActive holds the string denoting the active field in the database.
	FieldActive = "active"
	// FieldLastLoginAt holds the string denoting the last_login_at field in the database.
	FieldLastLoginAt = "last_login_at"
	// FieldCreatedAt holds the string denoting the created_at field in the database.
	FieldCreatedAt = "created_at"
	// FieldUpdatedAt holds the string denoting the updated_at field in the database.
	FieldUpdatedAt = "updated_at"
	// EdgeOrg holds the string denoting the org edge name in mutations.
	EdgeOrg = "org"
	// EdgeSessions holds the string denoting the sessions edge name in mutations.
	EdgeSessions = "sessions"
	// Table holds the table name of the user in the database.
	Table = "users"
	// OrgTable is the table that holds the org relation/edge.
	OrgTable = "users"
	// OrgInverseTable is the table name for the Org entity.
	// It exists in this package in order to avoid circular dependency with the "org" package.
	OrgInverseTable = "orgs"
	// OrgColumn is the table column denoting the org relation/edge.
	OrgColumn = "org_users"
	// SessionsTable is the table that holds the sessions relation/edge.
	SessionsTable = "sessions"
	// SessionsInverseTable is the table name for the Session entity.
	// It exists in this package in order to avoid circular dependency with the "session" package.
	SessionsInverseTable = "sessions"
	// SessionsColumn is the table column denoting the sessions relation/edge.
	SessionsColumn = "user_sessions"
)
View Source
const DefaultAuthProvider = AuthProviderLocal

AuthProviderLocal is the default value of the AuthProvider enum.

View Source
const DefaultRole = RoleMember

RoleMember is the default value of the Role enum.

Variables

View Source
var (
	// EmailValidator is a validator for the "email" field. It is called by the builders before save.
	EmailValidator func(string) error
	// DefaultActive holds the default value on creation for the "active" field.
	DefaultActive bool
	// DefaultCreatedAt holds the default value on creation for the "created_at" field.
	DefaultCreatedAt func() time.Time
	// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
	DefaultUpdatedAt func() time.Time
	// UpdateDefaultUpdatedAt holds the default value on update for the "updated_at" field.
	UpdateDefaultUpdatedAt func() time.Time
)

Columns holds all SQL columns for user fields.

View Source
var ForeignKeys = []string{
	"org_users",
}

ForeignKeys holds the SQL foreign-keys that are owned by the "users" table and are not defined as standalone fields in the schema.

Functions

func Active

func Active(v bool) predicate.User

Active applies equality check predicate on the "active" field. It's identical to ActiveEQ.

func ActiveEQ

func ActiveEQ(v bool) predicate.User

ActiveEQ applies the EQ predicate on the "active" field.

func ActiveNEQ

func ActiveNEQ(v bool) predicate.User

ActiveNEQ applies the NEQ predicate on the "active" field.

func And

func And(predicates ...predicate.User) predicate.User

And groups predicates with the AND operator between them.

func AuthProviderEQ

func AuthProviderEQ(v AuthProvider) predicate.User

AuthProviderEQ applies the EQ predicate on the "auth_provider" field.

func AuthProviderID

func AuthProviderID(v string) predicate.User

AuthProviderID applies equality check predicate on the "auth_provider_id" field. It's identical to AuthProviderIDEQ.

func AuthProviderIDContains

func AuthProviderIDContains(v string) predicate.User

AuthProviderIDContains applies the Contains predicate on the "auth_provider_id" field.

func AuthProviderIDContainsFold

func AuthProviderIDContainsFold(v string) predicate.User

AuthProviderIDContainsFold applies the ContainsFold predicate on the "auth_provider_id" field.

func AuthProviderIDEQ

func AuthProviderIDEQ(v string) predicate.User

AuthProviderIDEQ applies the EQ predicate on the "auth_provider_id" field.

func AuthProviderIDEqualFold

func AuthProviderIDEqualFold(v string) predicate.User

AuthProviderIDEqualFold applies the EqualFold predicate on the "auth_provider_id" field.

func AuthProviderIDGT

func AuthProviderIDGT(v string) predicate.User

AuthProviderIDGT applies the GT predicate on the "auth_provider_id" field.

func AuthProviderIDGTE

func AuthProviderIDGTE(v string) predicate.User

AuthProviderIDGTE applies the GTE predicate on the "auth_provider_id" field.

func AuthProviderIDHasPrefix

func AuthProviderIDHasPrefix(v string) predicate.User

AuthProviderIDHasPrefix applies the HasPrefix predicate on the "auth_provider_id" field.

func AuthProviderIDHasSuffix

func AuthProviderIDHasSuffix(v string) predicate.User

AuthProviderIDHasSuffix applies the HasSuffix predicate on the "auth_provider_id" field.

func AuthProviderIDIn

func AuthProviderIDIn(vs ...string) predicate.User

AuthProviderIDIn applies the In predicate on the "auth_provider_id" field.

func AuthProviderIDIsNil

func AuthProviderIDIsNil() predicate.User

AuthProviderIDIsNil applies the IsNil predicate on the "auth_provider_id" field.

func AuthProviderIDLT

func AuthProviderIDLT(v string) predicate.User

AuthProviderIDLT applies the LT predicate on the "auth_provider_id" field.

func AuthProviderIDLTE

func AuthProviderIDLTE(v string) predicate.User

AuthProviderIDLTE applies the LTE predicate on the "auth_provider_id" field.

func AuthProviderIDNEQ

func AuthProviderIDNEQ(v string) predicate.User

AuthProviderIDNEQ applies the NEQ predicate on the "auth_provider_id" field.

func AuthProviderIDNotIn

func AuthProviderIDNotIn(vs ...string) predicate.User

AuthProviderIDNotIn applies the NotIn predicate on the "auth_provider_id" field.

func AuthProviderIDNotNil

func AuthProviderIDNotNil() predicate.User

AuthProviderIDNotNil applies the NotNil predicate on the "auth_provider_id" field.

func AuthProviderIn

func AuthProviderIn(vs ...AuthProvider) predicate.User

AuthProviderIn applies the In predicate on the "auth_provider" field.

func AuthProviderNEQ

func AuthProviderNEQ(v AuthProvider) predicate.User

AuthProviderNEQ applies the NEQ predicate on the "auth_provider" field.

func AuthProviderNotIn

func AuthProviderNotIn(vs ...AuthProvider) predicate.User

AuthProviderNotIn applies the NotIn predicate on the "auth_provider" field.

func AuthProviderValidator

func AuthProviderValidator(ap AuthProvider) error

AuthProviderValidator is a validator for the "auth_provider" field enum values. It is called by the builders before save.

func AvatarURL

func AvatarURL(v string) predicate.User

AvatarURL applies equality check predicate on the "avatar_url" field. It's identical to AvatarURLEQ.

func AvatarURLContains

func AvatarURLContains(v string) predicate.User

AvatarURLContains applies the Contains predicate on the "avatar_url" field.

func AvatarURLContainsFold

func AvatarURLContainsFold(v string) predicate.User

AvatarURLContainsFold applies the ContainsFold predicate on the "avatar_url" field.

func AvatarURLEQ

func AvatarURLEQ(v string) predicate.User

AvatarURLEQ applies the EQ predicate on the "avatar_url" field.

func AvatarURLEqualFold

func AvatarURLEqualFold(v string) predicate.User

AvatarURLEqualFold applies the EqualFold predicate on the "avatar_url" field.

func AvatarURLGT

func AvatarURLGT(v string) predicate.User

AvatarURLGT applies the GT predicate on the "avatar_url" field.

func AvatarURLGTE

func AvatarURLGTE(v string) predicate.User

AvatarURLGTE applies the GTE predicate on the "avatar_url" field.

func AvatarURLHasPrefix

func AvatarURLHasPrefix(v string) predicate.User

AvatarURLHasPrefix applies the HasPrefix predicate on the "avatar_url" field.

func AvatarURLHasSuffix

func AvatarURLHasSuffix(v string) predicate.User

AvatarURLHasSuffix applies the HasSuffix predicate on the "avatar_url" field.

func AvatarURLIn

func AvatarURLIn(vs ...string) predicate.User

AvatarURLIn applies the In predicate on the "avatar_url" field.

func AvatarURLIsNil

func AvatarURLIsNil() predicate.User

AvatarURLIsNil applies the IsNil predicate on the "avatar_url" field.

func AvatarURLLT

func AvatarURLLT(v string) predicate.User

AvatarURLLT applies the LT predicate on the "avatar_url" field.

func AvatarURLLTE

func AvatarURLLTE(v string) predicate.User

AvatarURLLTE applies the LTE predicate on the "avatar_url" field.

func AvatarURLNEQ

func AvatarURLNEQ(v string) predicate.User

AvatarURLNEQ applies the NEQ predicate on the "avatar_url" field.

func AvatarURLNotIn

func AvatarURLNotIn(vs ...string) predicate.User

AvatarURLNotIn applies the NotIn predicate on the "avatar_url" field.

func AvatarURLNotNil

func AvatarURLNotNil() predicate.User

AvatarURLNotNil applies the NotNil predicate on the "avatar_url" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.User

CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.User

CreatedAtEQ applies the EQ predicate on the "created_at" field.

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.User

CreatedAtGT applies the GT predicate on the "created_at" field.

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.User

CreatedAtGTE applies the GTE predicate on the "created_at" field.

func CreatedAtIn

func CreatedAtIn(vs ...time.Time) predicate.User

CreatedAtIn applies the In predicate on the "created_at" field.

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.User

CreatedAtLT applies the LT predicate on the "created_at" field.

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.User

CreatedAtLTE applies the LTE predicate on the "created_at" field.

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.User

CreatedAtNEQ applies the NEQ predicate on the "created_at" field.

func CreatedAtNotIn

func CreatedAtNotIn(vs ...time.Time) predicate.User

CreatedAtNotIn applies the NotIn predicate on the "created_at" field.

func Email

func Email(v string) predicate.User

Email applies equality check predicate on the "email" field. It's identical to EmailEQ.

func EmailContains

func EmailContains(v string) predicate.User

EmailContains applies the Contains predicate on the "email" field.

func EmailContainsFold

func EmailContainsFold(v string) predicate.User

EmailContainsFold applies the ContainsFold predicate on the "email" field.

func EmailEQ

func EmailEQ(v string) predicate.User

EmailEQ applies the EQ predicate on the "email" field.

func EmailEqualFold

func EmailEqualFold(v string) predicate.User

EmailEqualFold applies the EqualFold predicate on the "email" field.

func EmailGT

func EmailGT(v string) predicate.User

EmailGT applies the GT predicate on the "email" field.

func EmailGTE

func EmailGTE(v string) predicate.User

EmailGTE applies the GTE predicate on the "email" field.

func EmailHasPrefix

func EmailHasPrefix(v string) predicate.User

EmailHasPrefix applies the HasPrefix predicate on the "email" field.

func EmailHasSuffix

func EmailHasSuffix(v string) predicate.User

EmailHasSuffix applies the HasSuffix predicate on the "email" field.

func EmailIn

func EmailIn(vs ...string) predicate.User

EmailIn applies the In predicate on the "email" field.

func EmailLT

func EmailLT(v string) predicate.User

EmailLT applies the LT predicate on the "email" field.

func EmailLTE

func EmailLTE(v string) predicate.User

EmailLTE applies the LTE predicate on the "email" field.

func EmailNEQ

func EmailNEQ(v string) predicate.User

EmailNEQ applies the NEQ predicate on the "email" field.

func EmailNotIn

func EmailNotIn(vs ...string) predicate.User

EmailNotIn applies the NotIn predicate on the "email" field.

func HasOrg

func HasOrg() predicate.User

HasOrg applies the HasEdge predicate on the "org" edge.

func HasOrgWith

func HasOrgWith(preds ...predicate.Org) predicate.User

HasOrgWith applies the HasEdge predicate on the "org" edge with a given conditions (other predicates).

func HasSessions

func HasSessions() predicate.User

HasSessions applies the HasEdge predicate on the "sessions" edge.

func HasSessionsWith

func HasSessionsWith(preds ...predicate.Session) predicate.User

HasSessionsWith applies the HasEdge predicate on the "sessions" edge with a given conditions (other predicates).

func ID

func ID(id int) predicate.User

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.User

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.User

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.User

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...int) predicate.User

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.User

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.User

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.User

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...int) predicate.User

IDNotIn applies the NotIn predicate on the ID field.

func LastLoginAt

func LastLoginAt(v time.Time) predicate.User

LastLoginAt applies equality check predicate on the "last_login_at" field. It's identical to LastLoginAtEQ.

func LastLoginAtEQ

func LastLoginAtEQ(v time.Time) predicate.User

LastLoginAtEQ applies the EQ predicate on the "last_login_at" field.

func LastLoginAtGT

func LastLoginAtGT(v time.Time) predicate.User

LastLoginAtGT applies the GT predicate on the "last_login_at" field.

func LastLoginAtGTE

func LastLoginAtGTE(v time.Time) predicate.User

LastLoginAtGTE applies the GTE predicate on the "last_login_at" field.

func LastLoginAtIn

func LastLoginAtIn(vs ...time.Time) predicate.User

LastLoginAtIn applies the In predicate on the "last_login_at" field.

func LastLoginAtIsNil

func LastLoginAtIsNil() predicate.User

LastLoginAtIsNil applies the IsNil predicate on the "last_login_at" field.

func LastLoginAtLT

func LastLoginAtLT(v time.Time) predicate.User

LastLoginAtLT applies the LT predicate on the "last_login_at" field.

func LastLoginAtLTE

func LastLoginAtLTE(v time.Time) predicate.User

LastLoginAtLTE applies the LTE predicate on the "last_login_at" field.

func LastLoginAtNEQ

func LastLoginAtNEQ(v time.Time) predicate.User

LastLoginAtNEQ applies the NEQ predicate on the "last_login_at" field.

func LastLoginAtNotIn

func LastLoginAtNotIn(vs ...time.Time) predicate.User

LastLoginAtNotIn applies the NotIn predicate on the "last_login_at" field.

func LastLoginAtNotNil

func LastLoginAtNotNil() predicate.User

LastLoginAtNotNil applies the NotNil predicate on the "last_login_at" field.

func Name

func Name(v string) predicate.User

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.User

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.User

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.User

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.User

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.User

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.User

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.User

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.User

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.User

NameIn applies the In predicate on the "name" field.

func NameIsNil

func NameIsNil() predicate.User

NameIsNil applies the IsNil predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.User

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.User

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.User

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.User

NameNotIn applies the NotIn predicate on the "name" field.

func NameNotNil

func NameNotNil() predicate.User

NameNotNil applies the NotNil predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.User) predicate.User

Or groups predicates with the OR operator between them.

func PasswordHash

func PasswordHash(v string) predicate.User

PasswordHash applies equality check predicate on the "password_hash" field. It's identical to PasswordHashEQ.

func PasswordHashContains

func PasswordHashContains(v string) predicate.User

PasswordHashContains applies the Contains predicate on the "password_hash" field.

func PasswordHashContainsFold

func PasswordHashContainsFold(v string) predicate.User

PasswordHashContainsFold applies the ContainsFold predicate on the "password_hash" field.

func PasswordHashEQ

func PasswordHashEQ(v string) predicate.User

PasswordHashEQ applies the EQ predicate on the "password_hash" field.

func PasswordHashEqualFold

func PasswordHashEqualFold(v string) predicate.User

PasswordHashEqualFold applies the EqualFold predicate on the "password_hash" field.

func PasswordHashGT

func PasswordHashGT(v string) predicate.User

PasswordHashGT applies the GT predicate on the "password_hash" field.

func PasswordHashGTE

func PasswordHashGTE(v string) predicate.User

PasswordHashGTE applies the GTE predicate on the "password_hash" field.

func PasswordHashHasPrefix

func PasswordHashHasPrefix(v string) predicate.User

PasswordHashHasPrefix applies the HasPrefix predicate on the "password_hash" field.

func PasswordHashHasSuffix

func PasswordHashHasSuffix(v string) predicate.User

PasswordHashHasSuffix applies the HasSuffix predicate on the "password_hash" field.

func PasswordHashIn

func PasswordHashIn(vs ...string) predicate.User

PasswordHashIn applies the In predicate on the "password_hash" field.

func PasswordHashIsNil

func PasswordHashIsNil() predicate.User

PasswordHashIsNil applies the IsNil predicate on the "password_hash" field.

func PasswordHashLT

func PasswordHashLT(v string) predicate.User

PasswordHashLT applies the LT predicate on the "password_hash" field.

func PasswordHashLTE

func PasswordHashLTE(v string) predicate.User

PasswordHashLTE applies the LTE predicate on the "password_hash" field.

func PasswordHashNEQ

func PasswordHashNEQ(v string) predicate.User

PasswordHashNEQ applies the NEQ predicate on the "password_hash" field.

func PasswordHashNotIn

func PasswordHashNotIn(vs ...string) predicate.User

PasswordHashNotIn applies the NotIn predicate on the "password_hash" field.

func PasswordHashNotNil

func PasswordHashNotNil() predicate.User

PasswordHashNotNil applies the NotNil predicate on the "password_hash" field.

func RoleEQ

func RoleEQ(v Role) predicate.User

RoleEQ applies the EQ predicate on the "role" field.

func RoleIn

func RoleIn(vs ...Role) predicate.User

RoleIn applies the In predicate on the "role" field.

func RoleNEQ

func RoleNEQ(v Role) predicate.User

RoleNEQ applies the NEQ predicate on the "role" field.

func RoleNotIn

func RoleNotIn(vs ...Role) predicate.User

RoleNotIn applies the NotIn predicate on the "role" field.

func RoleValidator

func RoleValidator(r Role) error

RoleValidator is a validator for the "role" field enum values. It is called by the builders before save.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.User

UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.User

UpdatedAtEQ applies the EQ predicate on the "updated_at" field.

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.User

UpdatedAtGT applies the GT predicate on the "updated_at" field.

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.User

UpdatedAtGTE applies the GTE predicate on the "updated_at" field.

func UpdatedAtIn

func UpdatedAtIn(vs ...time.Time) predicate.User

UpdatedAtIn applies the In predicate on the "updated_at" field.

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.User

UpdatedAtLT applies the LT predicate on the "updated_at" field.

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.User

UpdatedAtLTE applies the LTE predicate on the "updated_at" field.

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.User

UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.

func UpdatedAtNotIn

func UpdatedAtNotIn(vs ...time.Time) predicate.User

UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type AuthProvider

type AuthProvider string

AuthProvider defines the type for the "auth_provider" enum field.

const (
	AuthProviderLocal  AuthProvider = "local"
	AuthProviderGoogle AuthProvider = "google"
	AuthProviderGithub AuthProvider = "github"
	AuthProviderOidc   AuthProvider = "oidc"
)

AuthProvider values.

func (AuthProvider) String

func (ap AuthProvider) String() string

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the User queries.

func ByActive

func ByActive(opts ...sql.OrderTermOption) OrderOption

ByActive orders the results by the active field.

func ByAuthProvider

func ByAuthProvider(opts ...sql.OrderTermOption) OrderOption

ByAuthProvider orders the results by the auth_provider field.

func ByAuthProviderID

func ByAuthProviderID(opts ...sql.OrderTermOption) OrderOption

ByAuthProviderID orders the results by the auth_provider_id field.

func ByAvatarURL

func ByAvatarURL(opts ...sql.OrderTermOption) OrderOption

ByAvatarURL orders the results by the avatar_url field.

func ByCreatedAt

func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption

ByCreatedAt orders the results by the created_at field.

func ByEmail

func ByEmail(opts ...sql.OrderTermOption) OrderOption

ByEmail orders the results by the email field.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByLastLoginAt

func ByLastLoginAt(opts ...sql.OrderTermOption) OrderOption

ByLastLoginAt orders the results by the last_login_at field.

func ByName

func ByName(opts ...sql.OrderTermOption) OrderOption

ByName orders the results by the name field.

func ByOrgField

func ByOrgField(field string, opts ...sql.OrderTermOption) OrderOption

ByOrgField orders the results by org field.

func ByPasswordHash

func ByPasswordHash(opts ...sql.OrderTermOption) OrderOption

ByPasswordHash orders the results by the password_hash field.

func ByRole

func ByRole(opts ...sql.OrderTermOption) OrderOption

ByRole orders the results by the role field.

func BySessions

func BySessions(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

BySessions orders the results by sessions terms.

func BySessionsCount

func BySessionsCount(opts ...sql.OrderTermOption) OrderOption

BySessionsCount orders the results by sessions count.

func ByUpdatedAt

func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption

ByUpdatedAt orders the results by the updated_at field.

type Role

type Role string

Role defines the type for the "role" enum field.

const (
	RoleOwner  Role = "owner"
	RoleAdmin  Role = "admin"
	RoleMember Role = "member"
	RoleViewer Role = "viewer"
)

Role values.

func (Role) String

func (r Role) String() string

Jump to

Keyboard shortcuts

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