policies

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the policies type in the database.
	Label = "policies"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// 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"
	// FieldDeletedAt holds the string denoting the deleted_at field in the database.
	FieldDeletedAt = "deleted_at"
	// FieldCreatedBy holds the string denoting the created_by field in the database.
	FieldCreatedBy = "created_by"
	// FieldUpdatedBy holds the string denoting the updated_by field in the database.
	FieldUpdatedBy = "updated_by"
	// FieldCode holds the string denoting the code field in the database.
	FieldCode = "code"
	// FieldDisplayName holds the string denoting the display_name field in the database.
	FieldDisplayName = "display_name"
	// FieldPolicyStatus holds the string denoting the policy_status field in the database.
	FieldPolicyStatus = "policy_status"
	// FieldStatements holds the string denoting the statements field in the database.
	FieldStatements = "statements"
	// FieldProtected holds the string denoting the protected field in the database.
	FieldProtected = "protected"
	// FieldDescription holds the string denoting the description field in the database.
	FieldDescription = "description"
	// EdgeLionRolePolicies holds the string denoting the lion_role_policies edge name in mutations.
	EdgeLionRolePolicies = "lion_role_policies"
	// Table holds the table name of the policies in the database.
	Table = "lion_policies"
	// LionRolePoliciesTable is the table that holds the lion_role_policies relation/edge.
	LionRolePoliciesTable = "lion_role_policies"
	// LionRolePoliciesInverseTable is the table name for the RolePolicies entity.
	// It exists in this package in order to avoid circular dependency with the "rolepolicies" package.
	LionRolePoliciesInverseTable = "lion_role_policies"
	// LionRolePoliciesColumn is the table column denoting the lion_role_policies relation/edge.
	LionRolePoliciesColumn = "policy_id"
)

Variables

View Source
var (
	// 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
	// DefaultCreatedBy holds the default value on creation for the "created_by" field.
	DefaultCreatedBy int64
	// DefaultUpdatedBy holds the default value on creation for the "updated_by" field.
	DefaultUpdatedBy int64
	// CodeValidator is a validator for the "code" field. It is called by the builders before save.
	CodeValidator func(string) error
	// DisplayNameValidator is a validator for the "display_name" field. It is called by the builders before save.
	DisplayNameValidator func(string) error
	// DefaultPolicyStatus holds the default value on creation for the "policy_status" field.
	DefaultPolicyStatus int
	// DefaultProtected holds the default value on creation for the "protected" field.
	DefaultProtected bool
	// DefaultDescription holds the default value on creation for the "description" field.
	DefaultDescription string
)

Columns holds all SQL columns for policies fields.

Functions

func And

func And(predicates ...predicate.Policies) predicate.Policies

And groups predicates with the AND operator between them.

func Code

func Code(v string) predicate.Policies

Code applies equality check predicate on the "code" field. It's identical to CodeEQ.

func CodeContains

func CodeContains(v string) predicate.Policies

CodeContains applies the Contains predicate on the "code" field.

func CodeContainsFold

func CodeContainsFold(v string) predicate.Policies

CodeContainsFold applies the ContainsFold predicate on the "code" field.

func CodeEQ

func CodeEQ(v string) predicate.Policies

CodeEQ applies the EQ predicate on the "code" field.

func CodeEqualFold

func CodeEqualFold(v string) predicate.Policies

CodeEqualFold applies the EqualFold predicate on the "code" field.

func CodeGT

func CodeGT(v string) predicate.Policies

CodeGT applies the GT predicate on the "code" field.

func CodeGTE

func CodeGTE(v string) predicate.Policies

CodeGTE applies the GTE predicate on the "code" field.

func CodeHasPrefix

func CodeHasPrefix(v string) predicate.Policies

CodeHasPrefix applies the HasPrefix predicate on the "code" field.

func CodeHasSuffix

func CodeHasSuffix(v string) predicate.Policies

