Documentation ¶
Index ¶
- Constants
- Variables
- func And(predicates ...predicate.Silence) predicate.Silence
- func Comments(v string) predicate.Silence
- func CommentsContains(v string) predicate.Silence
- func CommentsContainsFold(v string) predicate.Silence
- func CommentsEQ(v string) predicate.Silence
- func CommentsEqualFold(v string) predicate.Silence
- func CommentsGT(v string) predicate.Silence
- func CommentsGTE(v string) predicate.Silence
- func CommentsHasPrefix(v string) predicate.Silence
- func CommentsHasSuffix(v string) predicate.Silence
- func CommentsIn(vs ...string) predicate.Silence
- func CommentsIsNil() predicate.Silence
- func CommentsLT(v string) predicate.Silence
- func CommentsLTE(v string) predicate.Silence
- func CommentsNEQ(v string) predicate.Silence
- func CommentsNotIn(vs ...string) predicate.Silence
- func CommentsNotNil() predicate.Silence
- func CreatedAt(v time.Time) predicate.Silence
- func CreatedAtEQ(v time.Time) predicate.Silence
- func CreatedAtGT(v time.Time) predicate.Silence
- func CreatedAtGTE(v time.Time) predicate.Silence
- func CreatedAtIn(vs ...time.Time) predicate.Silence
- func CreatedAtLT(v time.Time) predicate.Silence
- func CreatedAtLTE(v time.Time) predicate.Silence
- func CreatedAtNEQ(v time.Time) predicate.Silence
- func CreatedAtNotIn(vs ...time.Time) predicate.Silence
- func CreatedBy(v int) predicate.Silence
- func CreatedByEQ(v int) predicate.Silence
- func CreatedByIn(vs ...int) predicate.Silence
- func CreatedByNEQ(v int) predicate.Silence
- func CreatedByNotIn(vs ...int) predicate.Silence
- func EndsAt(v time.Time) predicate.Silence
- func EndsAtEQ(v time.Time) predicate.Silence
- func EndsAtGT(v time.Time) predicate.Silence
- func EndsAtGTE(v time.Time) predicate.Silence
- func EndsAtIn(vs ...time.Time) predicate.Silence
- func EndsAtLT(v time.Time) predicate.Silence
- func EndsAtLTE(v time.Time) predicate.Silence
- func EndsAtNEQ(v time.Time) predicate.Silence
- func EndsAtNotIn(vs ...time.Time) predicate.Silence
- func HasUser() predicate.Silence
- func HasUserWith(preds ...predicate.User) predicate.Silence
- func ID(id int) predicate.Silence
- func IDEQ(id int) predicate.Silence
- func IDGT(id int) predicate.Silence
- func IDGTE(id int) predicate.Silence
- func IDIn(ids ...int) predicate.Silence
- func IDLT(id int) predicate.Silence
- func IDLTE(id int) predicate.Silence
- func IDNEQ(id int) predicate.Silence
- func IDNotIn(ids ...int) predicate.Silence
- func MatchersIsNil() predicate.Silence
- func MatchersNotNil() predicate.Silence
- func Not(p predicate.Silence) predicate.Silence
- func Or(predicates ...predicate.Silence) predicate.Silence
- func StartsAt(v time.Time) predicate.Silence
- func StartsAtEQ(v time.Time) predicate.Silence
- func StartsAtGT(v time.Time) predicate.Silence
- func StartsAtGTE(v time.Time) predicate.Silence
- func StartsAtIn(vs ...time.Time) predicate.Silence
- func StartsAtLT(v time.Time) predicate.Silence
- func StartsAtLTE(v time.Time) predicate.Silence
- func StartsAtNEQ(v time.Time) predicate.Silence
- func StartsAtNotIn(vs ...time.Time) predicate.Silence
- func StateEQ(v alert.SilenceState) predicate.Silence
- func StateIn(vs ...alert.SilenceState) predicate.Silence
- func StateNEQ(v alert.SilenceState) predicate.Silence
- func StateNotIn(vs ...alert.SilenceState) predicate.Silence
- func StateValidator(s alert.SilenceState) error
- func TenantID(v int) predicate.Silence
- func TenantIDEQ(v int) predicate.Silence
- func TenantIDGT(v int) predicate.Silence
- func TenantIDGTE(v int) predicate.Silence
- func TenantIDIn(vs ...int) predicate.Silence
- func TenantIDLT(v int) predicate.Silence
- func TenantIDLTE(v int) predicate.Silence
- func TenantIDNEQ(v int) predicate.Silence
- func TenantIDNotIn(vs ...int) predicate.Silence
- func UpdatedAt(v time.Time) predicate.Silence
- func UpdatedAtEQ(v time.Time) predicate.Silence
- func UpdatedAtGT(v time.Time) predicate.Silence
- func UpdatedAtGTE(v time.Time) predicate.Silence
- func UpdatedAtIn(vs ...time.Time) predicate.Silence
- func UpdatedAtIsNil() predicate.Silence
- func UpdatedAtLT(v time.Time) predicate.Silence
- func UpdatedAtLTE(v time.Time) predicate.Silence
- func UpdatedAtNEQ(v time.Time) predicate.Silence
- func UpdatedAtNotIn(vs ...time.Time) predicate.Silence
- func UpdatedAtNotNil() predicate.Silence
- func UpdatedBy(v int) predicate.Silence
- func UpdatedByEQ(v int) predicate.Silence
- func UpdatedByGT(v int) predicate.Silence
- func UpdatedByGTE(v int) predicate.Silence
- func UpdatedByIn(vs ...int) predicate.Silence
- func UpdatedByIsNil() predicate.Silence
- func UpdatedByLT(v int) predicate.Silence
- func UpdatedByLTE(v int) predicate.Silence
- func UpdatedByNEQ(v int) predicate.Silence
- func UpdatedByNotIn(vs ...int) predicate.Silence
- func UpdatedByNotNil() predicate.Silence
- func ValidColumn(column string) bool
- type OrderOption
- func ByComments(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByCreatedBy(opts ...sql.OrderTermOption) OrderOption
- func ByEndsAt(opts ...sql.OrderTermOption) OrderOption
- func ByID(opts ...sql.OrderTermOption) OrderOption
- func ByStartsAt(opts ...sql.OrderTermOption) OrderOption
- func ByState(opts ...sql.OrderTermOption) OrderOption
- func ByTenantID(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedAt(opts ...sql.OrderTermOption) OrderOption
- func ByUpdatedBy(opts ...sql.OrderTermOption) OrderOption
- func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
Constants ¶
const ( // Label holds the string label denoting the silence type in the database. Label = "silence" // FieldID holds the string denoting the id field in the database. FieldID = "id" // FieldCreatedBy holds the string denoting the created_by field in the database. FieldCreatedBy = "created_by" // FieldCreatedAt holds the string denoting the created_at field in the database. FieldCreatedAt = "created_at" // FieldUpdatedBy holds the string denoting the updated_by field in the database. FieldUpdatedBy = "updated_by" // FieldUpdatedAt holds the string denoting the updated_at field in the database. FieldUpdatedAt = "updated_at" // FieldTenantID holds the string denoting the tenant_id field in the database. FieldTenantID = "tenant_id" // FieldMatchers holds the string denoting the matchers field in the database. FieldMatchers = "matchers" // FieldStartsAt holds the string denoting the starts_at field in the database. FieldStartsAt = "starts_at" // FieldEndsAt holds the string denoting the ends_at field in the database. FieldEndsAt = "ends_at" // FieldComments holds the string denoting the comments field in the database. FieldComments = "comments" // FieldState holds the string denoting the state field in the database. FieldState = "state" // EdgeUser holds the string denoting the user edge name in mutations. EdgeUser = "user" // Table holds the table name of the silence in the database. Table = "msg_silence" // UserTable is the table that holds the user relation/edge. UserTable = "msg_silence" // UserInverseTable is the table name for the User entity. // It exists in this package in order to avoid circular dependency with the "user" package. UserInverseTable = "user" // UserColumn is the table column denoting the user relation/edge. UserColumn = "created_by" )
const DefaultState alert.SilenceState = "active"
Variables ¶
var ( Hooks [3]ent.Hook Interceptors [1]ent.Interceptor // DefaultCreatedAt holds the default value on creation for the "created_at" field. DefaultCreatedAt func() time.Time // DefaultID holds the default value on creation for the "id" field. DefaultID func() int )
Note that the variables below are initialized by the runtime package on the initialization of the application. Therefore, it should be imported in the main as follows:
import _ "github.com/woocoos/msgcenter/ent/runtime"
var Columns = []string{ FieldID, FieldCreatedBy, FieldCreatedAt, FieldUpdatedBy, FieldUpdatedAt, FieldTenantID, FieldMatchers, FieldStartsAt, FieldEndsAt, FieldComments, FieldState, }
Columns holds all SQL columns for silence fields.
Functions ¶
func Comments ¶
Comments applies equality check predicate on the "comments" field. It's identical to CommentsEQ.
func CommentsContains ¶
CommentsContains applies the Contains predicate on the "comments" field.
func CommentsContainsFold ¶
CommentsContainsFold applies the ContainsFold predicate on the "comments" field.
func CommentsEQ ¶
CommentsEQ applies the EQ predicate on the "comments" field.
func CommentsEqualFold ¶
CommentsEqualFold applies the EqualFold predicate on the "comments" field.
func CommentsGT ¶
CommentsGT applies the GT predicate on the "comments" field.
func CommentsGTE ¶
CommentsGTE applies the GTE predicate on the "comments" field.
func CommentsHasPrefix ¶
CommentsHasPrefix applies the HasPrefix predicate on the "comments" field.
func CommentsHasSuffix ¶
CommentsHasSuffix applies the HasSuffix predicate on the "comments" field.
func CommentsIn ¶
CommentsIn applies the In predicate on the "comments" field.
func CommentsIsNil ¶
CommentsIsNil applies the IsNil predicate on the "comments" field.
func CommentsLT ¶
CommentsLT applies the LT predicate on the "comments" field.
func CommentsLTE ¶
CommentsLTE applies the LTE predicate on the "comments" field.
func CommentsNEQ ¶
CommentsNEQ applies the NEQ predicate on the "comments" field.
func CommentsNotIn ¶
CommentsNotIn applies the NotIn predicate on the "comments" field.
func CommentsNotNil ¶
CommentsNotNil applies the NotNil predicate on the "comments" field.
func CreatedAt ¶
CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAtEQ ¶
CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtGT ¶
CreatedAtGT applies the GT predicate on the "created_at" field.
func CreatedAtGTE ¶
CreatedAtGTE applies the GTE predicate on the "created_at" field.
func CreatedAtIn ¶
CreatedAtIn applies the In predicate on the "created_at" field.
func CreatedAtLT ¶
CreatedAtLT applies the LT predicate on the "created_at" field.
func CreatedAtLTE ¶
CreatedAtLTE applies the LTE predicate on the "created_at" field.
func CreatedAtNEQ ¶
CreatedAtNEQ applies the NEQ predicate on the "created_at" field.
func CreatedAtNotIn ¶
CreatedAtNotIn applies the NotIn predicate on the "created_at" field.
func CreatedBy ¶
CreatedBy applies equality check predicate on the "created_by" field. It's identical to CreatedByEQ.
func CreatedByEQ ¶
CreatedByEQ applies the EQ predicate on the "created_by" field.
func CreatedByIn ¶
CreatedByIn applies the In predicate on the "created_by" field.
func CreatedByNEQ ¶
CreatedByNEQ applies the NEQ predicate on the "created_by" field.
func CreatedByNotIn ¶
CreatedByNotIn applies the NotIn predicate on the "created_by" field.
func EndsAt ¶
EndsAt applies equality check predicate on the "ends_at" field. It's identical to EndsAtEQ.
func EndsAtNotIn ¶
EndsAtNotIn applies the NotIn predicate on the "ends_at" field.
func HasUserWith ¶
HasUserWith applies the HasEdge predicate on the "user" edge with a given conditions (other predicates).
func MatchersIsNil ¶
MatchersIsNil applies the IsNil predicate on the "matchers" field.
func MatchersNotNil ¶
MatchersNotNil applies the NotNil predicate on the "matchers" field.
func StartsAt ¶
StartsAt applies equality check predicate on the "starts_at" field. It's identical to StartsAtEQ.
func StartsAtEQ ¶
StartsAtEQ applies the EQ predicate on the "starts_at" field.
func StartsAtGT ¶
StartsAtGT applies the GT predicate on the "starts_at" field.
func StartsAtGTE ¶
StartsAtGTE applies the GTE predicate on the "starts_at" field.
func StartsAtIn ¶
StartsAtIn applies the In predicate on the "starts_at" field.
func StartsAtLT ¶
StartsAtLT applies the LT predicate on the "starts_at" field.
func StartsAtLTE ¶
StartsAtLTE applies the LTE predicate on the "starts_at" field.
func StartsAtNEQ ¶
StartsAtNEQ applies the NEQ predicate on the "starts_at" field.
func StartsAtNotIn ¶
StartsAtNotIn applies the NotIn predicate on the "starts_at" field.
func StateEQ ¶
func StateEQ(v alert.SilenceState) predicate.Silence
StateEQ applies the EQ predicate on the "state" field.
func StateIn ¶
func StateIn(vs ...alert.SilenceState) predicate.Silence
StateIn applies the In predicate on the "state" field.
func StateNEQ ¶
func StateNEQ(v alert.SilenceState) predicate.Silence
StateNEQ applies the NEQ predicate on the "state" field.
func StateNotIn ¶
func StateNotIn(vs ...alert.SilenceState) predicate.Silence
StateNotIn applies the NotIn predicate on the "state" field.
func StateValidator ¶
func StateValidator(s alert.SilenceState) error
StateValidator is a validator for the "state" field enum values. It is called by the builders before save.
func TenantID ¶
TenantID applies equality check predicate on the "tenant_id" field. It's identical to TenantIDEQ.
func TenantIDEQ ¶
TenantIDEQ applies the EQ predicate on the "tenant_id" field.
func TenantIDGT ¶
TenantIDGT applies the GT predicate on the "tenant_id" field.
func TenantIDGTE ¶
TenantIDGTE applies the GTE predicate on the "tenant_id" field.
func TenantIDIn ¶
TenantIDIn applies the In predicate on the "tenant_id" field.
func TenantIDLT ¶
TenantIDLT applies the LT predicate on the "tenant_id" field.
func TenantIDLTE ¶
TenantIDLTE applies the LTE predicate on the "tenant_id" field.
func TenantIDNEQ ¶
TenantIDNEQ applies the NEQ predicate on the "tenant_id" field.
func TenantIDNotIn ¶
TenantIDNotIn applies the NotIn predicate on the "tenant_id" field.
func UpdatedAt ¶
UpdatedAt applies equality check predicate on the "updated_at" field. It's identical to UpdatedAtEQ.
func UpdatedAtEQ ¶
UpdatedAtEQ applies the EQ predicate on the "updated_at" field.
func UpdatedAtGT ¶
UpdatedAtGT applies the GT predicate on the "updated_at" field.
func UpdatedAtGTE ¶
UpdatedAtGTE applies the GTE predicate on the "updated_at" field.
func UpdatedAtIn ¶
UpdatedAtIn applies the In predicate on the "updated_at" field.
func UpdatedAtIsNil ¶
UpdatedAtIsNil applies the IsNil predicate on the "updated_at" field.
func UpdatedAtLT ¶
UpdatedAtLT applies the LT predicate on the "updated_at" field.
func UpdatedAtLTE ¶
UpdatedAtLTE applies the LTE predicate on the "updated_at" field.
func UpdatedAtNEQ ¶
UpdatedAtNEQ applies the NEQ predicate on the "updated_at" field.
func UpdatedAtNotIn ¶
UpdatedAtNotIn applies the NotIn predicate on the "updated_at" field.
func UpdatedAtNotNil ¶
UpdatedAtNotNil applies the NotNil predicate on the "updated_at" field.
func UpdatedBy ¶
UpdatedBy applies equality check predicate on the "updated_by" field. It's identical to UpdatedByEQ.
func UpdatedByEQ ¶
UpdatedByEQ applies the EQ predicate on the "updated_by" field.
func UpdatedByGT ¶
UpdatedByGT applies the GT predicate on the "updated_by" field.
func UpdatedByGTE ¶
UpdatedByGTE applies the GTE predicate on the "updated_by" field.
func UpdatedByIn ¶
UpdatedByIn applies the In predicate on the "updated_by" field.
func UpdatedByIsNil ¶
UpdatedByIsNil applies the IsNil predicate on the "updated_by" field.
func UpdatedByLT ¶
UpdatedByLT applies the LT predicate on the "updated_by" field.
func UpdatedByLTE ¶
UpdatedByLTE applies the LTE predicate on the "updated_by" field.
func UpdatedByNEQ ¶
UpdatedByNEQ applies the NEQ predicate on the "updated_by" field.
func UpdatedByNotIn ¶
UpdatedByNotIn applies the NotIn predicate on the "updated_by" field.
func UpdatedByNotNil ¶
UpdatedByNotNil applies the NotNil predicate on the "updated_by" field.
func ValidColumn ¶
ValidColumn reports if the column name is valid (part of the table columns).
Types ¶
type OrderOption ¶
OrderOption defines the ordering options for the Silence queries.
func ByComments ¶
func ByComments(opts ...sql.OrderTermOption) OrderOption
ByComments orders the results by the comments 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 ByEndsAt ¶
func ByEndsAt(opts ...sql.OrderTermOption) OrderOption
ByEndsAt orders the results by the ends_at field.
func ByID ¶
func ByID(opts ...sql.OrderTermOption) OrderOption
ByID orders the results by the id field.
func ByStartsAt ¶
func ByStartsAt(opts ...sql.OrderTermOption) OrderOption
ByStartsAt orders the results by the starts_at field.
func ByState ¶
func ByState(opts ...sql.OrderTermOption) OrderOption
ByState orders the results by the state field.
func ByTenantID ¶
func ByTenantID(opts ...sql.OrderTermOption) OrderOption
ByTenantID orders the results by the tenant_id 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.
func ByUserField ¶
func ByUserField(field string, opts ...sql.OrderTermOption) OrderOption
ByUserField orders the results by user field.