CodeHasSuffix applies the HasSuffix predicate on the "code" field.

func CodeIn

func CodeIn(vs ...string) predicate.Policies

CodeIn applies the In predicate on the "code" field.

func CodeLT

func CodeLT(v string) predicate.Policies

CodeLT applies the LT predicate on the "code" field.

func CodeLTE

func CodeLTE(v string) predicate.Policies

CodeLTE applies the LTE predicate on the "code" field.

func CodeNEQ

func CodeNEQ(v string) predicate.Policies

CodeNEQ applies the NEQ predicate on the "code" field.

func CodeNotIn

func CodeNotIn(vs ...string) predicate.Policies

CodeNotIn applies the NotIn predicate on the "code" field.

func CreatedAt

func CreatedAt(v time.Time) predicate.Policies

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

func CreatedAtEQ

func CreatedAtEQ(v time.Time) predicate.Policies

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

func CreatedAtGT

func CreatedAtGT(v time.Time) predicate.Policies

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

func CreatedAtGTE

func CreatedAtGTE(v time.Time) predicate.Policies

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

func CreatedAtIn

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

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

func CreatedAtLT

func CreatedAtLT(v time.Time) predicate.Policies

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

func CreatedAtLTE

func CreatedAtLTE(v time.Time) predicate.Policies

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

func CreatedAtNEQ

func CreatedAtNEQ(v time.Time) predicate.Policies

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

func CreatedAtNotIn

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

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

func CreatedBy

func CreatedBy(v int64) predicate.Policies

CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.

func CreatedByEQ

func CreatedByEQ(v int64) predicate.Policies

CreatedByEQ applies the EQ predicate on the "created_by" field.

func CreatedByGT

func CreatedByGT(v int64) predicate.Policies

CreatedByGT applies the GT predicate on the "created_by" field.

func CreatedByGTE

func CreatedByGTE(v int64) predicate.Policies

CreatedByGTE applies the GTE predicate on the "created_by" field.

func CreatedByIn

func CreatedByIn(vs ...int64) predicate.Policies

CreatedByIn applies the In predicate on the "created_by" field.

func CreatedByIsNil

func CreatedByIsNil() predicate.Policies

CreatedByIsNil applies the IsNil predicate on the "created_by" field.

func CreatedByLT

func CreatedByLT(v int64) predicate.Policies

CreatedByLT applies the LT predicate on the "created_by" field.

func CreatedByLTE

func CreatedByLTE(v int64) predicate.Policies

CreatedByLTE applies the LTE predicate on the "created_by" field.

func CreatedByNEQ

func CreatedByNEQ(v int64) predicate.Policies

CreatedByNEQ applies the NEQ predicate on the "created_by" field.

func CreatedByNotIn

func CreatedByNotIn(vs ...int64) predicate.Policies

CreatedByNotIn applies the NotIn predicate on the "created_by" field.

func CreatedByNotNil

func CreatedByNotNil() predicate.Policies

CreatedByNotNil applies the NotNil predicate on the "created_by" field.

func DeletedAt

func DeletedAt(v time.Time) predicate.Policies

DeletedAt applies equality check predicate on the "deleted_at" field. It's identical to DeletedAtEQ.

func DeletedAtEQ

func DeletedAtEQ(v time.Time) predicate.Policies

DeletedAtEQ applies the EQ predicate on the "deleted_at" field.

func DeletedAtGT

func DeletedAtGT(v time.Time) predicate.Policies

DeletedAtGT applies the GT predicate on the "deleted_at" field.

func DeletedAtGTE

func DeletedAtGTE(v time.Time) predicate.Policies

DeletedAtGTE applies the GTE predicate on the "deleted_at" field.

func DeletedAtIn

func DeletedAtIn(vs ...time.Time) predicate.Policies

DeletedAtIn applies the In predicate on the "deleted_at" field.

func DeletedAtIsNil

func DeletedAtIsNil() predicate.Policies

DeletedAtIsNil applies the IsNil predicate on the "deleted_at" field.

func DeletedAtLT

func DeletedAtLT(v time.Time) predicate.Policies

DeletedAtLT applies the LT predicate on the "deleted_at" field.

func DeletedAtLTE

func DeletedAtLTE(v time.Time) predicate.Policies

DeletedAtLTE applies the LTE predicate on the "deleted_at" field.

func DeletedAtNEQ

func DeletedAtNEQ(v time.Time) predicate.Policies

DeletedAtNEQ applies the NEQ predicate on the "deleted_at" field.

func DeletedAtNotIn

func DeletedAtNotIn(vs ...time.Time) predicate.Policies

DeletedAtNotIn applies the NotIn predicate on the "deleted_at" field.

func DeletedAtNotNil

func DeletedAtNotNil() predicate.Policies

DeletedAtNotNil applies the NotNil predicate on the "deleted_at" field.

func Description

func Description(v string) predicate.Policies

Description applies equality check predicate on the "description" field. It's identical to DescriptionEQ.

func DescriptionContains

func DescriptionContains(v string) predicate.Policies

DescriptionContains applies the Contains predicate on the "description" field.

func DescriptionContainsFold

func DescriptionContainsFold(v string) predicate.Policies

DescriptionContainsFold applies the ContainsFold predicate on the "description" field.

func DescriptionEQ

func DescriptionEQ(v string) predicate.Policies

DescriptionEQ applies the EQ predicate on the "description" field.

func DescriptionEqualFold

func DescriptionEqualFold(v string) predicate.Policies

DescriptionEqualFold applies the EqualFold predicate on the "description" field.

func DescriptionGT

func DescriptionGT(v string) predicate.Policies

DescriptionGT applies the GT predicate on the "description" field.

func DescriptionGTE

func DescriptionGTE(v string) predicate.Policies

DescriptionGTE applies the GTE predicate on the "description" field.

func DescriptionHasPrefix

func DescriptionHasPrefix(v string) predicate.Policies

DescriptionHasPrefix applies the HasPrefix predicate on the "description" field.

func DescriptionHasSuffix

func DescriptionHasSuffix(v string) predicate.Policies

DescriptionHasSuffix applies the HasSuffix predicate on the "description" field.

func DescriptionIn

func DescriptionIn(vs ...string) predicate.Policies

DescriptionIn applies the In predicate on the "description" field.

func DescriptionLT

func DescriptionLT(v string) predicate.Policies

DescriptionLT applies the LT predicate on the "description" field.

func DescriptionLTE

func DescriptionLTE(v string) predicate.Policies

DescriptionLTE applies the LTE predicate on the "description" field.

func DescriptionNEQ

func DescriptionNEQ(v string) predicate.Policies

DescriptionNEQ applies the NEQ predicate on the "description" field.

func DescriptionNotIn

func DescriptionNotIn(vs ...string) predicate.Policies

DescriptionNotIn applies the NotIn predicate on the "description" field.

func DisplayName

func DisplayName(v string) predicate.Policies

DisplayName applies equality check predicate on the "display_name" field. It's identical to DisplayNameEQ.

func DisplayNameContains

func DisplayNameContains(v string) predicate.Policies

DisplayNameContains applies the Contains predicate on the "display_name" field.

func DisplayNameContainsFold

func DisplayNameContainsFold(v string) predicate.Policies

DisplayNameContainsFold applies the ContainsFold predicate on the "display_name" field.

func DisplayNameEQ

func DisplayNameEQ(v string) predicate.Policies

DisplayNameEQ applies the EQ predicate on the "display_name" field.

func DisplayNameEqualFold

func DisplayNameEqualFold(v string) predicate.Policies

DisplayNameEqualFold applies the EqualFold predicate on the "display_name" field.

func DisplayNameGT

func DisplayNameGT(v string) predicate.Policies

DisplayNameGT applies the GT predicate on the "display_name" field.

func DisplayNameGTE

func DisplayNameGTE(v string) predicate.Policies

DisplayNameGTE applies the GTE predicate on the "display_name" field.

func DisplayNameHasPrefix

func DisplayNameHasPrefix(v string) predicate.Policies

DisplayNameHasPrefix applies the HasPrefix predicate on the "display_name" field.

func DisplayNameHasSuffix

func DisplayNameHasSuffix(v string) predicate.Policies

DisplayNameHasSuffix applies the HasSuffix predicate on the "display_name" field.

func DisplayNameIn

func DisplayNameIn(vs ...string) predicate.Policies

DisplayNameIn applies the In predicate on the "display_name" field.

func DisplayNameLT

func DisplayNameLT(v string) predicate.Policies

DisplayNameLT applies the LT predicate on the "display_name" field.

func DisplayNameLTE

func DisplayNameLTE(v string) predicate.Policies

DisplayNameLTE applies the LTE predicate on the "display_name" field.

func DisplayNameNEQ

func DisplayNameNEQ(v string) predicate.Policies

DisplayNameNEQ applies the NEQ predicate on the "display_name" field.

func DisplayNameNotIn

func DisplayNameNotIn(vs ...string) predicate.Policies

DisplayNameNotIn applies the NotIn predicate on the "display_name" field.

func HasLionRolePolicies

func HasLionRolePolicies() predicate.Policies

HasLionRolePolicies applies the HasEdge predicate on the "lion_role_policies" edge.

func HasLionRolePoliciesWith

func HasLionRolePoliciesWith(preds ...predicate.RolePolicies) predicate.Policies

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

func ID

func ID(id int) predicate.Policies

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id int) predicate.Policies

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id int) predicate.Policies

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id int) predicate.Policies

IDGTE applies the GTE predicate on the ID field.

func IDIn

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

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id int) predicate.Policies

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id int) predicate.Policies

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id int) predicate.Policies

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

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

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Policies) predicate.Policies

Or groups predicates with the OR operator between them.

func PolicyStatus

func PolicyStatus(v int) predicate.Policies

PolicyStatus applies equality check predicate on the "policy_status" field. It's identical to PolicyStatusEQ.

func PolicyStatusEQ

func PolicyStatusEQ(v int) predicate.Policies

PolicyStatusEQ applies the EQ predicate on the "policy_status" field.

func PolicyStatusGT

func PolicyStatusGT(v int) predicate.Policies

PolicyStatusGT applies the GT predicate on the "policy_status" field.

func PolicyStatusGTE

func PolicyStatusGTE(v int) predicate.Policies

PolicyStatusGTE applies the GTE predicate on the "policy_status" field.

func PolicyStatusIn

func PolicyStatusIn(vs ...int) predicate.Policies

PolicyStatusIn applies the In predicate on the "policy_status" field.

func PolicyStatusLT

func PolicyStatusLT(v int) predicate.Policies

PolicyStatusLT applies the LT predicate on the "policy_status" field.

func PolicyStatusLTE

func PolicyStatusLTE(v int) predicate.Policies

PolicyStatusLTE applies the LTE predicate on the "policy_status" field.

func PolicyStatusNEQ

func PolicyStatusNEQ(v int) predicate.Policies

PolicyStatusNEQ applies the NEQ predicate on the "policy_status" field.

func PolicyStatusNotIn

func PolicyStatusNotIn(vs ...int) predicate.Policies

PolicyStatusNotIn applies the NotIn predicate on the "policy_status" field.

func Protected

func Protected(v bool) predicate.Policies

Protected applies equality check predicate on the "protected" field. It's identical to ProtectedEQ.

func ProtectedEQ

func ProtectedEQ(v bool) predicate.Policies

ProtectedEQ applies the EQ predicate on the "protected" field.

func ProtectedNEQ

func ProtectedNEQ(v bool) predicate.Policies

ProtectedNEQ applies the NEQ predicate on the "protected" field.

func UpdatedAt

func UpdatedAt(v time.Time) predicate.Policies

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

func UpdatedAtEQ

func UpdatedAtEQ(v time.Time) predicate.Policies

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

func UpdatedAtGT

func UpdatedAtGT(v time.Time) predicate.Policies

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

func UpdatedAtGTE

func UpdatedAtGTE(v time.Time) predicate.Policies

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

func UpdatedAtIn

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

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

func UpdatedAtLT

func UpdatedAtLT(v time.Time) predicate.Policies

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

func UpdatedAtLTE

func UpdatedAtLTE(v time.Time) predicate.Policies

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

func UpdatedAtNEQ

func UpdatedAtNEQ(v time.Time) predicate.Policies

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

func UpdatedAtNotIn

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

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

func UpdatedBy

func UpdatedBy(v int64) predicate.Policies

UpdatedBy applies equality check predicate on the "updated_by" field. It's identical to UpdatedByEQ.

func UpdatedByEQ

func UpdatedByEQ(v int64) predicate.Policies

UpdatedByEQ applies the EQ predicate on the "updated_by" field.

func UpdatedByGT

func UpdatedByGT(v int64) predicate.Policies

UpdatedByGT applies the GT predicate on the "updated_by" field.

func UpdatedByGTE

func UpdatedByGTE(v int64) predicate.Policies

UpdatedByGTE applies the GTE predicate on the "updated_by" field.

func UpdatedByIn

func UpdatedByIn(vs ...int64) predicate.Policies

UpdatedByIn applies the In predicate on the "updated_by" field.

func UpdatedByIsNil

func UpdatedByIsNil() predicate.Policies

UpdatedByIsNil applies the IsNil predicate on the "updated_by" field.

func UpdatedByLT

func UpdatedByLT(v int64) predicate.Policies

UpdatedByLT applies the LT predicate on the "updated_by" field.

func UpdatedByLTE

func UpdatedByLTE(v int64) predicate.Policies

UpdatedByLTE applies the LTE predicate on the "updated_by" field.

func UpdatedByNEQ

func UpdatedByNEQ(v int64) predicate.Policies

UpdatedByNEQ applies the NEQ predicate on the "updated_by" field.

func UpdatedByNotIn

func UpdatedByNotIn(vs ...int64) predicate.Policies

UpdatedByNotIn applies the NotIn predicate on the "updated_by" field.

func UpdatedByNotNil

func UpdatedByNotNil() predicate.Policies

UpdatedByNotNil applies the NotNil predicate on the "updated_by" field.

func ValidColumn

func ValidColumn(column string) bool

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Policies queries.

func ByCode

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

ByCode orders the results by the code field.

func ByCreatedAt

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

ByCreatedAt orders the results by the created_at field.

func ByCreatedBy

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

ByCreatedBy orders the results by the created_by field.

func ByDeletedAt

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

ByDeletedAt orders the results by the deleted_at field.

func ByDescription

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

ByDescription orders the results by the description field.

func ByDisplayName

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

ByDisplayName orders the results by the display_name field.

func ByID

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

ByID orders the results by the id field.

func ByLionRolePolicies

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

ByLionRolePolicies orders the results by lion_role_policies terms.

func ByLionRolePoliciesCount

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

ByLionRolePoliciesCount orders the results by lion_role_policies count.

func ByPolicyStatus

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

ByPolicyStatus orders the results by the policy_status field.

func ByProtected

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

ByProtected orders the results by the protected field.

func ByUpdatedAt

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

ByUpdatedAt orders the results by the updated_at field.

func ByUpdatedBy

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

ByUpdatedBy orders the results by the updated_by field.

Jump to

Keyboard shortcuts

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