ent

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Operation types.
	OpCreate    = ent.OpCreate
	OpDelete    = ent.OpDelete
	OpDeleteOne = ent.OpDeleteOne
	OpUpdate    = ent.OpUpdate
	OpUpdateOne = ent.OpUpdateOne

	// Node types.
	TypeChatUser             = "ChatUser"
	TypeDeployment           = "Deployment"
	TypeDeploymentStatistics = "DeploymentStatistics"
	TypeDeploymentStatus     = "DeploymentStatus"
	TypeEvent                = "Event"
	TypeLock                 = "Lock"
	TypeNotificationRecord   = "NotificationRecord"
	TypePerm                 = "Perm"
	TypeRepo                 = "Repo"
	TypeReview               = "Review"
	TypeUser                 = "User"
)

Variables

This section is empty.

Functions

func IsConstraintError

func IsConstraintError(err error) bool

IsConstraintError returns a boolean indicating whether the error is a constraint failure.

func IsNotFound

func IsNotFound(err error) bool

IsNotFound returns a boolean indicating whether the error is a not found error.

func IsNotLoaded

func IsNotLoaded(err error) bool

IsNotLoaded returns a boolean indicating whether the error is a not loaded error.

func IsNotSingular

func IsNotSingular(err error) bool

IsNotSingular returns a boolean indicating whether the error is a not singular error.

func IsValidationError

func IsValidationError(err error) bool

IsValidationError returns a boolean indicating whether the error is a validation error.

func MaskNotFound

func MaskNotFound(err error) error

MaskNotFound masks not found error.

func NewContext

func NewContext(parent context.Context, c *Client) context.Context

NewContext returns a new context with the given Client attached.

func NewTxContext

func NewTxContext(parent context.Context, tx *Tx) context.Context

NewTxContext returns a new context with the given Tx attached.

Types

type AggregateFunc

type AggregateFunc func(*sql.Selector) string

AggregateFunc applies an aggregation step on the group-by traversal/selector.

func As

As is a pseudo aggregation function for renaming another other functions with custom names. For example:

GroupBy(field1, field2).
Aggregate(ent.As(ent.Sum(field1), "sum_field1"), (ent.As(ent.Sum(field2), "sum_field2")).
Scan(ctx, &v)

func Count

func Count() AggregateFunc

Count applies the "count" aggregation function on each group.

func Max

func Max(field string) AggregateFunc

Max applies the "max" aggregation function on the given field of each group.

func Mean

func Mean(field string) AggregateFunc

Mean applies the "mean" aggregation function on the given field of each group.

func Min

func Min(field string) AggregateFunc

Min applies the "min" aggregation function on the given field of each group.

func Sum

func Sum(field string) AggregateFunc

Sum applies the "sum" aggregation function on the given field of each group.

type ChatUser

type ChatUser struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Token holds the value of the "token" field.
	Token string `json:"-"`
	// Refresh holds the value of the "refresh" field.
	Refresh string `json:"-"`
	// Expiry holds the value of the "expiry" field.
	Expiry time.Time `json:"expiry"`
	// BotToken holds the value of the "bot_token" field.
	BotToken string `json:"-"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at"`
	// UserID holds the value of the "user_id" field.
	UserID int64 `json:"user_id"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ChatUserQuery when eager-loading is set.
	Edges ChatUserEdges `json:"edges"`
	// contains filtered or unexported fields
}

ChatUser is the model entity for the ChatUser schema.

func (*ChatUser) QueryUser

func (cu *ChatUser) QueryUser() *UserQuery

QueryUser queries the "user" edge of the ChatUser entity.

func (*ChatUser) String

func (cu *ChatUser) String() string

String implements the fmt.Stringer.

func (*ChatUser) Unwrap

func (cu *ChatUser) Unwrap() *ChatUser

Unwrap unwraps the ChatUser entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*ChatUser) Update

func (cu *ChatUser) Update() *ChatUserUpdateOne

Update returns a builder for updating this ChatUser. Note that you need to call ChatUser.Unwrap() before calling this method if this ChatUser was returned from a transaction, and the transaction was committed or rolled back.

type ChatUserClient

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

ChatUserClient is a client for the ChatUser schema.

func NewChatUserClient

func NewChatUserClient(c config) *ChatUserClient

NewChatUserClient returns a client for the ChatUser from the given config.

func (*ChatUserClient) Create

func (c *ChatUserClient) Create() *ChatUserCreate

Create returns a create builder for ChatUser.

func (*ChatUserClient) CreateBulk

func (c *ChatUserClient) CreateBulk(builders ...*ChatUserCreate) *ChatUserCreateBulk

CreateBulk returns a builder for creating a bulk of ChatUser entities.

func (*ChatUserClient) Delete

func (c *ChatUserClient) Delete() *ChatUserDelete

Delete returns a delete builder for ChatUser.

func (*ChatUserClient) DeleteOne

func (c *ChatUserClient) DeleteOne(cu *ChatUser) *ChatUserDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ChatUserClient) DeleteOneID

func (c *ChatUserClient) DeleteOneID(id string) *ChatUserDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*ChatUserClient) Get

func (c *ChatUserClient) Get(ctx context.Context, id string) (*ChatUser, error)

Get returns a ChatUser entity by its id.

func (*ChatUserClient) GetX

func (c *ChatUserClient) GetX(ctx context.Context, id string) *ChatUser

GetX is like Get, but panics if an error occurs.

func (*ChatUserClient) Hooks

func (c *ChatUserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ChatUserClient) Query

func (c *ChatUserClient) Query() *ChatUserQuery

Query returns a query builder for ChatUser.

func (*ChatUserClient) QueryUser

func (c *ChatUserClient) QueryUser(cu *ChatUser) *UserQuery

QueryUser queries the user edge of a ChatUser.

func (*ChatUserClient) Update

func (c *ChatUserClient) Update() *ChatUserUpdate

Update returns an update builder for ChatUser.

func (*ChatUserClient) UpdateOne

func (c *ChatUserClient) UpdateOne(cu *ChatUser) *ChatUserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ChatUserClient) UpdateOneID

func (c *ChatUserClient) UpdateOneID(id string) *ChatUserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ChatUserClient) Use

func (c *ChatUserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `chatuser.Hooks(f(g(h())))`.

type ChatUserCreate

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

ChatUserCreate is the builder for creating a ChatUser entity.

func (*ChatUserCreate) Exec

func (cuc *ChatUserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ChatUserCreate) ExecX

func (cuc *ChatUserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ChatUserCreate) Mutation

func (cuc *ChatUserCreate) Mutation() *ChatUserMutation

Mutation returns the ChatUserMutation object of the builder.

func (*ChatUserCreate) Save

func (cuc *ChatUserCreate) Save(ctx context.Context) (*ChatUser, error)

Save creates the ChatUser in the database.

func (*ChatUserCreate) SaveX

func (cuc *ChatUserCreate) SaveX(ctx context.Context) *ChatUser

SaveX calls Save and panics if Save returns an error.

func (*ChatUserCreate) SetBotToken

func (cuc *ChatUserCreate) SetBotToken(s string) *ChatUserCreate

SetBotToken sets the "bot_token" field.

func (*ChatUserCreate) SetCreatedAt

func (cuc *ChatUserCreate) SetCreatedAt(t time.Time) *ChatUserCreate

SetCreatedAt sets the "created_at" field.

func (*ChatUserCreate) SetExpiry

func (cuc *ChatUserCreate) SetExpiry(t time.Time) *ChatUserCreate

SetExpiry sets the "expiry" field.

func (*ChatUserCreate) SetID

func (cuc *ChatUserCreate) SetID(s string) *ChatUserCreate

SetID sets the "id" field.

func (*ChatUserCreate) SetNillableCreatedAt

func (cuc *ChatUserCreate) SetNillableCreatedAt(t *time.Time) *ChatUserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ChatUserCreate) SetNillableUpdatedAt

func (cuc *ChatUserCreate) SetNillableUpdatedAt(t *time.Time) *ChatUserCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ChatUserCreate) SetRefresh

func (cuc *ChatUserCreate) SetRefresh(s string) *ChatUserCreate

SetRefresh sets the "refresh" field.

func (*ChatUserCreate) SetToken

func (cuc *ChatUserCreate) SetToken(s string) *ChatUserCreate

SetToken sets the "token" field.

func (*ChatUserCreate) SetUpdatedAt

func (cuc *ChatUserCreate) SetUpdatedAt(t time.Time) *ChatUserCreate

SetUpdatedAt sets the "updated_at" field.

func (*ChatUserCreate) SetUser

func (cuc *ChatUserCreate) SetUser(u *User) *ChatUserCreate

SetUser sets the "user" edge to the User entity.

func (*ChatUserCreate) SetUserID

func (cuc *ChatUserCreate) SetUserID(i int64) *ChatUserCreate

SetUserID sets the "user_id" field.

type ChatUserCreateBulk

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

ChatUserCreateBulk is the builder for creating many ChatUser entities in bulk.

func (*ChatUserCreateBulk) Exec

func (cucb *ChatUserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ChatUserCreateBulk) ExecX

func (cucb *ChatUserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ChatUserCreateBulk) Save

func (cucb *ChatUserCreateBulk) Save(ctx context.Context) ([]*ChatUser, error)

Save creates the ChatUser entities in the database.

func (*ChatUserCreateBulk) SaveX

func (cucb *ChatUserCreateBulk) SaveX(ctx context.Context) []*ChatUser

SaveX is like Save, but panics if an error occurs.

type ChatUserDelete

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

ChatUserDelete is the builder for deleting a ChatUser entity.

func (*ChatUserDelete) Exec

func (cud *ChatUserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ChatUserDelete) ExecX

func (cud *ChatUserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ChatUserDelete) Where

func (cud *ChatUserDelete) Where(ps ...predicate.ChatUser) *ChatUserDelete

Where appends a list predicates to the ChatUserDelete builder.

type ChatUserDeleteOne

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

ChatUserDeleteOne is the builder for deleting a single ChatUser entity.

func (*ChatUserDeleteOne) Exec

func (cudo *ChatUserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ChatUserDeleteOne) ExecX

func (cudo *ChatUserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type ChatUserEdges

type ChatUserEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// contains filtered or unexported fields
}

ChatUserEdges holds the relations/edges for other nodes in the graph.

func (ChatUserEdges) UserOrErr

func (e ChatUserEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ChatUserGroupBy

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

ChatUserGroupBy is the group-by builder for ChatUser entities.

func (*ChatUserGroupBy) Aggregate

func (cugb *ChatUserGroupBy) Aggregate(fns ...AggregateFunc) *ChatUserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ChatUserGroupBy) Bool

func (cugb *ChatUserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ChatUserGroupBy) BoolX

func (cugb *ChatUserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ChatUserGroupBy) Bools

func (cugb *ChatUserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*ChatUserGroupBy) BoolsX

func (cugb *ChatUserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ChatUserGroupBy) Float64

func (cugb *ChatUserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ChatUserGroupBy) Float64X

func (cugb *ChatUserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ChatUserGroupBy) Float64s

func (cugb *ChatUserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*ChatUserGroupBy) Float64sX

func (cugb *ChatUserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ChatUserGroupBy) Int

func (cugb *ChatUserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ChatUserGroupBy) IntX

func (cugb *ChatUserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ChatUserGroupBy) Ints

func (cugb *ChatUserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*ChatUserGroupBy) IntsX

func (cugb *ChatUserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ChatUserGroupBy) Scan

func (cugb *ChatUserGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*ChatUserGroupBy) ScanX

func (cugb *ChatUserGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ChatUserGroupBy) String

func (cugb *ChatUserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ChatUserGroupBy) StringX

func (cugb *ChatUserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ChatUserGroupBy) Strings

func (cugb *ChatUserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*ChatUserGroupBy) StringsX

func (cugb *ChatUserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ChatUserMutation

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

ChatUserMutation represents an operation that mutates the ChatUser nodes in the graph.

func (*ChatUserMutation) AddField

func (m *ChatUserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ChatUserMutation) AddedEdges

func (m *ChatUserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ChatUserMutation) AddedField

func (m *ChatUserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ChatUserMutation) AddedFields

func (m *ChatUserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ChatUserMutation) AddedIDs

func (m *ChatUserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ChatUserMutation) BotToken

func (m *ChatUserMutation) BotToken() (r string, exists bool)

BotToken returns the value of the "bot_token" field in the mutation.

func (*ChatUserMutation) ClearEdge

func (m *ChatUserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ChatUserMutation) ClearField

func (m *ChatUserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ChatUserMutation) ClearUser

func (m *ChatUserMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*ChatUserMutation) ClearedEdges

func (m *ChatUserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ChatUserMutation) ClearedFields

func (m *ChatUserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ChatUserMutation) Client

func (m ChatUserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ChatUserMutation) CreatedAt

func (m *ChatUserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ChatUserMutation) EdgeCleared

func (m *ChatUserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ChatUserMutation) Expiry

func (m *ChatUserMutation) Expiry() (r time.Time, exists bool)

Expiry returns the value of the "expiry" field in the mutation.

func (*ChatUserMutation) Field

func (m *ChatUserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ChatUserMutation) FieldCleared

func (m *ChatUserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ChatUserMutation) Fields

func (m *ChatUserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ChatUserMutation) ID

func (m *ChatUserMutation) ID() (id string, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ChatUserMutation) IDs

func (m *ChatUserMutation) IDs(ctx context.Context) ([]string, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ChatUserMutation) OldBotToken

func (m *ChatUserMutation) OldBotToken(ctx context.Context) (v string, err error)

OldBotToken returns the old "bot_token" field's value of the ChatUser entity. If the ChatUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChatUserMutation) OldCreatedAt

func (m *ChatUserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the ChatUser entity. If the ChatUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChatUserMutation) OldExpiry

func (m *ChatUserMutation) OldExpiry(ctx context.Context) (v time.Time, err error)

OldExpiry returns the old "expiry" field's value of the ChatUser entity. If the ChatUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChatUserMutation) OldField

func (m *ChatUserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ChatUserMutation) OldRefresh

func (m *ChatUserMutation) OldRefresh(ctx context.Context) (v string, err error)

OldRefresh returns the old "refresh" field's value of the ChatUser entity. If the ChatUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChatUserMutation) OldToken

func (m *ChatUserMutation) OldToken(ctx context.Context) (v string, err error)

OldToken returns the old "token" field's value of the ChatUser entity. If the ChatUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChatUserMutation) OldUpdatedAt

func (m *ChatUserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the ChatUser entity. If the ChatUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChatUserMutation) OldUserID

func (m *ChatUserMutation) OldUserID(ctx context.Context) (v int64, err error)

OldUserID returns the old "user_id" field's value of the ChatUser entity. If the ChatUser object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ChatUserMutation) Op

func (m *ChatUserMutation) Op() Op

Op returns the operation name.

func (*ChatUserMutation) Refresh

func (m *ChatUserMutation) Refresh() (r string, exists bool)

Refresh returns the value of the "refresh" field in the mutation.

func (*ChatUserMutation) RemovedEdges

func (m *ChatUserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ChatUserMutation) RemovedIDs

func (m *ChatUserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ChatUserMutation) ResetBotToken

func (m *ChatUserMutation) ResetBotToken()

ResetBotToken resets all changes to the "bot_token" field.

func (*ChatUserMutation) ResetCreatedAt

func (m *ChatUserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ChatUserMutation) ResetEdge

func (m *ChatUserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ChatUserMutation) ResetExpiry

func (m *ChatUserMutation) ResetExpiry()

ResetExpiry resets all changes to the "expiry" field.

func (*ChatUserMutation) ResetField

func (m *ChatUserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ChatUserMutation) ResetRefresh

func (m *ChatUserMutation) ResetRefresh()

ResetRefresh resets all changes to the "refresh" field.

func (*ChatUserMutation) ResetToken

func (m *ChatUserMutation) ResetToken()

ResetToken resets all changes to the "token" field.

func (*ChatUserMutation) ResetUpdatedAt

func (m *ChatUserMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ChatUserMutation) ResetUser

func (m *ChatUserMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*ChatUserMutation) ResetUserID

func (m *ChatUserMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*ChatUserMutation) SetBotToken

func (m *ChatUserMutation) SetBotToken(s string)

SetBotToken sets the "bot_token" field.

func (*ChatUserMutation) SetCreatedAt

func (m *ChatUserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ChatUserMutation) SetExpiry

func (m *ChatUserMutation) SetExpiry(t time.Time)

SetExpiry sets the "expiry" field.

func (*ChatUserMutation) SetField

func (m *ChatUserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ChatUserMutation) SetID

func (m *ChatUserMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of ChatUser entities.

func (*ChatUserMutation) SetRefresh

func (m *ChatUserMutation) SetRefresh(s string)

SetRefresh sets the "refresh" field.

func (*ChatUserMutation) SetToken

func (m *ChatUserMutation) SetToken(s string)

SetToken sets the "token" field.

func (*ChatUserMutation) SetUpdatedAt

func (m *ChatUserMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*ChatUserMutation) SetUserID

func (m *ChatUserMutation) SetUserID(i int64)

SetUserID sets the "user_id" field.

func (*ChatUserMutation) Token

func (m *ChatUserMutation) Token() (r string, exists bool)

Token returns the value of the "token" field in the mutation.

func (ChatUserMutation) Tx

func (m ChatUserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ChatUserMutation) Type

func (m *ChatUserMutation) Type() string

Type returns the node type of this mutation (ChatUser).

func (*ChatUserMutation) UpdatedAt

func (m *ChatUserMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ChatUserMutation) UserCleared

func (m *ChatUserMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*ChatUserMutation) UserID

func (m *ChatUserMutation) UserID() (r int64, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*ChatUserMutation) UserIDs

func (m *ChatUserMutation) UserIDs() (ids []int64)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*ChatUserMutation) Where

func (m *ChatUserMutation) Where(ps ...predicate.ChatUser)

Where appends a list predicates to the ChatUserMutation builder.

type ChatUserQuery

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

ChatUserQuery is the builder for querying ChatUser entities.

func (*ChatUserQuery) All

func (cuq *ChatUserQuery) All(ctx context.Context) ([]*ChatUser, error)

All executes the query and returns a list of ChatUsers.

func (*ChatUserQuery) AllX

func (cuq *ChatUserQuery) AllX(ctx context.Context) []*ChatUser

AllX is like All, but panics if an error occurs.

func (*ChatUserQuery) Clone

func (cuq *ChatUserQuery) Clone() *ChatUserQuery

Clone returns a duplicate of the ChatUserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ChatUserQuery) Count

func (cuq *ChatUserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ChatUserQuery) CountX

func (cuq *ChatUserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ChatUserQuery) Exist

func (cuq *ChatUserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ChatUserQuery) ExistX

func (cuq *ChatUserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ChatUserQuery) First

func (cuq *ChatUserQuery) First(ctx context.Context) (*ChatUser, error)

First returns the first ChatUser entity from the query. Returns a *NotFoundError when no ChatUser was found.

func (*ChatUserQuery) FirstID

func (cuq *ChatUserQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first ChatUser ID from the query. Returns a *NotFoundError when no ChatUser ID was found.

func (*ChatUserQuery) FirstIDX

func (cuq *ChatUserQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*ChatUserQuery) FirstX

func (cuq *ChatUserQuery) FirstX(ctx context.Context) *ChatUser

FirstX is like First, but panics if an error occurs.

func (*ChatUserQuery) ForShare

func (cuq *ChatUserQuery) ForShare(opts ...sql.LockOption) *ChatUserQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*ChatUserQuery) ForUpdate

func (cuq *ChatUserQuery) ForUpdate(opts ...sql.LockOption) *ChatUserQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*ChatUserQuery) GroupBy

func (cuq *ChatUserQuery) GroupBy(field string, fields ...string) *ChatUserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Token string `json:"token"`
	Count int `json:"count,omitempty"`
}

client.ChatUser.Query().
	GroupBy(chatuser.FieldToken).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ChatUserQuery) IDs

func (cuq *ChatUserQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of ChatUser IDs.

func (*ChatUserQuery) IDsX

func (cuq *ChatUserQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*ChatUserQuery) Limit

func (cuq *ChatUserQuery) Limit(limit int) *ChatUserQuery

Limit adds a limit step to the query.

func (*ChatUserQuery) Offset

func (cuq *ChatUserQuery) Offset(offset int) *ChatUserQuery

Offset adds an offset step to the query.

func (*ChatUserQuery) Only

func (cuq *ChatUserQuery) Only(ctx context.Context) (*ChatUser, error)

Only returns a single ChatUser entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one ChatUser entity is found. Returns a *NotFoundError when no ChatUser entities are found.

func (*ChatUserQuery) OnlyID

func (cuq *ChatUserQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only ChatUser ID in the query. Returns a *NotSingularError when more than one ChatUser ID is found. Returns a *NotFoundError when no entities are found.

func (*ChatUserQuery) OnlyIDX

func (cuq *ChatUserQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ChatUserQuery) OnlyX

func (cuq *ChatUserQuery) OnlyX(ctx context.Context) *ChatUser

OnlyX is like Only, but panics if an error occurs.

func (*ChatUserQuery) Order

func (cuq *ChatUserQuery) Order(o ...OrderFunc) *ChatUserQuery

Order adds an order step to the query.

func (*ChatUserQuery) QueryUser

func (cuq *ChatUserQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*ChatUserQuery) Select

func (cuq *ChatUserQuery) Select(fields ...string) *ChatUserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Token string `json:"token"`
}

client.ChatUser.Query().
	Select(chatuser.FieldToken).
	Scan(ctx, &v)

func (*ChatUserQuery) Unique

func (cuq *ChatUserQuery) Unique(unique bool) *ChatUserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ChatUserQuery) Where

func (cuq *ChatUserQuery) Where(ps ...predicate.ChatUser) *ChatUserQuery

Where adds a new predicate for the ChatUserQuery builder.

func (*ChatUserQuery) WithUser

func (cuq *ChatUserQuery) WithUser(opts ...func(*UserQuery)) *ChatUserQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type ChatUserSelect

type ChatUserSelect struct {
	*ChatUserQuery
	// contains filtered or unexported fields
}

ChatUserSelect is the builder for selecting fields of ChatUser entities.

func (*ChatUserSelect) Bool

func (cus *ChatUserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ChatUserSelect) BoolX

func (cus *ChatUserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ChatUserSelect) Bools

func (cus *ChatUserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ChatUserSelect) BoolsX

func (cus *ChatUserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ChatUserSelect) Float64

func (cus *ChatUserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ChatUserSelect) Float64X

func (cus *ChatUserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ChatUserSelect) Float64s

func (cus *ChatUserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ChatUserSelect) Float64sX

func (cus *ChatUserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ChatUserSelect) Int

func (cus *ChatUserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ChatUserSelect) IntX

func (cus *ChatUserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ChatUserSelect) Ints

func (cus *ChatUserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ChatUserSelect) IntsX

func (cus *ChatUserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ChatUserSelect) Scan

func (cus *ChatUserSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*ChatUserSelect) ScanX

func (cus *ChatUserSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ChatUserSelect) String

func (cus *ChatUserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ChatUserSelect) StringX

func (cus *ChatUserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ChatUserSelect) Strings

func (cus *ChatUserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ChatUserSelect) StringsX

func (cus *ChatUserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ChatUserUpdate

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

ChatUserUpdate is the builder for updating ChatUser entities.

func (*ChatUserUpdate) ClearUser

func (cuu *ChatUserUpdate) ClearUser() *ChatUserUpdate

ClearUser clears the "user" edge to the User entity.

func (*ChatUserUpdate) Exec

func (cuu *ChatUserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ChatUserUpdate) ExecX

func (cuu *ChatUserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ChatUserUpdate) Mutation

func (cuu *ChatUserUpdate) Mutation() *ChatUserMutation

Mutation returns the ChatUserMutation object of the builder.

func (*ChatUserUpdate) Save

func (cuu *ChatUserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ChatUserUpdate) SaveX

func (cuu *ChatUserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ChatUserUpdate) SetBotToken

func (cuu *ChatUserUpdate) SetBotToken(s string) *ChatUserUpdate

SetBotToken sets the "bot_token" field.

func (*ChatUserUpdate) SetCreatedAt

func (cuu *ChatUserUpdate) SetCreatedAt(t time.Time) *ChatUserUpdate

SetCreatedAt sets the "created_at" field.

func (*ChatUserUpdate) SetExpiry

func (cuu *ChatUserUpdate) SetExpiry(t time.Time) *ChatUserUpdate

SetExpiry sets the "expiry" field.

func (*ChatUserUpdate) SetNillableCreatedAt

func (cuu *ChatUserUpdate) SetNillableCreatedAt(t *time.Time) *ChatUserUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ChatUserUpdate) SetRefresh

func (cuu *ChatUserUpdate) SetRefresh(s string) *ChatUserUpdate

SetRefresh sets the "refresh" field.

func (*ChatUserUpdate) SetToken

func (cuu *ChatUserUpdate) SetToken(s string) *ChatUserUpdate

SetToken sets the "token" field.

func (*ChatUserUpdate) SetUpdatedAt

func (cuu *ChatUserUpdate) SetUpdatedAt(t time.Time) *ChatUserUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ChatUserUpdate) SetUser

func (cuu *ChatUserUpdate) SetUser(u *User) *ChatUserUpdate

SetUser sets the "user" edge to the User entity.

func (*ChatUserUpdate) SetUserID

func (cuu *ChatUserUpdate) SetUserID(i int64) *ChatUserUpdate

SetUserID sets the "user_id" field.

func (*ChatUserUpdate) Where

func (cuu *ChatUserUpdate) Where(ps ...predicate.ChatUser) *ChatUserUpdate

Where appends a list predicates to the ChatUserUpdate builder.

type ChatUserUpdateOne

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

ChatUserUpdateOne is the builder for updating a single ChatUser entity.

func (*ChatUserUpdateOne) ClearUser

func (cuuo *ChatUserUpdateOne) ClearUser() *ChatUserUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*ChatUserUpdateOne) Exec

func (cuuo *ChatUserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ChatUserUpdateOne) ExecX

func (cuuo *ChatUserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ChatUserUpdateOne) Mutation

func (cuuo *ChatUserUpdateOne) Mutation() *ChatUserMutation

Mutation returns the ChatUserMutation object of the builder.

func (*ChatUserUpdateOne) Save

func (cuuo *ChatUserUpdateOne) Save(ctx context.Context) (*ChatUser, error)

Save executes the query and returns the updated ChatUser entity.

func (*ChatUserUpdateOne) SaveX

func (cuuo *ChatUserUpdateOne) SaveX(ctx context.Context) *ChatUser

SaveX is like Save, but panics if an error occurs.

func (*ChatUserUpdateOne) Select

func (cuuo *ChatUserUpdateOne) Select(field string, fields ...string) *ChatUserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ChatUserUpdateOne) SetBotToken

func (cuuo *ChatUserUpdateOne) SetBotToken(s string) *ChatUserUpdateOne

SetBotToken sets the "bot_token" field.

func (*ChatUserUpdateOne) SetCreatedAt

func (cuuo *ChatUserUpdateOne) SetCreatedAt(t time.Time) *ChatUserUpdateOne

SetCreatedAt sets the "created_at" field.

func (*ChatUserUpdateOne) SetExpiry

func (cuuo *ChatUserUpdateOne) SetExpiry(t time.Time) *ChatUserUpdateOne

SetExpiry sets the "expiry" field.

func (*ChatUserUpdateOne) SetNillableCreatedAt

func (cuuo *ChatUserUpdateOne) SetNillableCreatedAt(t *time.Time) *ChatUserUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ChatUserUpdateOne) SetRefresh

func (cuuo *ChatUserUpdateOne) SetRefresh(s string) *ChatUserUpdateOne

SetRefresh sets the "refresh" field.

func (*ChatUserUpdateOne) SetToken

func (cuuo *ChatUserUpdateOne) SetToken(s string) *ChatUserUpdateOne

SetToken sets the "token" field.

func (*ChatUserUpdateOne) SetUpdatedAt

func (cuuo *ChatUserUpdateOne) SetUpdatedAt(t time.Time) *ChatUserUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*ChatUserUpdateOne) SetUser

func (cuuo *ChatUserUpdateOne) SetUser(u *User) *ChatUserUpdateOne

SetUser sets the "user" edge to the User entity.

func (*ChatUserUpdateOne) SetUserID

func (cuuo *ChatUserUpdateOne) SetUserID(i int64) *ChatUserUpdateOne

SetUserID sets the "user_id" field.

type ChatUsers

type ChatUsers []*ChatUser

ChatUsers is a parsable slice of ChatUser.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// ChatUser is the client for interacting with the ChatUser builders.
	ChatUser *ChatUserClient
	// Deployment is the client for interacting with the Deployment builders.
	Deployment *DeploymentClient
	// DeploymentStatistics is the client for interacting with the DeploymentStatistics builders.
	DeploymentStatistics *DeploymentStatisticsClient
	// DeploymentStatus is the client for interacting with the DeploymentStatus builders.
	DeploymentStatus *DeploymentStatusClient
	// Event is the client for interacting with the Event builders.
	Event *EventClient
	// Lock is the client for interacting with the Lock builders.
	Lock *LockClient
	// NotificationRecord is the client for interacting with the NotificationRecord builders.
	NotificationRecord *NotificationRecordClient
	// Perm is the client for interacting with the Perm builders.
	Perm *PermClient
	// Repo is the client for interacting with the Repo builders.
	Repo *RepoClient
	// Review is the client for interacting with the Review builders.
	Review *ReviewClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// contains filtered or unexported fields
}

Client is the client that holds all ent builders.

func FromContext

func FromContext(ctx context.Context) *Client

FromContext returns a Client stored inside a context, or nil if there isn't one.

func NewClient

func NewClient(opts ...Option) *Client

NewClient creates a new client configured with the given options.

func Open

func Open(driverName, dataSourceName string, options ...Option) (*Client, error)

Open opens a database/sql.DB specified by the driver name and the data source name, and returns a new client attached to it. Optional parameters can be added for configuring the client.

func (*Client) BeginTx

func (c *Client) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

BeginTx returns a transactional client with specified options.

func (*Client) Close

func (c *Client) Close() error

Close closes the database connection and prevents new queries from starting.

func (*Client) Debug

func (c *Client) Debug() *Client

Debug returns a new debug-client. It's used to get verbose logging on specific operations.

client.Debug().
	ChatUser.
	Query().
	Count(ctx)

func (*Client) GetDriverDialect

func (c *Client) GetDriverDialect() string

func (*Client) Tx

func (c *Client) Tx(ctx context.Context) (*Tx, error)

Tx returns a new transactional client. The provided context is used until the transaction is committed or rolled back.

func (*Client) Use

func (c *Client) Use(hooks ...Hook)

Use adds the mutation hooks to all the entity clients. In order to add hooks to a specific client, call: `client.Node.Use(...)`.

type CommitFunc

type CommitFunc func(context.Context, *Tx) error

The CommitFunc type is an adapter to allow the use of ordinary function as a Committer. If f is a function with the appropriate signature, CommitFunc(f) is a Committer that calls f.

func (CommitFunc) Commit

func (f CommitFunc) Commit(ctx context.Context, tx *Tx) error

Commit calls f(ctx, m).

type CommitHook

type CommitHook func(Committer) Committer

CommitHook defines the "commit middleware". A function that gets a Committer and returns a Committer. For example:

hook := func(next ent.Committer) ent.Committer {
	return ent.CommitFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Commit(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Committer

type Committer interface {
	Commit(context.Context, *Tx) error
}

Committer is the interface that wraps the Commit method.

type ConstraintError

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

ConstraintError returns when trying to create/update one or more entities and one or more of their constraints failed. For example, violation of edge or field uniqueness.

func (ConstraintError) Error

func (e ConstraintError) Error() string

Error implements the error interface.

func (*ConstraintError) Unwrap

func (e *ConstraintError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Deployment

type Deployment struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Number holds the value of the "number" field.
	Number int `json:"number"`
	// Type holds the value of the "type" field.
	Type deployment.Type `json:"type"`
	// Env holds the value of the "env" field.
	Env string `json:"env"`
	// Ref holds the value of the "ref" field.
	Ref string `json:"ref"`
	// DynamicPayload holds the value of the "dynamic_payload" field.
	DynamicPayload map[string]interface{} `json:"dynamic_payload,omitemtpy"`
	// Status holds the value of the "status" field.
	Status deployment.Status `json:"status"`
	// UID holds the value of the "uid" field.
	UID int64 `json:"uid,omitemtpy"`
	// Sha holds the value of the "sha" field.
	Sha string `json:"sha,omitemtpy"`
	// HTMLURL holds the value of the "html_url" field.
	HTMLURL string `json:"html_url,omitemtpy"`
	// ProductionEnvironment holds the value of the "production_environment" field.
	ProductionEnvironment bool `json:"production_environment"`
	// IsRollback holds the value of the "is_rollback" field.
	IsRollback bool `json:"is_rollback"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at"`
	// UserID holds the value of the "user_id" field.
	UserID int64 `json:"user_id,omitemtpy"`
	// RepoID holds the value of the "repo_id" field.
	RepoID int64 `json:"repo_id"`
	// IsApprovalEnabled holds the value of the "is_approval_enabled" field.
	IsApprovalEnabled *bool `json:"is_approval_enabled,omitemtpy"`
	// RequiredApprovalCount holds the value of the "required_approval_count" field.
	RequiredApprovalCount *int `json:"required_approval_count,omitemtpy"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DeploymentQuery when eager-loading is set.
	Edges DeploymentEdges `json:"edges"`
	// contains filtered or unexported fields
}

Deployment is the model entity for the Deployment schema.

func (*Deployment) GetShortRef

func (d *Deployment) GetShortRef() string

func (*Deployment) QueryDeploymentStatuses

func (d *Deployment) QueryDeploymentStatuses() *DeploymentStatusQuery

QueryDeploymentStatuses queries the "deployment_statuses" edge of the Deployment entity.

func (*Deployment) QueryRepo

func (d *Deployment) QueryRepo() *RepoQuery

QueryRepo queries the "repo" edge of the Deployment entity.

func (*Deployment) QueryReviews

func (d *Deployment) QueryReviews() *ReviewQuery

QueryReviews queries the "reviews" edge of the Deployment entity.

func (*Deployment) QueryUser

func (d *Deployment) QueryUser() *UserQuery

QueryUser queries the "user" edge of the Deployment entity.

func (*Deployment) String

func (d *Deployment) String() string

String implements the fmt.Stringer.

func (*Deployment) Unwrap

func (d *Deployment) Unwrap() *Deployment

Unwrap unwraps the Deployment entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Deployment) Update

func (d *Deployment) Update() *DeploymentUpdateOne

Update returns a builder for updating this Deployment. Note that you need to call Deployment.Unwrap() before calling this method if this Deployment was returned from a transaction, and the transaction was committed or rolled back.

type DeploymentClient

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

DeploymentClient is a client for the Deployment schema.

func NewDeploymentClient

func NewDeploymentClient(c config) *DeploymentClient

NewDeploymentClient returns a client for the Deployment from the given config.

func (*DeploymentClient) Create

func (c *DeploymentClient) Create() *DeploymentCreate

Create returns a create builder for Deployment.

func (*DeploymentClient) CreateBulk

func (c *DeploymentClient) CreateBulk(builders ...*DeploymentCreate) *DeploymentCreateBulk

CreateBulk returns a builder for creating a bulk of Deployment entities.

func (*DeploymentClient) Delete

func (c *DeploymentClient) Delete() *DeploymentDelete

Delete returns a delete builder for Deployment.

func (*DeploymentClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*DeploymentClient) DeleteOneID

func (c *DeploymentClient) DeleteOneID(id int) *DeploymentDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*DeploymentClient) Get

func (c *DeploymentClient) Get(ctx context.Context, id int) (*Deployment, error)

Get returns a Deployment entity by its id.

func (*DeploymentClient) GetX

func (c *DeploymentClient) GetX(ctx context.Context, id int) *Deployment

GetX is like Get, but panics if an error occurs.

func (*DeploymentClient) Hooks

func (c *DeploymentClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DeploymentClient) Query

func (c *DeploymentClient) Query() *DeploymentQuery

Query returns a query builder for Deployment.

func (*DeploymentClient) QueryDeploymentStatuses

func (c *DeploymentClient) QueryDeploymentStatuses(d *Deployment) *DeploymentStatusQuery

QueryDeploymentStatuses queries the deployment_statuses edge of a Deployment.

func (*DeploymentClient) QueryRepo

func (c *DeploymentClient) QueryRepo(d *Deployment) *RepoQuery

QueryRepo queries the repo edge of a Deployment.

func (*DeploymentClient) QueryReviews

func (c *DeploymentClient) QueryReviews(d *Deployment) *ReviewQuery

QueryReviews queries the reviews edge of a Deployment.

func (*DeploymentClient) QueryUser

func (c *DeploymentClient) QueryUser(d *Deployment) *UserQuery

QueryUser queries the user edge of a Deployment.

func (*DeploymentClient) Update

func (c *DeploymentClient) Update() *DeploymentUpdate

Update returns an update builder for Deployment.

func (*DeploymentClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeploymentClient) UpdateOneID

func (c *DeploymentClient) UpdateOneID(id int) *DeploymentUpdateOne

UpdateOneID returns an update builder for the given id.

func (*DeploymentClient) Use

func (c *DeploymentClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `deployment.Hooks(f(g(h())))`.

type DeploymentCreate

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

DeploymentCreate is the builder for creating a Deployment entity.

func (*DeploymentCreate) AddDeploymentStatusIDs

func (dc *DeploymentCreate) AddDeploymentStatusIDs(ids ...int) *DeploymentCreate

AddDeploymentStatusIDs adds the "deployment_statuses" edge to the DeploymentStatus entity by IDs.

func (*DeploymentCreate) AddDeploymentStatuses

func (dc *DeploymentCreate) AddDeploymentStatuses(d ...*DeploymentStatus) *DeploymentCreate

AddDeploymentStatuses adds the "deployment_statuses" edges to the DeploymentStatus entity.

func (*DeploymentCreate) AddReviewIDs

func (dc *DeploymentCreate) AddReviewIDs(ids ...int) *DeploymentCreate

AddReviewIDs adds the "reviews" edge to the Review entity by IDs.

func (*DeploymentCreate) AddReviews

func (dc *DeploymentCreate) AddReviews(r ...*Review) *DeploymentCreate

AddReviews adds the "reviews" edges to the Review entity.

func (*DeploymentCreate) Exec

func (dc *DeploymentCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeploymentCreate) ExecX

func (dc *DeploymentCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentCreate) Mutation

func (dc *DeploymentCreate) Mutation() *DeploymentMutation

Mutation returns the DeploymentMutation object of the builder.

func (*DeploymentCreate) Save

func (dc *DeploymentCreate) Save(ctx context.Context) (*Deployment, error)

Save creates the Deployment in the database.

func (*DeploymentCreate) SaveX

func (dc *DeploymentCreate) SaveX(ctx context.Context) *Deployment

SaveX calls Save and panics if Save returns an error.

func (*DeploymentCreate) SetCreatedAt

func (dc *DeploymentCreate) SetCreatedAt(t time.Time) *DeploymentCreate

SetCreatedAt sets the "created_at" field.

func (*DeploymentCreate) SetDynamicPayload

func (dc *DeploymentCreate) SetDynamicPayload(m map[string]interface{}) *DeploymentCreate

SetDynamicPayload sets the "dynamic_payload" field.

func (*DeploymentCreate) SetEnv

func (dc *DeploymentCreate) SetEnv(s string) *DeploymentCreate

SetEnv sets the "env" field.

func (*DeploymentCreate) SetHTMLURL

func (dc *DeploymentCreate) SetHTMLURL(s string) *DeploymentCreate

SetHTMLURL sets the "html_url" field.

func (*DeploymentCreate) SetIsApprovalEnabled

func (dc *DeploymentCreate) SetIsApprovalEnabled(b bool) *DeploymentCreate

SetIsApprovalEnabled sets the "is_approval_enabled" field.

func (*DeploymentCreate) SetIsRollback

func (dc *DeploymentCreate) SetIsRollback(b bool) *DeploymentCreate

SetIsRollback sets the "is_rollback" field.

func (*DeploymentCreate) SetNillableCreatedAt

func (dc *DeploymentCreate) SetNillableCreatedAt(t *time.Time) *DeploymentCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeploymentCreate) SetNillableHTMLURL

func (dc *DeploymentCreate) SetNillableHTMLURL(s *string) *DeploymentCreate

SetNillableHTMLURL sets the "html_url" field if the given value is not nil.

func (*DeploymentCreate) SetNillableIsApprovalEnabled

func (dc *DeploymentCreate) SetNillableIsApprovalEnabled(b *bool) *DeploymentCreate

SetNillableIsApprovalEnabled sets the "is_approval_enabled" field if the given value is not nil.

func (*DeploymentCreate) SetNillableIsRollback

func (dc *DeploymentCreate) SetNillableIsRollback(b *bool) *DeploymentCreate

SetNillableIsRollback sets the "is_rollback" field if the given value is not nil.

func (*DeploymentCreate) SetNillableProductionEnvironment

func (dc *DeploymentCreate) SetNillableProductionEnvironment(b *bool) *DeploymentCreate

SetNillableProductionEnvironment sets the "production_environment" field if the given value is not nil.

func (*DeploymentCreate) SetNillableRequiredApprovalCount

func (dc *DeploymentCreate) SetNillableRequiredApprovalCount(i *int) *DeploymentCreate

SetNillableRequiredApprovalCount sets the "required_approval_count" field if the given value is not nil.

func (*DeploymentCreate) SetNillableSha

func (dc *DeploymentCreate) SetNillableSha(s *string) *DeploymentCreate

SetNillableSha sets the "sha" field if the given value is not nil.

func (*DeploymentCreate) SetNillableStatus

func (dc *DeploymentCreate) SetNillableStatus(d *deployment.Status) *DeploymentCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeploymentCreate) SetNillableType

func (dc *DeploymentCreate) SetNillableType(d *deployment.Type) *DeploymentCreate

SetNillableType sets the "type" field if the given value is not nil.

func (*DeploymentCreate) SetNillableUID

func (dc *DeploymentCreate) SetNillableUID(i *int64) *DeploymentCreate

SetNillableUID sets the "uid" field if the given value is not nil.

func (*DeploymentCreate) SetNillableUpdatedAt

func (dc *DeploymentCreate) SetNillableUpdatedAt(t *time.Time) *DeploymentCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DeploymentCreate) SetNillableUserID

func (dc *DeploymentCreate) SetNillableUserID(i *int64) *DeploymentCreate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*DeploymentCreate) SetNumber

func (dc *DeploymentCreate) SetNumber(i int) *DeploymentCreate

SetNumber sets the "number" field.

func (*DeploymentCreate) SetProductionEnvironment

func (dc *DeploymentCreate) SetProductionEnvironment(b bool) *DeploymentCreate

SetProductionEnvironment sets the "production_environment" field.

func (*DeploymentCreate) SetRef

func (dc *DeploymentCreate) SetRef(s string) *DeploymentCreate

SetRef sets the "ref" field.

func (*DeploymentCreate) SetRepo

func (dc *DeploymentCreate) SetRepo(r *Repo) *DeploymentCreate

SetRepo sets the "repo" edge to the Repo entity.

func (*DeploymentCreate) SetRepoID

func (dc *DeploymentCreate) SetRepoID(i int64) *DeploymentCreate

SetRepoID sets the "repo_id" field.

func (*DeploymentCreate) SetRequiredApprovalCount

func (dc *DeploymentCreate) SetRequiredApprovalCount(i int) *DeploymentCreate

SetRequiredApprovalCount sets the "required_approval_count" field.

func (*DeploymentCreate) SetSha

func (dc *DeploymentCreate) SetSha(s string) *DeploymentCreate

SetSha sets the "sha" field.

func (*DeploymentCreate) SetStatus

SetStatus sets the "status" field.

func (*DeploymentCreate) SetType

SetType sets the "type" field.

func (*DeploymentCreate) SetUID

func (dc *DeploymentCreate) SetUID(i int64) *DeploymentCreate

SetUID sets the "uid" field.

func (*DeploymentCreate) SetUpdatedAt

func (dc *DeploymentCreate) SetUpdatedAt(t time.Time) *DeploymentCreate

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentCreate) SetUser

func (dc *DeploymentCreate) SetUser(u *User) *DeploymentCreate

SetUser sets the "user" edge to the User entity.

func (*DeploymentCreate) SetUserID

func (dc *DeploymentCreate) SetUserID(i int64) *DeploymentCreate

SetUserID sets the "user_id" field.

type DeploymentCreateBulk

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

DeploymentCreateBulk is the builder for creating many Deployment entities in bulk.

func (*DeploymentCreateBulk) Exec

func (dcb *DeploymentCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*DeploymentCreateBulk) ExecX

func (dcb *DeploymentCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentCreateBulk) Save

func (dcb *DeploymentCreateBulk) Save(ctx context.Context) ([]*Deployment, error)

Save creates the Deployment entities in the database.

func (*DeploymentCreateBulk) SaveX

func (dcb *DeploymentCreateBulk) SaveX(ctx context.Context) []*Deployment

SaveX is like Save, but panics if an error occurs.

type DeploymentDelete

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

DeploymentDelete is the builder for deleting a Deployment entity.

func (*DeploymentDelete) Exec

func (dd *DeploymentDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DeploymentDelete) ExecX

func (dd *DeploymentDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentDelete) Where

Where appends a list predicates to the DeploymentDelete builder.

type DeploymentDeleteOne

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

DeploymentDeleteOne is the builder for deleting a single Deployment entity.

func (*DeploymentDeleteOne) Exec

func (ddo *DeploymentDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*DeploymentDeleteOne) ExecX

func (ddo *DeploymentDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type DeploymentEdges

type DeploymentEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// Repo holds the value of the repo edge.
	Repo *Repo `json:"repo,omitempty"`
	// Reviews holds the value of the reviews edge.
	Reviews []*Review `json:"reviews,omitempty"`
	// DeploymentStatuses holds the value of the deployment_statuses edge.
	DeploymentStatuses []*DeploymentStatus `json:"deployment_statuses,omitempty"`
	// contains filtered or unexported fields
}

DeploymentEdges holds the relations/edges for other nodes in the graph.

func (DeploymentEdges) DeploymentStatusesOrErr

func (e DeploymentEdges) DeploymentStatusesOrErr() ([]*DeploymentStatus, error)

DeploymentStatusesOrErr returns the DeploymentStatuses value or an error if the edge was not loaded in eager-loading.

func (DeploymentEdges) RepoOrErr

func (e DeploymentEdges) RepoOrErr() (*Repo, error)

RepoOrErr returns the Repo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (DeploymentEdges) ReviewsOrErr

func (e DeploymentEdges) ReviewsOrErr() ([]*Review, error)

ReviewsOrErr returns the Reviews value or an error if the edge was not loaded in eager-loading.

func (DeploymentEdges) UserOrErr

func (e DeploymentEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type DeploymentGroupBy

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

DeploymentGroupBy is the group-by builder for Deployment entities.

func (*DeploymentGroupBy) Aggregate

func (dgb *DeploymentGroupBy) Aggregate(fns ...AggregateFunc) *DeploymentGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*DeploymentGroupBy) Bool

func (dgb *DeploymentGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DeploymentGroupBy) BoolX

func (dgb *DeploymentGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeploymentGroupBy) Bools

func (dgb *DeploymentGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*DeploymentGroupBy) BoolsX

func (dgb *DeploymentGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeploymentGroupBy) Float64

func (dgb *DeploymentGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DeploymentGroupBy) Float64X

func (dgb *DeploymentGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeploymentGroupBy) Float64s

func (dgb *DeploymentGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*DeploymentGroupBy) Float64sX

func (dgb *DeploymentGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeploymentGroupBy) Int

func (dgb *DeploymentGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DeploymentGroupBy) IntX

func (dgb *DeploymentGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeploymentGroupBy) Ints

func (dgb *DeploymentGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*DeploymentGroupBy) IntsX

func (dgb *DeploymentGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeploymentGroupBy) Scan

func (dgb *DeploymentGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*DeploymentGroupBy) ScanX

func (dgb *DeploymentGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*DeploymentGroupBy) String

func (dgb *DeploymentGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DeploymentGroupBy) StringX

func (dgb *DeploymentGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeploymentGroupBy) Strings

func (dgb *DeploymentGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*DeploymentGroupBy) StringsX

func (dgb *DeploymentGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeploymentMutation

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

DeploymentMutation represents an operation that mutates the Deployment nodes in the graph.

func (*DeploymentMutation) AddDeploymentStatusIDs

func (m *DeploymentMutation) AddDeploymentStatusIDs(ids ...int)

AddDeploymentStatusIDs adds the "deployment_statuses" edge to the DeploymentStatus entity by ids.

func (*DeploymentMutation) AddField

func (m *DeploymentMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeploymentMutation) AddNumber

func (m *DeploymentMutation) AddNumber(i int)

AddNumber adds i to the "number" field.

func (*DeploymentMutation) AddRequiredApprovalCount

func (m *DeploymentMutation) AddRequiredApprovalCount(i int)

AddRequiredApprovalCount adds i to the "required_approval_count" field.

func (*DeploymentMutation) AddReviewIDs

func (m *DeploymentMutation) AddReviewIDs(ids ...int)

AddReviewIDs adds the "reviews" edge to the Review entity by ids.

func (*DeploymentMutation) AddUID

func (m *DeploymentMutation) AddUID(i int64)

AddUID adds i to the "uid" field.

func (*DeploymentMutation) AddedEdges

func (m *DeploymentMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DeploymentMutation) AddedField

func (m *DeploymentMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeploymentMutation) AddedFields

func (m *DeploymentMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DeploymentMutation) AddedIDs

func (m *DeploymentMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DeploymentMutation) AddedNumber

func (m *DeploymentMutation) AddedNumber() (r int, exists bool)

AddedNumber returns the value that was added to the "number" field in this mutation.

func (*DeploymentMutation) AddedRequiredApprovalCount

func (m *DeploymentMutation) AddedRequiredApprovalCount() (r int, exists bool)

AddedRequiredApprovalCount returns the value that was added to the "required_approval_count" field in this mutation.

func (*DeploymentMutation) AddedUID

func (m *DeploymentMutation) AddedUID() (r int64, exists bool)

AddedUID returns the value that was added to the "uid" field in this mutation.

func (*DeploymentMutation) ClearDeploymentStatuses

func (m *DeploymentMutation) ClearDeploymentStatuses()

ClearDeploymentStatuses clears the "deployment_statuses" edge to the DeploymentStatus entity.

func (*DeploymentMutation) ClearDynamicPayload

func (m *DeploymentMutation) ClearDynamicPayload()

ClearDynamicPayload clears the value of the "dynamic_payload" field.

func (*DeploymentMutation) ClearEdge

func (m *DeploymentMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DeploymentMutation) ClearField

func (m *DeploymentMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeploymentMutation) ClearHTMLURL

func (m *DeploymentMutation) ClearHTMLURL()

ClearHTMLURL clears the value of the "html_url" field.

func (*DeploymentMutation) ClearIsApprovalEnabled

func (m *DeploymentMutation) ClearIsApprovalEnabled()

ClearIsApprovalEnabled clears the value of the "is_approval_enabled" field.

func (*DeploymentMutation) ClearRepo

func (m *DeploymentMutation) ClearRepo()

ClearRepo clears the "repo" edge to the Repo entity.

func (*DeploymentMutation) ClearRequiredApprovalCount

func (m *DeploymentMutation) ClearRequiredApprovalCount()

ClearRequiredApprovalCount clears the value of the "required_approval_count" field.

func (*DeploymentMutation) ClearReviews

func (m *DeploymentMutation) ClearReviews()

ClearReviews clears the "reviews" edge to the Review entity.

func (*DeploymentMutation) ClearSha

func (m *DeploymentMutation) ClearSha()

ClearSha clears the value of the "sha" field.

func (*DeploymentMutation) ClearUID

func (m *DeploymentMutation) ClearUID()

ClearUID clears the value of the "uid" field.

func (*DeploymentMutation) ClearUser

func (m *DeploymentMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*DeploymentMutation) ClearUserID

func (m *DeploymentMutation) ClearUserID()

ClearUserID clears the value of the "user_id" field.

func (*DeploymentMutation) ClearedEdges

func (m *DeploymentMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DeploymentMutation) ClearedFields

func (m *DeploymentMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DeploymentMutation) Client

func (m DeploymentMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*DeploymentMutation) CreatedAt

func (m *DeploymentMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DeploymentMutation) DeploymentStatusesCleared

func (m *DeploymentMutation) DeploymentStatusesCleared() bool

DeploymentStatusesCleared reports if the "deployment_statuses" edge to the DeploymentStatus entity was cleared.

func (*DeploymentMutation) DeploymentStatusesIDs

func (m *DeploymentMutation) DeploymentStatusesIDs() (ids []int)

DeploymentStatusesIDs returns the "deployment_statuses" edge IDs in the mutation.

func (*DeploymentMutation) DynamicPayload

func (m *DeploymentMutation) DynamicPayload() (r map[string]interface{}, exists bool)

DynamicPayload returns the value of the "dynamic_payload" field in the mutation.

func (*DeploymentMutation) DynamicPayloadCleared

func (m *DeploymentMutation) DynamicPayloadCleared() bool

DynamicPayloadCleared returns if the "dynamic_payload" field was cleared in this mutation.

func (*DeploymentMutation) EdgeCleared

func (m *DeploymentMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DeploymentMutation) Env

func (m *DeploymentMutation) Env() (r string, exists bool)

Env returns the value of the "env" field in the mutation.

func (*DeploymentMutation) Field

func (m *DeploymentMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeploymentMutation) FieldCleared

func (m *DeploymentMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DeploymentMutation) Fields

func (m *DeploymentMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DeploymentMutation) GetType

func (m *DeploymentMutation) GetType() (r deployment.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*DeploymentMutation) HTMLURL

func (m *DeploymentMutation) HTMLURL() (r string, exists bool)

HTMLURL returns the value of the "html_url" field in the mutation.

func (*DeploymentMutation) HTMLURLCleared

func (m *DeploymentMutation) HTMLURLCleared() bool

HTMLURLCleared returns if the "html_url" field was cleared in this mutation.

func (*DeploymentMutation) ID

func (m *DeploymentMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DeploymentMutation) IDs

func (m *DeploymentMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DeploymentMutation) IsApprovalEnabled

func (m *DeploymentMutation) IsApprovalEnabled() (r bool, exists bool)

IsApprovalEnabled returns the value of the "is_approval_enabled" field in the mutation.

func (*DeploymentMutation) IsApprovalEnabledCleared

func (m *DeploymentMutation) IsApprovalEnabledCleared() bool

IsApprovalEnabledCleared returns if the "is_approval_enabled" field was cleared in this mutation.

func (*DeploymentMutation) IsRollback

func (m *DeploymentMutation) IsRollback() (r bool, exists bool)

IsRollback returns the value of the "is_rollback" field in the mutation.

func (*DeploymentMutation) Number

func (m *DeploymentMutation) Number() (r int, exists bool)

Number returns the value of the "number" field in the mutation.

func (*DeploymentMutation) OldCreatedAt

func (m *DeploymentMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldDynamicPayload

func (m *DeploymentMutation) OldDynamicPayload(ctx context.Context) (v map[string]interface{}, err error)

OldDynamicPayload returns the old "dynamic_payload" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldEnv

func (m *DeploymentMutation) OldEnv(ctx context.Context) (v string, err error)

OldEnv returns the old "env" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldField

func (m *DeploymentMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DeploymentMutation) OldHTMLURL

func (m *DeploymentMutation) OldHTMLURL(ctx context.Context) (v string, err error)

OldHTMLURL returns the old "html_url" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldIsApprovalEnabled

func (m *DeploymentMutation) OldIsApprovalEnabled(ctx context.Context) (v *bool, err error)

OldIsApprovalEnabled returns the old "is_approval_enabled" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldIsRollback

func (m *DeploymentMutation) OldIsRollback(ctx context.Context) (v bool, err error)

OldIsRollback returns the old "is_rollback" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldNumber

func (m *DeploymentMutation) OldNumber(ctx context.Context) (v int, err error)

OldNumber returns the old "number" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldProductionEnvironment

func (m *DeploymentMutation) OldProductionEnvironment(ctx context.Context) (v bool, err error)

OldProductionEnvironment returns the old "production_environment" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldRef

func (m *DeploymentMutation) OldRef(ctx context.Context) (v string, err error)

OldRef returns the old "ref" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldRepoID

func (m *DeploymentMutation) OldRepoID(ctx context.Context) (v int64, err error)

OldRepoID returns the old "repo_id" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldRequiredApprovalCount

func (m *DeploymentMutation) OldRequiredApprovalCount(ctx context.Context) (v *int, err error)

OldRequiredApprovalCount returns the old "required_approval_count" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldSha

func (m *DeploymentMutation) OldSha(ctx context.Context) (v string, err error)

OldSha returns the old "sha" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldStatus

func (m *DeploymentMutation) OldStatus(ctx context.Context) (v deployment.Status, err error)

OldStatus returns the old "status" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldType

func (m *DeploymentMutation) OldType(ctx context.Context) (v deployment.Type, err error)

OldType returns the old "type" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldUID

func (m *DeploymentMutation) OldUID(ctx context.Context) (v int64, err error)

OldUID returns the old "uid" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldUpdatedAt

func (m *DeploymentMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) OldUserID

func (m *DeploymentMutation) OldUserID(ctx context.Context) (v int64, err error)

OldUserID returns the old "user_id" field's value of the Deployment entity. If the Deployment object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentMutation) Op

func (m *DeploymentMutation) Op() Op

Op returns the operation name.

func (*DeploymentMutation) ProductionEnvironment

func (m *DeploymentMutation) ProductionEnvironment() (r bool, exists bool)

ProductionEnvironment returns the value of the "production_environment" field in the mutation.

func (*DeploymentMutation) Ref

func (m *DeploymentMutation) Ref() (r string, exists bool)

Ref returns the value of the "ref" field in the mutation.

func (*DeploymentMutation) RemoveDeploymentStatusIDs

func (m *DeploymentMutation) RemoveDeploymentStatusIDs(ids ...int)

RemoveDeploymentStatusIDs removes the "deployment_statuses" edge to the DeploymentStatus entity by IDs.

func (*DeploymentMutation) RemoveReviewIDs

func (m *DeploymentMutation) RemoveReviewIDs(ids ...int)

RemoveReviewIDs removes the "reviews" edge to the Review entity by IDs.

func (*DeploymentMutation) RemovedDeploymentStatusesIDs

func (m *DeploymentMutation) RemovedDeploymentStatusesIDs() (ids []int)

RemovedDeploymentStatuses returns the removed IDs of the "deployment_statuses" edge to the DeploymentStatus entity.

func (*DeploymentMutation) RemovedEdges

func (m *DeploymentMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DeploymentMutation) RemovedIDs

func (m *DeploymentMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DeploymentMutation) RemovedReviewsIDs

func (m *DeploymentMutation) RemovedReviewsIDs() (ids []int)

RemovedReviews returns the removed IDs of the "reviews" edge to the Review entity.

func (*DeploymentMutation) RepoCleared

func (m *DeploymentMutation) RepoCleared() bool

RepoCleared reports if the "repo" edge to the Repo entity was cleared.

func (*DeploymentMutation) RepoID

func (m *DeploymentMutation) RepoID() (r int64, exists bool)

RepoID returns the value of the "repo_id" field in the mutation.

func (*DeploymentMutation) RepoIDs

func (m *DeploymentMutation) RepoIDs() (ids []int64)

RepoIDs returns the "repo" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RepoID instead. It exists only for internal usage by the builders.

func (*DeploymentMutation) RequiredApprovalCount

func (m *DeploymentMutation) RequiredApprovalCount() (r int, exists bool)

RequiredApprovalCount returns the value of the "required_approval_count" field in the mutation.

func (*DeploymentMutation) RequiredApprovalCountCleared

func (m *DeploymentMutation) RequiredApprovalCountCleared() bool

RequiredApprovalCountCleared returns if the "required_approval_count" field was cleared in this mutation.

func (*DeploymentMutation) ResetCreatedAt

func (m *DeploymentMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DeploymentMutation) ResetDeploymentStatuses

func (m *DeploymentMutation) ResetDeploymentStatuses()

ResetDeploymentStatuses resets all changes to the "deployment_statuses" edge.

func (*DeploymentMutation) ResetDynamicPayload

func (m *DeploymentMutation) ResetDynamicPayload()

ResetDynamicPayload resets all changes to the "dynamic_payload" field.

func (*DeploymentMutation) ResetEdge

func (m *DeploymentMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DeploymentMutation) ResetEnv

func (m *DeploymentMutation) ResetEnv()

ResetEnv resets all changes to the "env" field.

func (*DeploymentMutation) ResetField

func (m *DeploymentMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeploymentMutation) ResetHTMLURL

func (m *DeploymentMutation) ResetHTMLURL()

ResetHTMLURL resets all changes to the "html_url" field.

func (*DeploymentMutation) ResetIsApprovalEnabled

func (m *DeploymentMutation) ResetIsApprovalEnabled()

ResetIsApprovalEnabled resets all changes to the "is_approval_enabled" field.

func (*DeploymentMutation) ResetIsRollback

func (m *DeploymentMutation) ResetIsRollback()

ResetIsRollback resets all changes to the "is_rollback" field.

func (*DeploymentMutation) ResetNumber

func (m *DeploymentMutation) ResetNumber()

ResetNumber resets all changes to the "number" field.

func (*DeploymentMutation) ResetProductionEnvironment

func (m *DeploymentMutation) ResetProductionEnvironment()

ResetProductionEnvironment resets all changes to the "production_environment" field.

func (*DeploymentMutation) ResetRef

func (m *DeploymentMutation) ResetRef()

ResetRef resets all changes to the "ref" field.

func (*DeploymentMutation) ResetRepo

func (m *DeploymentMutation) ResetRepo()

ResetRepo resets all changes to the "repo" edge.

func (*DeploymentMutation) ResetRepoID

func (m *DeploymentMutation) ResetRepoID()

ResetRepoID resets all changes to the "repo_id" field.

func (*DeploymentMutation) ResetRequiredApprovalCount

func (m *DeploymentMutation) ResetRequiredApprovalCount()

ResetRequiredApprovalCount resets all changes to the "required_approval_count" field.

func (*DeploymentMutation) ResetReviews

func (m *DeploymentMutation) ResetReviews()

ResetReviews resets all changes to the "reviews" edge.

func (*DeploymentMutation) ResetSha

func (m *DeploymentMutation) ResetSha()

ResetSha resets all changes to the "sha" field.

func (*DeploymentMutation) ResetStatus

func (m *DeploymentMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*DeploymentMutation) ResetType

func (m *DeploymentMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*DeploymentMutation) ResetUID

func (m *DeploymentMutation) ResetUID()

ResetUID resets all changes to the "uid" field.

func (*DeploymentMutation) ResetUpdatedAt

func (m *DeploymentMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DeploymentMutation) ResetUser

func (m *DeploymentMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*DeploymentMutation) ResetUserID

func (m *DeploymentMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*DeploymentMutation) ReviewsCleared

func (m *DeploymentMutation) ReviewsCleared() bool

ReviewsCleared reports if the "reviews" edge to the Review entity was cleared.

func (*DeploymentMutation) ReviewsIDs

func (m *DeploymentMutation) ReviewsIDs() (ids []int)

ReviewsIDs returns the "reviews" edge IDs in the mutation.

func (*DeploymentMutation) SetCreatedAt

func (m *DeploymentMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*DeploymentMutation) SetDynamicPayload

func (m *DeploymentMutation) SetDynamicPayload(value map[string]interface{})

SetDynamicPayload sets the "dynamic_payload" field.

func (*DeploymentMutation) SetEnv

func (m *DeploymentMutation) SetEnv(s string)

SetEnv sets the "env" field.

func (*DeploymentMutation) SetField

func (m *DeploymentMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeploymentMutation) SetHTMLURL

func (m *DeploymentMutation) SetHTMLURL(s string)

SetHTMLURL sets the "html_url" field.

func (*DeploymentMutation) SetIsApprovalEnabled

func (m *DeploymentMutation) SetIsApprovalEnabled(b bool)

SetIsApprovalEnabled sets the "is_approval_enabled" field.

func (*DeploymentMutation) SetIsRollback

func (m *DeploymentMutation) SetIsRollback(b bool)

SetIsRollback sets the "is_rollback" field.

func (*DeploymentMutation) SetNumber

func (m *DeploymentMutation) SetNumber(i int)

SetNumber sets the "number" field.

func (*DeploymentMutation) SetProductionEnvironment

func (m *DeploymentMutation) SetProductionEnvironment(b bool)

SetProductionEnvironment sets the "production_environment" field.

func (*DeploymentMutation) SetRef

func (m *DeploymentMutation) SetRef(s string)

SetRef sets the "ref" field.

func (*DeploymentMutation) SetRepoID

func (m *DeploymentMutation) SetRepoID(i int64)

SetRepoID sets the "repo_id" field.

func (*DeploymentMutation) SetRequiredApprovalCount

func (m *DeploymentMutation) SetRequiredApprovalCount(i int)

SetRequiredApprovalCount sets the "required_approval_count" field.

func (*DeploymentMutation) SetSha

func (m *DeploymentMutation) SetSha(s string)

SetSha sets the "sha" field.

func (*DeploymentMutation) SetStatus

func (m *DeploymentMutation) SetStatus(d deployment.Status)

SetStatus sets the "status" field.

func (*DeploymentMutation) SetType

func (m *DeploymentMutation) SetType(d deployment.Type)

SetType sets the "type" field.

func (*DeploymentMutation) SetUID

func (m *DeploymentMutation) SetUID(i int64)

SetUID sets the "uid" field.

func (*DeploymentMutation) SetUpdatedAt

func (m *DeploymentMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentMutation) SetUserID

func (m *DeploymentMutation) SetUserID(i int64)

SetUserID sets the "user_id" field.

func (*DeploymentMutation) Sha

func (m *DeploymentMutation) Sha() (r string, exists bool)

Sha returns the value of the "sha" field in the mutation.

func (*DeploymentMutation) ShaCleared

func (m *DeploymentMutation) ShaCleared() bool

ShaCleared returns if the "sha" field was cleared in this mutation.

func (*DeploymentMutation) Status

func (m *DeploymentMutation) Status() (r deployment.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (DeploymentMutation) Tx

func (m DeploymentMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DeploymentMutation) Type

func (m *DeploymentMutation) Type() string

Type returns the node type of this mutation (Deployment).

func (*DeploymentMutation) UID

func (m *DeploymentMutation) UID() (r int64, exists bool)

UID returns the value of the "uid" field in the mutation.

func (*DeploymentMutation) UIDCleared

func (m *DeploymentMutation) UIDCleared() bool

UIDCleared returns if the "uid" field was cleared in this mutation.

func (*DeploymentMutation) UpdatedAt

func (m *DeploymentMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DeploymentMutation) UserCleared

func (m *DeploymentMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*DeploymentMutation) UserID

func (m *DeploymentMutation) UserID() (r int64, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*DeploymentMutation) UserIDCleared

func (m *DeploymentMutation) UserIDCleared() bool

UserIDCleared returns if the "user_id" field was cleared in this mutation.

func (*DeploymentMutation) UserIDs

func (m *DeploymentMutation) UserIDs() (ids []int64)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*DeploymentMutation) Where

func (m *DeploymentMutation) Where(ps ...predicate.Deployment)

Where appends a list predicates to the DeploymentMutation builder.

type DeploymentQuery

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

DeploymentQuery is the builder for querying Deployment entities.

func (*DeploymentQuery) All

func (dq *DeploymentQuery) All(ctx context.Context) ([]*Deployment, error)

All executes the query and returns a list of Deployments.

func (*DeploymentQuery) AllX

func (dq *DeploymentQuery) AllX(ctx context.Context) []*Deployment

AllX is like All, but panics if an error occurs.

func (*DeploymentQuery) Clone

func (dq *DeploymentQuery) Clone() *DeploymentQuery

Clone returns a duplicate of the DeploymentQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DeploymentQuery) Count

func (dq *DeploymentQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeploymentQuery) CountX

func (dq *DeploymentQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DeploymentQuery) Exist

func (dq *DeploymentQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DeploymentQuery) ExistX

func (dq *DeploymentQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DeploymentQuery) First

func (dq *DeploymentQuery) First(ctx context.Context) (*Deployment, error)

First returns the first Deployment entity from the query. Returns a *NotFoundError when no Deployment was found.

func (*DeploymentQuery) FirstID

func (dq *DeploymentQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Deployment ID from the query. Returns a *NotFoundError when no Deployment ID was found.

func (*DeploymentQuery) FirstIDX

func (dq *DeploymentQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*DeploymentQuery) FirstX

func (dq *DeploymentQuery) FirstX(ctx context.Context) *Deployment

FirstX is like First, but panics if an error occurs.

func (*DeploymentQuery) ForShare

func (dq *DeploymentQuery) ForShare(opts ...sql.LockOption) *DeploymentQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*DeploymentQuery) ForUpdate

func (dq *DeploymentQuery) ForUpdate(opts ...sql.LockOption) *DeploymentQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*DeploymentQuery) GroupBy

func (dq *DeploymentQuery) GroupBy(field string, fields ...string) *DeploymentGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Number int `json:"number"`
	Count int `json:"count,omitempty"`
}

client.Deployment.Query().
	GroupBy(deployment.FieldNumber).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeploymentQuery) IDs

func (dq *DeploymentQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Deployment IDs.

func (*DeploymentQuery) IDsX

func (dq *DeploymentQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*DeploymentQuery) Limit

func (dq *DeploymentQuery) Limit(limit int) *DeploymentQuery

Limit adds a limit step to the query.

func (*DeploymentQuery) Offset

func (dq *DeploymentQuery) Offset(offset int) *DeploymentQuery

Offset adds an offset step to the query.

func (*DeploymentQuery) Only

func (dq *DeploymentQuery) Only(ctx context.Context) (*Deployment, error)

Only returns a single Deployment entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Deployment entity is found. Returns a *NotFoundError when no Deployment entities are found.

func (*DeploymentQuery) OnlyID

func (dq *DeploymentQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Deployment ID in the query. Returns a *NotSingularError when more than one Deployment ID is found. Returns a *NotFoundError when no entities are found.

func (*DeploymentQuery) OnlyIDX

func (dq *DeploymentQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DeploymentQuery) OnlyX

func (dq *DeploymentQuery) OnlyX(ctx context.Context) *Deployment

OnlyX is like Only, but panics if an error occurs.

func (*DeploymentQuery) Order

func (dq *DeploymentQuery) Order(o ...OrderFunc) *DeploymentQuery

Order adds an order step to the query.

func (*DeploymentQuery) QueryDeploymentStatuses

func (dq *DeploymentQuery) QueryDeploymentStatuses() *DeploymentStatusQuery

QueryDeploymentStatuses chains the current query on the "deployment_statuses" edge.

func (*DeploymentQuery) QueryRepo

func (dq *DeploymentQuery) QueryRepo() *RepoQuery

QueryRepo chains the current query on the "repo" edge.

func (*DeploymentQuery) QueryReviews

func (dq *DeploymentQuery) QueryReviews() *ReviewQuery

QueryReviews chains the current query on the "reviews" edge.

func (*DeploymentQuery) QueryUser

func (dq *DeploymentQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*DeploymentQuery) Select

func (dq *DeploymentQuery) Select(fields ...string) *DeploymentSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Number int `json:"number"`
}

client.Deployment.Query().
	Select(deployment.FieldNumber).
	Scan(ctx, &v)

func (*DeploymentQuery) Unique

func (dq *DeploymentQuery) Unique(unique bool) *DeploymentQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DeploymentQuery) Where

Where adds a new predicate for the DeploymentQuery builder.

func (*DeploymentQuery) WithDeploymentStatuses

func (dq *DeploymentQuery) WithDeploymentStatuses(opts ...func(*DeploymentStatusQuery)) *DeploymentQuery

WithDeploymentStatuses tells the query-builder to eager-load the nodes that are connected to the "deployment_statuses" edge. The optional arguments are used to configure the query builder of the edge.

func (*DeploymentQuery) WithRepo

func (dq *DeploymentQuery) WithRepo(opts ...func(*RepoQuery)) *DeploymentQuery

WithRepo tells the query-builder to eager-load the nodes that are connected to the "repo" edge. The optional arguments are used to configure the query builder of the edge.

func (*DeploymentQuery) WithReviews

func (dq *DeploymentQuery) WithReviews(opts ...func(*ReviewQuery)) *DeploymentQuery

WithReviews tells the query-builder to eager-load the nodes that are connected to the "reviews" edge. The optional arguments are used to configure the query builder of the edge.

func (*DeploymentQuery) WithUser

func (dq *DeploymentQuery) WithUser(opts ...func(*UserQuery)) *DeploymentQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type DeploymentSelect

type DeploymentSelect struct {
	*DeploymentQuery
	// contains filtered or unexported fields
}

DeploymentSelect is the builder for selecting fields of Deployment entities.

func (*DeploymentSelect) Bool

func (ds *DeploymentSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) BoolX

func (ds *DeploymentSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeploymentSelect) Bools

func (ds *DeploymentSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) BoolsX

func (ds *DeploymentSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeploymentSelect) Float64

func (ds *DeploymentSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) Float64X

func (ds *DeploymentSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeploymentSelect) Float64s

func (ds *DeploymentSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) Float64sX

func (ds *DeploymentSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeploymentSelect) Int

func (ds *DeploymentSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) IntX

func (ds *DeploymentSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeploymentSelect) Ints

func (ds *DeploymentSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) IntsX

func (ds *DeploymentSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeploymentSelect) Scan

func (ds *DeploymentSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*DeploymentSelect) ScanX

func (ds *DeploymentSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*DeploymentSelect) String

func (ds *DeploymentSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) StringX

func (ds *DeploymentSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeploymentSelect) Strings

func (ds *DeploymentSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeploymentSelect) StringsX

func (ds *DeploymentSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeploymentStatistics

type DeploymentStatistics struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Env holds the value of the "env" field.
	Env string `json:"env"`
	// Count holds the value of the "count" field.
	Count int `json:"count"`
	// RollbackCount holds the value of the "rollback_count" field.
	RollbackCount int `json:"rollback_count"`
	// Additions holds the value of the "additions" field.
	Additions int `json:"additions"`
	// Deletions holds the value of the "deletions" field.
	Deletions int `json:"deletions"`
	// Changes holds the value of the "changes" field.
	Changes int `json:"changes"`
	// LeadTimeSeconds holds the value of the "lead_time_seconds" field.
	LeadTimeSeconds int `json:"lead_time_seconds"`
	// CommitCount holds the value of the "commit_count" field.
	CommitCount int `json:"commit_count"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at"`
	// RepoID holds the value of the "repo_id" field.
	RepoID int64 `json:"repo_id"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DeploymentStatisticsQuery when eager-loading is set.
	Edges DeploymentStatisticsEdges `json:"edges"`
	// contains filtered or unexported fields
}

DeploymentStatistics is the model entity for the DeploymentStatistics schema.

func (*DeploymentStatistics) QueryRepo

func (ds *DeploymentStatistics) QueryRepo() *RepoQuery

QueryRepo queries the "repo" edge of the DeploymentStatistics entity.

func (*DeploymentStatistics) String

func (ds *DeploymentStatistics) String() string

String implements the fmt.Stringer.

func (*DeploymentStatistics) Unwrap

Unwrap unwraps the DeploymentStatistics entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*DeploymentStatistics) Update

Update returns a builder for updating this DeploymentStatistics. Note that you need to call DeploymentStatistics.Unwrap() before calling this method if this DeploymentStatistics was returned from a transaction, and the transaction was committed or rolled back.

type DeploymentStatisticsClient

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

DeploymentStatisticsClient is a client for the DeploymentStatistics schema.

func NewDeploymentStatisticsClient

func NewDeploymentStatisticsClient(c config) *DeploymentStatisticsClient

NewDeploymentStatisticsClient returns a client for the DeploymentStatistics from the given config.

func (*DeploymentStatisticsClient) Create

Create returns a create builder for DeploymentStatistics.

func (*DeploymentStatisticsClient) CreateBulk

CreateBulk returns a builder for creating a bulk of DeploymentStatistics entities.

func (*DeploymentStatisticsClient) Delete

Delete returns a delete builder for DeploymentStatistics.

func (*DeploymentStatisticsClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*DeploymentStatisticsClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*DeploymentStatisticsClient) Get

Get returns a DeploymentStatistics entity by its id.

func (*DeploymentStatisticsClient) GetX

GetX is like Get, but panics if an error occurs.

func (*DeploymentStatisticsClient) Hooks

func (c *DeploymentStatisticsClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DeploymentStatisticsClient) Query

Query returns a query builder for DeploymentStatistics.

func (*DeploymentStatisticsClient) QueryRepo

QueryRepo queries the repo edge of a DeploymentStatistics.

func (*DeploymentStatisticsClient) Update

Update returns an update builder for DeploymentStatistics.

func (*DeploymentStatisticsClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeploymentStatisticsClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*DeploymentStatisticsClient) Use

func (c *DeploymentStatisticsClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `deploymentstatistics.Hooks(f(g(h())))`.

type DeploymentStatisticsCreate

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

DeploymentStatisticsCreate is the builder for creating a DeploymentStatistics entity.

func (*DeploymentStatisticsCreate) Exec

Exec executes the query.

func (*DeploymentStatisticsCreate) ExecX

func (dsc *DeploymentStatisticsCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentStatisticsCreate) Mutation

Mutation returns the DeploymentStatisticsMutation object of the builder.

func (*DeploymentStatisticsCreate) Save

Save creates the DeploymentStatistics in the database.

func (*DeploymentStatisticsCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DeploymentStatisticsCreate) SetAdditions

SetAdditions sets the "additions" field.

func (*DeploymentStatisticsCreate) SetChanges

SetChanges sets the "changes" field.

func (*DeploymentStatisticsCreate) SetCommitCount

SetCommitCount sets the "commit_count" field.

func (*DeploymentStatisticsCreate) SetCount

SetCount sets the "count" field.

func (*DeploymentStatisticsCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*DeploymentStatisticsCreate) SetDeletions

SetDeletions sets the "deletions" field.

func (*DeploymentStatisticsCreate) SetEnv

SetEnv sets the "env" field.

func (*DeploymentStatisticsCreate) SetLeadTimeSeconds

func (dsc *DeploymentStatisticsCreate) SetLeadTimeSeconds(i int) *DeploymentStatisticsCreate

SetLeadTimeSeconds sets the "lead_time_seconds" field.

func (*DeploymentStatisticsCreate) SetNillableAdditions

func (dsc *DeploymentStatisticsCreate) SetNillableAdditions(i *int) *DeploymentStatisticsCreate

SetNillableAdditions sets the "additions" field if the given value is not nil.

func (*DeploymentStatisticsCreate) SetNillableChanges

func (dsc *DeploymentStatisticsCreate) SetNillableChanges(i *int) *DeploymentStatisticsCreate

SetNillableChanges sets the "changes" field if the given value is not nil.

func (*DeploymentStatisticsCreate) SetNillableCommitCount

func (dsc *DeploymentStatisticsCreate) SetNillableCommitCount(i *int) *DeploymentStatisticsCreate

SetNillableCommitCount sets the "commit_count" field if the given value is not nil.

func (*DeploymentStatisticsCreate) SetNillableCount

func (dsc *DeploymentStatisticsCreate) SetNillableCount(i *int) *DeploymentStatisticsCreate

SetNillableCount sets the "count" field if the given value is not nil.

func (*DeploymentStatisticsCreate) SetNillableCreatedAt

func (dsc *DeploymentStatisticsCreate) SetNillableCreatedAt(t *time.Time) *DeploymentStatisticsCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeploymentStatisticsCreate) SetNillableDeletions

func (dsc *DeploymentStatisticsCreate) SetNillableDeletions(i *int) *DeploymentStatisticsCreate

SetNillableDeletions sets the "deletions" field if the given value is not nil.

func (*DeploymentStatisticsCreate) SetNillableLeadTimeSeconds

func (dsc *DeploymentStatisticsCreate) SetNillableLeadTimeSeconds(i *int) *DeploymentStatisticsCreate

SetNillableLeadTimeSeconds sets the "lead_time_seconds" field if the given value is not nil.

func (*DeploymentStatisticsCreate) SetNillableRollbackCount

func (dsc *DeploymentStatisticsCreate) SetNillableRollbackCount(i *int) *DeploymentStatisticsCreate

SetNillableRollbackCount sets the "rollback_count" field if the given value is not nil.

func (*DeploymentStatisticsCreate) SetNillableUpdatedAt

func (dsc *DeploymentStatisticsCreate) SetNillableUpdatedAt(t *time.Time) *DeploymentStatisticsCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DeploymentStatisticsCreate) SetRepo

SetRepo sets the "repo" edge to the Repo entity.

func (*DeploymentStatisticsCreate) SetRepoID

SetRepoID sets the "repo_id" field.

func (*DeploymentStatisticsCreate) SetRollbackCount

func (dsc *DeploymentStatisticsCreate) SetRollbackCount(i int) *DeploymentStatisticsCreate

SetRollbackCount sets the "rollback_count" field.

func (*DeploymentStatisticsCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type DeploymentStatisticsCreateBulk

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

DeploymentStatisticsCreateBulk is the builder for creating many DeploymentStatistics entities in bulk.

func (*DeploymentStatisticsCreateBulk) Exec

Exec executes the query.

func (*DeploymentStatisticsCreateBulk) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentStatisticsCreateBulk) Save

Save creates the DeploymentStatistics entities in the database.

func (*DeploymentStatisticsCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type DeploymentStatisticsDelete

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

DeploymentStatisticsDelete is the builder for deleting a DeploymentStatistics entity.

func (*DeploymentStatisticsDelete) Exec

Exec executes the deletion query and returns how many vertices were deleted.

func (*DeploymentStatisticsDelete) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentStatisticsDelete) Where

Where appends a list predicates to the DeploymentStatisticsDelete builder.

type DeploymentStatisticsDeleteOne

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

DeploymentStatisticsDeleteOne is the builder for deleting a single DeploymentStatistics entity.

func (*DeploymentStatisticsDeleteOne) Exec

Exec executes the deletion query.

func (*DeploymentStatisticsDeleteOne) ExecX

ExecX is like Exec, but panics if an error occurs.

type DeploymentStatisticsEdges

type DeploymentStatisticsEdges struct {
	// Repo holds the value of the repo edge.
	Repo *Repo `json:"repo,omitempty"`
	// contains filtered or unexported fields
}

DeploymentStatisticsEdges holds the relations/edges for other nodes in the graph.

func (DeploymentStatisticsEdges) RepoOrErr

func (e DeploymentStatisticsEdges) RepoOrErr() (*Repo, error)

RepoOrErr returns the Repo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type DeploymentStatisticsGroupBy

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

DeploymentStatisticsGroupBy is the group-by builder for DeploymentStatistics entities.

func (*DeploymentStatisticsGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*DeploymentStatisticsGroupBy) Bool

func (dsgb *DeploymentStatisticsGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatisticsGroupBy) BoolX

BoolX is like Bool, but panics if an error occurs.

func (*DeploymentStatisticsGroupBy) Bools

func (dsgb *DeploymentStatisticsGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatisticsGroupBy) BoolsX

func (dsgb *DeploymentStatisticsGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeploymentStatisticsGroupBy) Float64

func (dsgb *DeploymentStatisticsGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatisticsGroupBy) Float64X

func (dsgb *DeploymentStatisticsGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeploymentStatisticsGroupBy) Float64s

func (dsgb *DeploymentStatisticsGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatisticsGroupBy) Float64sX

func (dsgb *DeploymentStatisticsGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeploymentStatisticsGroupBy) Int

func (dsgb *DeploymentStatisticsGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatisticsGroupBy) IntX

IntX is like Int, but panics if an error occurs.

func (*DeploymentStatisticsGroupBy) Ints

func (dsgb *DeploymentStatisticsGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatisticsGroupBy) IntsX

func (dsgb *DeploymentStatisticsGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeploymentStatisticsGroupBy) Scan

func (dsgb *DeploymentStatisticsGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*DeploymentStatisticsGroupBy) ScanX

func (dsgb *DeploymentStatisticsGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*DeploymentStatisticsGroupBy) String

func (dsgb *DeploymentStatisticsGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatisticsGroupBy) StringX

StringX is like String, but panics if an error occurs.

func (*DeploymentStatisticsGroupBy) Strings

func (dsgb *DeploymentStatisticsGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatisticsGroupBy) StringsX

func (dsgb *DeploymentStatisticsGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeploymentStatisticsMutation

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

DeploymentStatisticsMutation represents an operation that mutates the DeploymentStatistics nodes in the graph.

func (*DeploymentStatisticsMutation) AddAdditions

func (m *DeploymentStatisticsMutation) AddAdditions(i int)

AddAdditions adds i to the "additions" field.

func (*DeploymentStatisticsMutation) AddChanges

func (m *DeploymentStatisticsMutation) AddChanges(i int)

AddChanges adds i to the "changes" field.

func (*DeploymentStatisticsMutation) AddCommitCount

func (m *DeploymentStatisticsMutation) AddCommitCount(i int)

AddCommitCount adds i to the "commit_count" field.

func (*DeploymentStatisticsMutation) AddCount

func (m *DeploymentStatisticsMutation) AddCount(i int)

AddCount adds i to the "count" field.

func (*DeploymentStatisticsMutation) AddDeletions

func (m *DeploymentStatisticsMutation) AddDeletions(i int)

AddDeletions adds i to the "deletions" field.

func (*DeploymentStatisticsMutation) AddField

func (m *DeploymentStatisticsMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeploymentStatisticsMutation) AddLeadTimeSeconds

func (m *DeploymentStatisticsMutation) AddLeadTimeSeconds(i int)

AddLeadTimeSeconds adds i to the "lead_time_seconds" field.

func (*DeploymentStatisticsMutation) AddRollbackCount

func (m *DeploymentStatisticsMutation) AddRollbackCount(i int)

AddRollbackCount adds i to the "rollback_count" field.

func (*DeploymentStatisticsMutation) AddedAdditions

func (m *DeploymentStatisticsMutation) AddedAdditions() (r int, exists bool)

AddedAdditions returns the value that was added to the "additions" field in this mutation.

func (*DeploymentStatisticsMutation) AddedChanges

func (m *DeploymentStatisticsMutation) AddedChanges() (r int, exists bool)

AddedChanges returns the value that was added to the "changes" field in this mutation.

func (*DeploymentStatisticsMutation) AddedCommitCount

func (m *DeploymentStatisticsMutation) AddedCommitCount() (r int, exists bool)

AddedCommitCount returns the value that was added to the "commit_count" field in this mutation.

func (*DeploymentStatisticsMutation) AddedCount

func (m *DeploymentStatisticsMutation) AddedCount() (r int, exists bool)

AddedCount returns the value that was added to the "count" field in this mutation.

func (*DeploymentStatisticsMutation) AddedDeletions

func (m *DeploymentStatisticsMutation) AddedDeletions() (r int, exists bool)

AddedDeletions returns the value that was added to the "deletions" field in this mutation.

func (*DeploymentStatisticsMutation) AddedEdges

func (m *DeploymentStatisticsMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DeploymentStatisticsMutation) AddedField

func (m *DeploymentStatisticsMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeploymentStatisticsMutation) AddedFields

func (m *DeploymentStatisticsMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DeploymentStatisticsMutation) AddedIDs

func (m *DeploymentStatisticsMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DeploymentStatisticsMutation) AddedLeadTimeSeconds

func (m *DeploymentStatisticsMutation) AddedLeadTimeSeconds() (r int, exists bool)

AddedLeadTimeSeconds returns the value that was added to the "lead_time_seconds" field in this mutation.

func (*DeploymentStatisticsMutation) AddedRollbackCount

func (m *DeploymentStatisticsMutation) AddedRollbackCount() (r int, exists bool)

AddedRollbackCount returns the value that was added to the "rollback_count" field in this mutation.

func (*DeploymentStatisticsMutation) Additions

func (m *DeploymentStatisticsMutation) Additions() (r int, exists bool)

Additions returns the value of the "additions" field in the mutation.

func (*DeploymentStatisticsMutation) Changes

func (m *DeploymentStatisticsMutation) Changes() (r int, exists bool)

Changes returns the value of the "changes" field in the mutation.

func (*DeploymentStatisticsMutation) ClearEdge

func (m *DeploymentStatisticsMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DeploymentStatisticsMutation) ClearField

func (m *DeploymentStatisticsMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeploymentStatisticsMutation) ClearRepo

func (m *DeploymentStatisticsMutation) ClearRepo()

ClearRepo clears the "repo" edge to the Repo entity.

func (*DeploymentStatisticsMutation) ClearedEdges

func (m *DeploymentStatisticsMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DeploymentStatisticsMutation) ClearedFields

func (m *DeploymentStatisticsMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DeploymentStatisticsMutation) Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*DeploymentStatisticsMutation) CommitCount

func (m *DeploymentStatisticsMutation) CommitCount() (r int, exists bool)

CommitCount returns the value of the "commit_count" field in the mutation.

func (*DeploymentStatisticsMutation) Count

func (m *DeploymentStatisticsMutation) Count() (r int, exists bool)

Count returns the value of the "count" field in the mutation.

func (*DeploymentStatisticsMutation) CreatedAt

func (m *DeploymentStatisticsMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DeploymentStatisticsMutation) Deletions

func (m *DeploymentStatisticsMutation) Deletions() (r int, exists bool)

Deletions returns the value of the "deletions" field in the mutation.

func (*DeploymentStatisticsMutation) EdgeCleared

func (m *DeploymentStatisticsMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DeploymentStatisticsMutation) Env

func (m *DeploymentStatisticsMutation) Env() (r string, exists bool)

Env returns the value of the "env" field in the mutation.

func (*DeploymentStatisticsMutation) Field

func (m *DeploymentStatisticsMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeploymentStatisticsMutation) FieldCleared

func (m *DeploymentStatisticsMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DeploymentStatisticsMutation) Fields

func (m *DeploymentStatisticsMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DeploymentStatisticsMutation) ID

func (m *DeploymentStatisticsMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DeploymentStatisticsMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DeploymentStatisticsMutation) LeadTimeSeconds

func (m *DeploymentStatisticsMutation) LeadTimeSeconds() (r int, exists bool)

LeadTimeSeconds returns the value of the "lead_time_seconds" field in the mutation.

func (*DeploymentStatisticsMutation) OldAdditions

func (m *DeploymentStatisticsMutation) OldAdditions(ctx context.Context) (v int, err error)

OldAdditions returns the old "additions" field's value of the DeploymentStatistics entity. If the DeploymentStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatisticsMutation) OldChanges

func (m *DeploymentStatisticsMutation) OldChanges(ctx context.Context) (v int, err error)

OldChanges returns the old "changes" field's value of the DeploymentStatistics entity. If the DeploymentStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatisticsMutation) OldCommitCount

func (m *DeploymentStatisticsMutation) OldCommitCount(ctx context.Context) (v int, err error)

OldCommitCount returns the old "commit_count" field's value of the DeploymentStatistics entity. If the DeploymentStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatisticsMutation) OldCount

func (m *DeploymentStatisticsMutation) OldCount(ctx context.Context) (v int, err error)

OldCount returns the old "count" field's value of the DeploymentStatistics entity. If the DeploymentStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatisticsMutation) OldCreatedAt

func (m *DeploymentStatisticsMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the DeploymentStatistics entity. If the DeploymentStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatisticsMutation) OldDeletions

func (m *DeploymentStatisticsMutation) OldDeletions(ctx context.Context) (v int, err error)

OldDeletions returns the old "deletions" field's value of the DeploymentStatistics entity. If the DeploymentStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatisticsMutation) OldEnv

func (m *DeploymentStatisticsMutation) OldEnv(ctx context.Context) (v string, err error)

OldEnv returns the old "env" field's value of the DeploymentStatistics entity. If the DeploymentStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatisticsMutation) OldField

func (m *DeploymentStatisticsMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DeploymentStatisticsMutation) OldLeadTimeSeconds

func (m *DeploymentStatisticsMutation) OldLeadTimeSeconds(ctx context.Context) (v int, err error)

OldLeadTimeSeconds returns the old "lead_time_seconds" field's value of the DeploymentStatistics entity. If the DeploymentStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatisticsMutation) OldRepoID

func (m *DeploymentStatisticsMutation) OldRepoID(ctx context.Context) (v int64, err error)

OldRepoID returns the old "repo_id" field's value of the DeploymentStatistics entity. If the DeploymentStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatisticsMutation) OldRollbackCount

func (m *DeploymentStatisticsMutation) OldRollbackCount(ctx context.Context) (v int, err error)

OldRollbackCount returns the old "rollback_count" field's value of the DeploymentStatistics entity. If the DeploymentStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatisticsMutation) OldUpdatedAt

func (m *DeploymentStatisticsMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the DeploymentStatistics entity. If the DeploymentStatistics object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatisticsMutation) Op

Op returns the operation name.

func (*DeploymentStatisticsMutation) RemovedEdges

func (m *DeploymentStatisticsMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DeploymentStatisticsMutation) RemovedIDs

func (m *DeploymentStatisticsMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DeploymentStatisticsMutation) RepoCleared

func (m *DeploymentStatisticsMutation) RepoCleared() bool

RepoCleared reports if the "repo" edge to the Repo entity was cleared.

func (*DeploymentStatisticsMutation) RepoID

func (m *DeploymentStatisticsMutation) RepoID() (r int64, exists bool)

RepoID returns the value of the "repo_id" field in the mutation.

func (*DeploymentStatisticsMutation) RepoIDs

func (m *DeploymentStatisticsMutation) RepoIDs() (ids []int64)

RepoIDs returns the "repo" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RepoID instead. It exists only for internal usage by the builders.

func (*DeploymentStatisticsMutation) ResetAdditions

func (m *DeploymentStatisticsMutation) ResetAdditions()

ResetAdditions resets all changes to the "additions" field.

func (*DeploymentStatisticsMutation) ResetChanges

func (m *DeploymentStatisticsMutation) ResetChanges()

ResetChanges resets all changes to the "changes" field.

func (*DeploymentStatisticsMutation) ResetCommitCount

func (m *DeploymentStatisticsMutation) ResetCommitCount()

ResetCommitCount resets all changes to the "commit_count" field.

func (*DeploymentStatisticsMutation) ResetCount

func (m *DeploymentStatisticsMutation) ResetCount()

ResetCount resets all changes to the "count" field.

func (*DeploymentStatisticsMutation) ResetCreatedAt

func (m *DeploymentStatisticsMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DeploymentStatisticsMutation) ResetDeletions

func (m *DeploymentStatisticsMutation) ResetDeletions()

ResetDeletions resets all changes to the "deletions" field.

func (*DeploymentStatisticsMutation) ResetEdge

func (m *DeploymentStatisticsMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DeploymentStatisticsMutation) ResetEnv

func (m *DeploymentStatisticsMutation) ResetEnv()

ResetEnv resets all changes to the "env" field.

func (*DeploymentStatisticsMutation) ResetField

func (m *DeploymentStatisticsMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeploymentStatisticsMutation) ResetLeadTimeSeconds

func (m *DeploymentStatisticsMutation) ResetLeadTimeSeconds()

ResetLeadTimeSeconds resets all changes to the "lead_time_seconds" field.

func (*DeploymentStatisticsMutation) ResetRepo

func (m *DeploymentStatisticsMutation) ResetRepo()

ResetRepo resets all changes to the "repo" edge.

func (*DeploymentStatisticsMutation) ResetRepoID

func (m *DeploymentStatisticsMutation) ResetRepoID()

ResetRepoID resets all changes to the "repo_id" field.

func (*DeploymentStatisticsMutation) ResetRollbackCount

func (m *DeploymentStatisticsMutation) ResetRollbackCount()

ResetRollbackCount resets all changes to the "rollback_count" field.

func (*DeploymentStatisticsMutation) ResetUpdatedAt

func (m *DeploymentStatisticsMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DeploymentStatisticsMutation) RollbackCount

func (m *DeploymentStatisticsMutation) RollbackCount() (r int, exists bool)

RollbackCount returns the value of the "rollback_count" field in the mutation.

func (*DeploymentStatisticsMutation) SetAdditions

func (m *DeploymentStatisticsMutation) SetAdditions(i int)

SetAdditions sets the "additions" field.

func (*DeploymentStatisticsMutation) SetChanges

func (m *DeploymentStatisticsMutation) SetChanges(i int)

SetChanges sets the "changes" field.

func (*DeploymentStatisticsMutation) SetCommitCount

func (m *DeploymentStatisticsMutation) SetCommitCount(i int)

SetCommitCount sets the "commit_count" field.

func (*DeploymentStatisticsMutation) SetCount

func (m *DeploymentStatisticsMutation) SetCount(i int)

SetCount sets the "count" field.

func (*DeploymentStatisticsMutation) SetCreatedAt

func (m *DeploymentStatisticsMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*DeploymentStatisticsMutation) SetDeletions

func (m *DeploymentStatisticsMutation) SetDeletions(i int)

SetDeletions sets the "deletions" field.

func (*DeploymentStatisticsMutation) SetEnv

func (m *DeploymentStatisticsMutation) SetEnv(s string)

SetEnv sets the "env" field.

func (*DeploymentStatisticsMutation) SetField

func (m *DeploymentStatisticsMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeploymentStatisticsMutation) SetLeadTimeSeconds

func (m *DeploymentStatisticsMutation) SetLeadTimeSeconds(i int)

SetLeadTimeSeconds sets the "lead_time_seconds" field.

func (*DeploymentStatisticsMutation) SetRepoID

func (m *DeploymentStatisticsMutation) SetRepoID(i int64)

SetRepoID sets the "repo_id" field.

func (*DeploymentStatisticsMutation) SetRollbackCount

func (m *DeploymentStatisticsMutation) SetRollbackCount(i int)

SetRollbackCount sets the "rollback_count" field.

func (*DeploymentStatisticsMutation) SetUpdatedAt

func (m *DeploymentStatisticsMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (DeploymentStatisticsMutation) Tx

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DeploymentStatisticsMutation) Type

Type returns the node type of this mutation (DeploymentStatistics).

func (*DeploymentStatisticsMutation) UpdatedAt

func (m *DeploymentStatisticsMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DeploymentStatisticsMutation) Where

Where appends a list predicates to the DeploymentStatisticsMutation builder.

type DeploymentStatisticsQuery

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

DeploymentStatisticsQuery is the builder for querying DeploymentStatistics entities.

func (*DeploymentStatisticsQuery) All

All executes the query and returns a list of DeploymentStatisticsSlice.

func (*DeploymentStatisticsQuery) AllX

AllX is like All, but panics if an error occurs.

func (*DeploymentStatisticsQuery) Clone

Clone returns a duplicate of the DeploymentStatisticsQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DeploymentStatisticsQuery) Count

func (dsq *DeploymentStatisticsQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeploymentStatisticsQuery) CountX

func (dsq *DeploymentStatisticsQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DeploymentStatisticsQuery) Exist

func (dsq *DeploymentStatisticsQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DeploymentStatisticsQuery) ExistX

func (dsq *DeploymentStatisticsQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DeploymentStatisticsQuery) First

First returns the first DeploymentStatistics entity from the query. Returns a *NotFoundError when no DeploymentStatistics was found.

func (*DeploymentStatisticsQuery) FirstID

func (dsq *DeploymentStatisticsQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first DeploymentStatistics ID from the query. Returns a *NotFoundError when no DeploymentStatistics ID was found.

func (*DeploymentStatisticsQuery) FirstIDX

func (dsq *DeploymentStatisticsQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*DeploymentStatisticsQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*DeploymentStatisticsQuery) ForShare

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*DeploymentStatisticsQuery) ForUpdate

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*DeploymentStatisticsQuery) GroupBy

func (dsq *DeploymentStatisticsQuery) GroupBy(field string, fields ...string) *DeploymentStatisticsGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Env string `json:"env"`
	Count int `json:"count,omitempty"`
}

client.DeploymentStatistics.Query().
	GroupBy(deploymentstatistics.FieldEnv).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeploymentStatisticsQuery) IDs

func (dsq *DeploymentStatisticsQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of DeploymentStatistics IDs.

func (*DeploymentStatisticsQuery) IDsX

func (dsq *DeploymentStatisticsQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*DeploymentStatisticsQuery) Limit

Limit adds a limit step to the query.

func (*DeploymentStatisticsQuery) Offset

Offset adds an offset step to the query.

func (*DeploymentStatisticsQuery) Only

Only returns a single DeploymentStatistics entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DeploymentStatistics entity is found. Returns a *NotFoundError when no DeploymentStatistics entities are found.

func (*DeploymentStatisticsQuery) OnlyID

func (dsq *DeploymentStatisticsQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only DeploymentStatistics ID in the query. Returns a *NotSingularError when more than one DeploymentStatistics ID is found. Returns a *NotFoundError when no entities are found.

func (*DeploymentStatisticsQuery) OnlyIDX

func (dsq *DeploymentStatisticsQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DeploymentStatisticsQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*DeploymentStatisticsQuery) Order

Order adds an order step to the query.

func (*DeploymentStatisticsQuery) QueryRepo

func (dsq *DeploymentStatisticsQuery) QueryRepo() *RepoQuery

QueryRepo chains the current query on the "repo" edge.

func (*DeploymentStatisticsQuery) Select

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Env string `json:"env"`
}

client.DeploymentStatistics.Query().
	Select(deploymentstatistics.FieldEnv).
	Scan(ctx, &v)

func (*DeploymentStatisticsQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DeploymentStatisticsQuery) Where

Where adds a new predicate for the DeploymentStatisticsQuery builder.

func (*DeploymentStatisticsQuery) WithRepo

func (dsq *DeploymentStatisticsQuery) WithRepo(opts ...func(*RepoQuery)) *DeploymentStatisticsQuery

WithRepo tells the query-builder to eager-load the nodes that are connected to the "repo" edge. The optional arguments are used to configure the query builder of the edge.

type DeploymentStatisticsSelect

type DeploymentStatisticsSelect struct {
	*DeploymentStatisticsQuery
	// contains filtered or unexported fields
}

DeploymentStatisticsSelect is the builder for selecting fields of DeploymentStatistics entities.

func (*DeploymentStatisticsSelect) Bool

func (dss *DeploymentStatisticsSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeploymentStatisticsSelect) BoolX

BoolX is like Bool, but panics if an error occurs.

func (*DeploymentStatisticsSelect) Bools

func (dss *DeploymentStatisticsSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeploymentStatisticsSelect) BoolsX

func (dss *DeploymentStatisticsSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeploymentStatisticsSelect) Float64

func (dss *DeploymentStatisticsSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeploymentStatisticsSelect) Float64X

Float64X is like Float64, but panics if an error occurs.

func (*DeploymentStatisticsSelect) Float64s

func (dss *DeploymentStatisticsSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeploymentStatisticsSelect) Float64sX

func (dss *DeploymentStatisticsSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeploymentStatisticsSelect) Int

func (dss *DeploymentStatisticsSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeploymentStatisticsSelect) IntX

IntX is like Int, but panics if an error occurs.

func (*DeploymentStatisticsSelect) Ints

func (dss *DeploymentStatisticsSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeploymentStatisticsSelect) IntsX

func (dss *DeploymentStatisticsSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeploymentStatisticsSelect) Scan

func (dss *DeploymentStatisticsSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*DeploymentStatisticsSelect) ScanX

func (dss *DeploymentStatisticsSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*DeploymentStatisticsSelect) String

func (dss *DeploymentStatisticsSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeploymentStatisticsSelect) StringX

StringX is like String, but panics if an error occurs.

func (*DeploymentStatisticsSelect) Strings

func (dss *DeploymentStatisticsSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeploymentStatisticsSelect) StringsX

func (dss *DeploymentStatisticsSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeploymentStatisticsSlice

type DeploymentStatisticsSlice []*DeploymentStatistics

DeploymentStatisticsSlice is a parsable slice of DeploymentStatistics.

type DeploymentStatisticsUpdate

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

DeploymentStatisticsUpdate is the builder for updating DeploymentStatistics entities.

func (*DeploymentStatisticsUpdate) AddAdditions

AddAdditions adds i to the "additions" field.

func (*DeploymentStatisticsUpdate) AddChanges

AddChanges adds i to the "changes" field.

func (*DeploymentStatisticsUpdate) AddCommitCount

AddCommitCount adds i to the "commit_count" field.

func (*DeploymentStatisticsUpdate) AddCount

AddCount adds i to the "count" field.

func (*DeploymentStatisticsUpdate) AddDeletions

AddDeletions adds i to the "deletions" field.

func (*DeploymentStatisticsUpdate) AddLeadTimeSeconds

func (dsu *DeploymentStatisticsUpdate) AddLeadTimeSeconds(i int) *DeploymentStatisticsUpdate

AddLeadTimeSeconds adds i to the "lead_time_seconds" field.

func (*DeploymentStatisticsUpdate) AddRollbackCount

func (dsu *DeploymentStatisticsUpdate) AddRollbackCount(i int) *DeploymentStatisticsUpdate

AddRollbackCount adds i to the "rollback_count" field.

func (*DeploymentStatisticsUpdate) ClearRepo

ClearRepo clears the "repo" edge to the Repo entity.

func (*DeploymentStatisticsUpdate) Exec

Exec executes the query.

func (*DeploymentStatisticsUpdate) ExecX

func (dsu *DeploymentStatisticsUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentStatisticsUpdate) Mutation

Mutation returns the DeploymentStatisticsMutation object of the builder.

func (*DeploymentStatisticsUpdate) Save

Save executes the query and returns the number of nodes affected by the update operation.

func (*DeploymentStatisticsUpdate) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DeploymentStatisticsUpdate) SetAdditions

SetAdditions sets the "additions" field.

func (*DeploymentStatisticsUpdate) SetChanges

SetChanges sets the "changes" field.

func (*DeploymentStatisticsUpdate) SetCommitCount

SetCommitCount sets the "commit_count" field.

func (*DeploymentStatisticsUpdate) SetCount

SetCount sets the "count" field.

func (*DeploymentStatisticsUpdate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*DeploymentStatisticsUpdate) SetDeletions

SetDeletions sets the "deletions" field.

func (*DeploymentStatisticsUpdate) SetEnv

SetEnv sets the "env" field.

func (*DeploymentStatisticsUpdate) SetLeadTimeSeconds

func (dsu *DeploymentStatisticsUpdate) SetLeadTimeSeconds(i int) *DeploymentStatisticsUpdate

SetLeadTimeSeconds sets the "lead_time_seconds" field.

func (*DeploymentStatisticsUpdate) SetNillableAdditions

func (dsu *DeploymentStatisticsUpdate) SetNillableAdditions(i *int) *DeploymentStatisticsUpdate

SetNillableAdditions sets the "additions" field if the given value is not nil.

func (*DeploymentStatisticsUpdate) SetNillableChanges

func (dsu *DeploymentStatisticsUpdate) SetNillableChanges(i *int) *DeploymentStatisticsUpdate

SetNillableChanges sets the "changes" field if the given value is not nil.

func (*DeploymentStatisticsUpdate) SetNillableCommitCount

func (dsu *DeploymentStatisticsUpdate) SetNillableCommitCount(i *int) *DeploymentStatisticsUpdate

SetNillableCommitCount sets the "commit_count" field if the given value is not nil.

func (*DeploymentStatisticsUpdate) SetNillableCount

func (dsu *DeploymentStatisticsUpdate) SetNillableCount(i *int) *DeploymentStatisticsUpdate

SetNillableCount sets the "count" field if the given value is not nil.

func (*DeploymentStatisticsUpdate) SetNillableCreatedAt

func (dsu *DeploymentStatisticsUpdate) SetNillableCreatedAt(t *time.Time) *DeploymentStatisticsUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeploymentStatisticsUpdate) SetNillableDeletions

func (dsu *DeploymentStatisticsUpdate) SetNillableDeletions(i *int) *DeploymentStatisticsUpdate

SetNillableDeletions sets the "deletions" field if the given value is not nil.

func (*DeploymentStatisticsUpdate) SetNillableLeadTimeSeconds

func (dsu *DeploymentStatisticsUpdate) SetNillableLeadTimeSeconds(i *int) *DeploymentStatisticsUpdate

SetNillableLeadTimeSeconds sets the "lead_time_seconds" field if the given value is not nil.

func (*DeploymentStatisticsUpdate) SetNillableRollbackCount

func (dsu *DeploymentStatisticsUpdate) SetNillableRollbackCount(i *int) *DeploymentStatisticsUpdate

SetNillableRollbackCount sets the "rollback_count" field if the given value is not nil.

func (*DeploymentStatisticsUpdate) SetRepo

SetRepo sets the "repo" edge to the Repo entity.

func (*DeploymentStatisticsUpdate) SetRepoID

SetRepoID sets the "repo_id" field.

func (*DeploymentStatisticsUpdate) SetRollbackCount

func (dsu *DeploymentStatisticsUpdate) SetRollbackCount(i int) *DeploymentStatisticsUpdate

SetRollbackCount sets the "rollback_count" field.

func (*DeploymentStatisticsUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentStatisticsUpdate) Where

Where appends a list predicates to the DeploymentStatisticsUpdate builder.

type DeploymentStatisticsUpdateOne

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

DeploymentStatisticsUpdateOne is the builder for updating a single DeploymentStatistics entity.

func (*DeploymentStatisticsUpdateOne) AddAdditions

AddAdditions adds i to the "additions" field.

func (*DeploymentStatisticsUpdateOne) AddChanges

AddChanges adds i to the "changes" field.

func (*DeploymentStatisticsUpdateOne) AddCommitCount

AddCommitCount adds i to the "commit_count" field.

func (*DeploymentStatisticsUpdateOne) AddCount

AddCount adds i to the "count" field.

func (*DeploymentStatisticsUpdateOne) AddDeletions

AddDeletions adds i to the "deletions" field.

func (*DeploymentStatisticsUpdateOne) AddLeadTimeSeconds

AddLeadTimeSeconds adds i to the "lead_time_seconds" field.

func (*DeploymentStatisticsUpdateOne) AddRollbackCount

AddRollbackCount adds i to the "rollback_count" field.

func (*DeploymentStatisticsUpdateOne) ClearRepo

ClearRepo clears the "repo" edge to the Repo entity.

func (*DeploymentStatisticsUpdateOne) Exec

Exec executes the query on the entity.

func (*DeploymentStatisticsUpdateOne) ExecX

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentStatisticsUpdateOne) Mutation

Mutation returns the DeploymentStatisticsMutation object of the builder.

func (*DeploymentStatisticsUpdateOne) Save

Save executes the query and returns the updated DeploymentStatistics entity.

func (*DeploymentStatisticsUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DeploymentStatisticsUpdateOne) Select

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DeploymentStatisticsUpdateOne) SetAdditions

SetAdditions sets the "additions" field.

func (*DeploymentStatisticsUpdateOne) SetChanges

SetChanges sets the "changes" field.

func (*DeploymentStatisticsUpdateOne) SetCommitCount

SetCommitCount sets the "commit_count" field.

func (*DeploymentStatisticsUpdateOne) SetCount

SetCount sets the "count" field.

func (*DeploymentStatisticsUpdateOne) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*DeploymentStatisticsUpdateOne) SetDeletions

SetDeletions sets the "deletions" field.

func (*DeploymentStatisticsUpdateOne) SetEnv

SetEnv sets the "env" field.

func (*DeploymentStatisticsUpdateOne) SetLeadTimeSeconds

SetLeadTimeSeconds sets the "lead_time_seconds" field.

func (*DeploymentStatisticsUpdateOne) SetNillableAdditions

func (dsuo *DeploymentStatisticsUpdateOne) SetNillableAdditions(i *int) *DeploymentStatisticsUpdateOne

SetNillableAdditions sets the "additions" field if the given value is not nil.

func (*DeploymentStatisticsUpdateOne) SetNillableChanges

func (dsuo *DeploymentStatisticsUpdateOne) SetNillableChanges(i *int) *DeploymentStatisticsUpdateOne

SetNillableChanges sets the "changes" field if the given value is not nil.

func (*DeploymentStatisticsUpdateOne) SetNillableCommitCount

func (dsuo *DeploymentStatisticsUpdateOne) SetNillableCommitCount(i *int) *DeploymentStatisticsUpdateOne

SetNillableCommitCount sets the "commit_count" field if the given value is not nil.

func (*DeploymentStatisticsUpdateOne) SetNillableCount

SetNillableCount sets the "count" field if the given value is not nil.

func (*DeploymentStatisticsUpdateOne) SetNillableCreatedAt

func (dsuo *DeploymentStatisticsUpdateOne) SetNillableCreatedAt(t *time.Time) *DeploymentStatisticsUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeploymentStatisticsUpdateOne) SetNillableDeletions

func (dsuo *DeploymentStatisticsUpdateOne) SetNillableDeletions(i *int) *DeploymentStatisticsUpdateOne

SetNillableDeletions sets the "deletions" field if the given value is not nil.

func (*DeploymentStatisticsUpdateOne) SetNillableLeadTimeSeconds

func (dsuo *DeploymentStatisticsUpdateOne) SetNillableLeadTimeSeconds(i *int) *DeploymentStatisticsUpdateOne

SetNillableLeadTimeSeconds sets the "lead_time_seconds" field if the given value is not nil.

func (*DeploymentStatisticsUpdateOne) SetNillableRollbackCount

func (dsuo *DeploymentStatisticsUpdateOne) SetNillableRollbackCount(i *int) *DeploymentStatisticsUpdateOne

SetNillableRollbackCount sets the "rollback_count" field if the given value is not nil.

func (*DeploymentStatisticsUpdateOne) SetRepo

SetRepo sets the "repo" edge to the Repo entity.

func (*DeploymentStatisticsUpdateOne) SetRepoID

SetRepoID sets the "repo_id" field.

func (*DeploymentStatisticsUpdateOne) SetRollbackCount

SetRollbackCount sets the "rollback_count" field.

func (*DeploymentStatisticsUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type DeploymentStatus

type DeploymentStatus struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Status holds the value of the "status" field.
	Status string `json:"status"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitemtpy"`
	// LogURL holds the value of the "log_url" field.
	LogURL string `json:"log_url,omitemtpy"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at"`
	// DeploymentID holds the value of the "deployment_id" field.
	DeploymentID int `json:"deployment_id"`
	// RepoID holds the value of the "repo_id" field.
	RepoID int64 `json:"repo_id,omitemtpy"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the DeploymentStatusQuery when eager-loading is set.
	Edges DeploymentStatusEdges `json:"edges"`
	// contains filtered or unexported fields
}

DeploymentStatus is the model entity for the DeploymentStatus schema.

func (*DeploymentStatus) QueryDeployment

func (ds *DeploymentStatus) QueryDeployment() *DeploymentQuery

QueryDeployment queries the "deployment" edge of the DeploymentStatus entity.

func (*DeploymentStatus) QueryEvent

func (ds *DeploymentStatus) QueryEvent() *EventQuery

QueryEvent queries the "event" edge of the DeploymentStatus entity.

func (*DeploymentStatus) QueryRepo

func (ds *DeploymentStatus) QueryRepo() *RepoQuery

QueryRepo queries the "repo" edge of the DeploymentStatus entity.

func (*DeploymentStatus) String

func (ds *DeploymentStatus) String() string

String implements the fmt.Stringer.

func (*DeploymentStatus) Unwrap

func (ds *DeploymentStatus) Unwrap() *DeploymentStatus

Unwrap unwraps the DeploymentStatus entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*DeploymentStatus) Update

Update returns a builder for updating this DeploymentStatus. Note that you need to call DeploymentStatus.Unwrap() before calling this method if this DeploymentStatus was returned from a transaction, and the transaction was committed or rolled back.

type DeploymentStatusClient

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

DeploymentStatusClient is a client for the DeploymentStatus schema.

func NewDeploymentStatusClient

func NewDeploymentStatusClient(c config) *DeploymentStatusClient

NewDeploymentStatusClient returns a client for the DeploymentStatus from the given config.

func (*DeploymentStatusClient) Create

Create returns a create builder for DeploymentStatus.

func (*DeploymentStatusClient) CreateBulk

CreateBulk returns a builder for creating a bulk of DeploymentStatus entities.

func (*DeploymentStatusClient) Delete

Delete returns a delete builder for DeploymentStatus.

func (*DeploymentStatusClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*DeploymentStatusClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*DeploymentStatusClient) Get

Get returns a DeploymentStatus entity by its id.

func (*DeploymentStatusClient) GetX

GetX is like Get, but panics if an error occurs.

func (*DeploymentStatusClient) Hooks

func (c *DeploymentStatusClient) Hooks() []Hook

Hooks returns the client hooks.

func (*DeploymentStatusClient) Query

Query returns a query builder for DeploymentStatus.

func (*DeploymentStatusClient) QueryDeployment

func (c *DeploymentStatusClient) QueryDeployment(ds *DeploymentStatus) *DeploymentQuery

QueryDeployment queries the deployment edge of a DeploymentStatus.

func (*DeploymentStatusClient) QueryEvent

QueryEvent queries the event edge of a DeploymentStatus.

func (*DeploymentStatusClient) QueryRepo

QueryRepo queries the repo edge of a DeploymentStatus.

func (*DeploymentStatusClient) Update

Update returns an update builder for DeploymentStatus.

func (*DeploymentStatusClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*DeploymentStatusClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*DeploymentStatusClient) Use

func (c *DeploymentStatusClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `deploymentstatus.Hooks(f(g(h())))`.

type DeploymentStatusCreate

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

DeploymentStatusCreate is the builder for creating a DeploymentStatus entity.

func (*DeploymentStatusCreate) AddEvent

func (dsc *DeploymentStatusCreate) AddEvent(e ...*Event) *DeploymentStatusCreate

AddEvent adds the "event" edges to the Event entity.

func (*DeploymentStatusCreate) AddEventIDs

func (dsc *DeploymentStatusCreate) AddEventIDs(ids ...int) *DeploymentStatusCreate

AddEventIDs adds the "event" edge to the Event entity by IDs.

func (*DeploymentStatusCreate) Exec

Exec executes the query.

func (*DeploymentStatusCreate) ExecX

func (dsc *DeploymentStatusCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentStatusCreate) Mutation

Mutation returns the DeploymentStatusMutation object of the builder.

func (*DeploymentStatusCreate) Save

Save creates the DeploymentStatus in the database.

func (*DeploymentStatusCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*DeploymentStatusCreate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*DeploymentStatusCreate) SetDeployment

SetDeployment sets the "deployment" edge to the Deployment entity.

func (*DeploymentStatusCreate) SetDeploymentID

func (dsc *DeploymentStatusCreate) SetDeploymentID(i int) *DeploymentStatusCreate

SetDeploymentID sets the "deployment_id" field.

func (*DeploymentStatusCreate) SetDescription

func (dsc *DeploymentStatusCreate) SetDescription(s string) *DeploymentStatusCreate

SetDescription sets the "description" field.

func (*DeploymentStatusCreate) SetLogURL

SetLogURL sets the "log_url" field.

func (*DeploymentStatusCreate) SetNillableCreatedAt

func (dsc *DeploymentStatusCreate) SetNillableCreatedAt(t *time.Time) *DeploymentStatusCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeploymentStatusCreate) SetNillableDescription

func (dsc *DeploymentStatusCreate) SetNillableDescription(s *string) *DeploymentStatusCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*DeploymentStatusCreate) SetNillableLogURL

func (dsc *DeploymentStatusCreate) SetNillableLogURL(s *string) *DeploymentStatusCreate

SetNillableLogURL sets the "log_url" field if the given value is not nil.

func (*DeploymentStatusCreate) SetNillableRepoID

func (dsc *DeploymentStatusCreate) SetNillableRepoID(i *int64) *DeploymentStatusCreate

SetNillableRepoID sets the "repo_id" field if the given value is not nil.

func (*DeploymentStatusCreate) SetNillableUpdatedAt

func (dsc *DeploymentStatusCreate) SetNillableUpdatedAt(t *time.Time) *DeploymentStatusCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*DeploymentStatusCreate) SetRepo

SetRepo sets the "repo" edge to the Repo entity.

func (*DeploymentStatusCreate) SetRepoID

SetRepoID sets the "repo_id" field.

func (*DeploymentStatusCreate) SetStatus

SetStatus sets the "status" field.

func (*DeploymentStatusCreate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type DeploymentStatusCreateBulk

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

DeploymentStatusCreateBulk is the builder for creating many DeploymentStatus entities in bulk.

func (*DeploymentStatusCreateBulk) Exec

Exec executes the query.

func (*DeploymentStatusCreateBulk) ExecX

func (dscb *DeploymentStatusCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentStatusCreateBulk) Save

Save creates the DeploymentStatus entities in the database.

func (*DeploymentStatusCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type DeploymentStatusDelete

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

DeploymentStatusDelete is the builder for deleting a DeploymentStatus entity.

func (*DeploymentStatusDelete) Exec

func (dsd *DeploymentStatusDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*DeploymentStatusDelete) ExecX

func (dsd *DeploymentStatusDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentStatusDelete) Where

Where appends a list predicates to the DeploymentStatusDelete builder.

type DeploymentStatusDeleteOne

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

DeploymentStatusDeleteOne is the builder for deleting a single DeploymentStatus entity.

func (*DeploymentStatusDeleteOne) Exec

Exec executes the deletion query.

func (*DeploymentStatusDeleteOne) ExecX

func (dsdo *DeploymentStatusDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type DeploymentStatusEdges

type DeploymentStatusEdges struct {
	// Deployment holds the value of the deployment edge.
	Deployment *Deployment `json:"deployment,omitempty"`
	// Repo holds the value of the repo edge.
	Repo *Repo `json:"repo,omitempty"`
	// Event holds the value of the event edge.
	Event []*Event `json:"event,omitempty"`
	// contains filtered or unexported fields
}

DeploymentStatusEdges holds the relations/edges for other nodes in the graph.

func (DeploymentStatusEdges) DeploymentOrErr

func (e DeploymentStatusEdges) DeploymentOrErr() (*Deployment, error)

DeploymentOrErr returns the Deployment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (DeploymentStatusEdges) EventOrErr

func (e DeploymentStatusEdges) EventOrErr() ([]*Event, error)

EventOrErr returns the Event value or an error if the edge was not loaded in eager-loading.

func (DeploymentStatusEdges) RepoOrErr

func (e DeploymentStatusEdges) RepoOrErr() (*Repo, error)

RepoOrErr returns the Repo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type DeploymentStatusGroupBy

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

DeploymentStatusGroupBy is the group-by builder for DeploymentStatus entities.

func (*DeploymentStatusGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*DeploymentStatusGroupBy) Bool

func (dsgb *DeploymentStatusGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatusGroupBy) BoolX

func (dsgb *DeploymentStatusGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeploymentStatusGroupBy) Bools

func (dsgb *DeploymentStatusGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatusGroupBy) BoolsX

func (dsgb *DeploymentStatusGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeploymentStatusGroupBy) Float64

func (dsgb *DeploymentStatusGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatusGroupBy) Float64X

func (dsgb *DeploymentStatusGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeploymentStatusGroupBy) Float64s

func (dsgb *DeploymentStatusGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatusGroupBy) Float64sX

func (dsgb *DeploymentStatusGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeploymentStatusGroupBy) Int

func (dsgb *DeploymentStatusGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatusGroupBy) IntX

func (dsgb *DeploymentStatusGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeploymentStatusGroupBy) Ints

func (dsgb *DeploymentStatusGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatusGroupBy) IntsX

func (dsgb *DeploymentStatusGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeploymentStatusGroupBy) Scan

func (dsgb *DeploymentStatusGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*DeploymentStatusGroupBy) ScanX

func (dsgb *DeploymentStatusGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*DeploymentStatusGroupBy) String

func (dsgb *DeploymentStatusGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatusGroupBy) StringX

func (dsgb *DeploymentStatusGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeploymentStatusGroupBy) Strings

func (dsgb *DeploymentStatusGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*DeploymentStatusGroupBy) StringsX

func (dsgb *DeploymentStatusGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeploymentStatusMutation

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

DeploymentStatusMutation represents an operation that mutates the DeploymentStatus nodes in the graph.

func (*DeploymentStatusMutation) AddEventIDs

func (m *DeploymentStatusMutation) AddEventIDs(ids ...int)

AddEventIDs adds the "event" edge to the Event entity by ids.

func (*DeploymentStatusMutation) AddField

func (m *DeploymentStatusMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeploymentStatusMutation) AddedEdges

func (m *DeploymentStatusMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*DeploymentStatusMutation) AddedField

func (m *DeploymentStatusMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeploymentStatusMutation) AddedFields

func (m *DeploymentStatusMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*DeploymentStatusMutation) AddedIDs

func (m *DeploymentStatusMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*DeploymentStatusMutation) ClearDeployment

func (m *DeploymentStatusMutation) ClearDeployment()

ClearDeployment clears the "deployment" edge to the Deployment entity.

func (*DeploymentStatusMutation) ClearDescription

func (m *DeploymentStatusMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*DeploymentStatusMutation) ClearEdge

func (m *DeploymentStatusMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*DeploymentStatusMutation) ClearEvent

func (m *DeploymentStatusMutation) ClearEvent()

ClearEvent clears the "event" edge to the Event entity.

func (*DeploymentStatusMutation) ClearField

func (m *DeploymentStatusMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeploymentStatusMutation) ClearLogURL

func (m *DeploymentStatusMutation) ClearLogURL()

ClearLogURL clears the value of the "log_url" field.

func (*DeploymentStatusMutation) ClearRepo

func (m *DeploymentStatusMutation) ClearRepo()

ClearRepo clears the "repo" edge to the Repo entity.

func (*DeploymentStatusMutation) ClearRepoID

func (m *DeploymentStatusMutation) ClearRepoID()

ClearRepoID clears the value of the "repo_id" field.

func (*DeploymentStatusMutation) ClearedEdges

func (m *DeploymentStatusMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*DeploymentStatusMutation) ClearedFields

func (m *DeploymentStatusMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (DeploymentStatusMutation) Client

func (m DeploymentStatusMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*DeploymentStatusMutation) CreatedAt

func (m *DeploymentStatusMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*DeploymentStatusMutation) DeploymentCleared

func (m *DeploymentStatusMutation) DeploymentCleared() bool

DeploymentCleared reports if the "deployment" edge to the Deployment entity was cleared.

func (*DeploymentStatusMutation) DeploymentID

func (m *DeploymentStatusMutation) DeploymentID() (r int, exists bool)

DeploymentID returns the value of the "deployment_id" field in the mutation.

func (*DeploymentStatusMutation) DeploymentIDs

func (m *DeploymentStatusMutation) DeploymentIDs() (ids []int)

DeploymentIDs returns the "deployment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DeploymentID instead. It exists only for internal usage by the builders.

func (*DeploymentStatusMutation) Description

func (m *DeploymentStatusMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*DeploymentStatusMutation) DescriptionCleared

func (m *DeploymentStatusMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*DeploymentStatusMutation) EdgeCleared

func (m *DeploymentStatusMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*DeploymentStatusMutation) EventCleared

func (m *DeploymentStatusMutation) EventCleared() bool

EventCleared reports if the "event" edge to the Event entity was cleared.

func (*DeploymentStatusMutation) EventIDs

func (m *DeploymentStatusMutation) EventIDs() (ids []int)

EventIDs returns the "event" edge IDs in the mutation.

func (*DeploymentStatusMutation) Field

func (m *DeploymentStatusMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*DeploymentStatusMutation) FieldCleared

func (m *DeploymentStatusMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*DeploymentStatusMutation) Fields

func (m *DeploymentStatusMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*DeploymentStatusMutation) ID

func (m *DeploymentStatusMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*DeploymentStatusMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*DeploymentStatusMutation) LogURL

func (m *DeploymentStatusMutation) LogURL() (r string, exists bool)

LogURL returns the value of the "log_url" field in the mutation.

func (*DeploymentStatusMutation) LogURLCleared

func (m *DeploymentStatusMutation) LogURLCleared() bool

LogURLCleared returns if the "log_url" field was cleared in this mutation.

func (*DeploymentStatusMutation) OldCreatedAt

func (m *DeploymentStatusMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the DeploymentStatus entity. If the DeploymentStatus object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatusMutation) OldDeploymentID

func (m *DeploymentStatusMutation) OldDeploymentID(ctx context.Context) (v int, err error)

OldDeploymentID returns the old "deployment_id" field's value of the DeploymentStatus entity. If the DeploymentStatus object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatusMutation) OldDescription

func (m *DeploymentStatusMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the DeploymentStatus entity. If the DeploymentStatus object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatusMutation) OldField

func (m *DeploymentStatusMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*DeploymentStatusMutation) OldLogURL

func (m *DeploymentStatusMutation) OldLogURL(ctx context.Context) (v string, err error)

OldLogURL returns the old "log_url" field's value of the DeploymentStatus entity. If the DeploymentStatus object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatusMutation) OldRepoID

func (m *DeploymentStatusMutation) OldRepoID(ctx context.Context) (v int64, err error)

OldRepoID returns the old "repo_id" field's value of the DeploymentStatus entity. If the DeploymentStatus object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatusMutation) OldStatus

func (m *DeploymentStatusMutation) OldStatus(ctx context.Context) (v string, err error)

OldStatus returns the old "status" field's value of the DeploymentStatus entity. If the DeploymentStatus object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatusMutation) OldUpdatedAt

func (m *DeploymentStatusMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the DeploymentStatus entity. If the DeploymentStatus object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*DeploymentStatusMutation) Op

func (m *DeploymentStatusMutation) Op() Op

Op returns the operation name.

func (*DeploymentStatusMutation) RemoveEventIDs

func (m *DeploymentStatusMutation) RemoveEventIDs(ids ...int)

RemoveEventIDs removes the "event" edge to the Event entity by IDs.

func (*DeploymentStatusMutation) RemovedEdges

func (m *DeploymentStatusMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*DeploymentStatusMutation) RemovedEventIDs

func (m *DeploymentStatusMutation) RemovedEventIDs() (ids []int)

RemovedEvent returns the removed IDs of the "event" edge to the Event entity.

func (*DeploymentStatusMutation) RemovedIDs

func (m *DeploymentStatusMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*DeploymentStatusMutation) RepoCleared

func (m *DeploymentStatusMutation) RepoCleared() bool

RepoCleared reports if the "repo" edge to the Repo entity was cleared.

func (*DeploymentStatusMutation) RepoID

func (m *DeploymentStatusMutation) RepoID() (r int64, exists bool)

RepoID returns the value of the "repo_id" field in the mutation.

func (*DeploymentStatusMutation) RepoIDCleared

func (m *DeploymentStatusMutation) RepoIDCleared() bool

RepoIDCleared returns if the "repo_id" field was cleared in this mutation.

func (*DeploymentStatusMutation) RepoIDs

func (m *DeploymentStatusMutation) RepoIDs() (ids []int64)

RepoIDs returns the "repo" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RepoID instead. It exists only for internal usage by the builders.

func (*DeploymentStatusMutation) ResetCreatedAt

func (m *DeploymentStatusMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*DeploymentStatusMutation) ResetDeployment

func (m *DeploymentStatusMutation) ResetDeployment()

ResetDeployment resets all changes to the "deployment" edge.

func (*DeploymentStatusMutation) ResetDeploymentID

func (m *DeploymentStatusMutation) ResetDeploymentID()

ResetDeploymentID resets all changes to the "deployment_id" field.

func (*DeploymentStatusMutation) ResetDescription

func (m *DeploymentStatusMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*DeploymentStatusMutation) ResetEdge

func (m *DeploymentStatusMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*DeploymentStatusMutation) ResetEvent

func (m *DeploymentStatusMutation) ResetEvent()

ResetEvent resets all changes to the "event" edge.

func (*DeploymentStatusMutation) ResetField

func (m *DeploymentStatusMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*DeploymentStatusMutation) ResetLogURL

func (m *DeploymentStatusMutation) ResetLogURL()

ResetLogURL resets all changes to the "log_url" field.

func (*DeploymentStatusMutation) ResetRepo

func (m *DeploymentStatusMutation) ResetRepo()

ResetRepo resets all changes to the "repo" edge.

func (*DeploymentStatusMutation) ResetRepoID

func (m *DeploymentStatusMutation) ResetRepoID()

ResetRepoID resets all changes to the "repo_id" field.

func (*DeploymentStatusMutation) ResetStatus

func (m *DeploymentStatusMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*DeploymentStatusMutation) ResetUpdatedAt

func (m *DeploymentStatusMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*DeploymentStatusMutation) SetCreatedAt

func (m *DeploymentStatusMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*DeploymentStatusMutation) SetDeploymentID

func (m *DeploymentStatusMutation) SetDeploymentID(i int)

SetDeploymentID sets the "deployment_id" field.

func (*DeploymentStatusMutation) SetDescription

func (m *DeploymentStatusMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*DeploymentStatusMutation) SetField

func (m *DeploymentStatusMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*DeploymentStatusMutation) SetLogURL

func (m *DeploymentStatusMutation) SetLogURL(s string)

SetLogURL sets the "log_url" field.

func (*DeploymentStatusMutation) SetRepoID

func (m *DeploymentStatusMutation) SetRepoID(i int64)

SetRepoID sets the "repo_id" field.

func (*DeploymentStatusMutation) SetStatus

func (m *DeploymentStatusMutation) SetStatus(s string)

SetStatus sets the "status" field.

func (*DeploymentStatusMutation) SetUpdatedAt

func (m *DeploymentStatusMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentStatusMutation) Status

func (m *DeploymentStatusMutation) Status() (r string, exists bool)

Status returns the value of the "status" field in the mutation.

func (DeploymentStatusMutation) Tx

func (m DeploymentStatusMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*DeploymentStatusMutation) Type

func (m *DeploymentStatusMutation) Type() string

Type returns the node type of this mutation (DeploymentStatus).

func (*DeploymentStatusMutation) UpdatedAt

func (m *DeploymentStatusMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*DeploymentStatusMutation) Where

Where appends a list predicates to the DeploymentStatusMutation builder.

type DeploymentStatusQuery

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

DeploymentStatusQuery is the builder for querying DeploymentStatus entities.

func (*DeploymentStatusQuery) All

All executes the query and returns a list of DeploymentStatusSlice.

func (*DeploymentStatusQuery) AllX

AllX is like All, but panics if an error occurs.

func (*DeploymentStatusQuery) Clone

Clone returns a duplicate of the DeploymentStatusQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*DeploymentStatusQuery) Count

func (dsq *DeploymentStatusQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*DeploymentStatusQuery) CountX

func (dsq *DeploymentStatusQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*DeploymentStatusQuery) Exist

func (dsq *DeploymentStatusQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*DeploymentStatusQuery) ExistX

func (dsq *DeploymentStatusQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*DeploymentStatusQuery) First

First returns the first DeploymentStatus entity from the query. Returns a *NotFoundError when no DeploymentStatus was found.

func (*DeploymentStatusQuery) FirstID

func (dsq *DeploymentStatusQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first DeploymentStatus ID from the query. Returns a *NotFoundError when no DeploymentStatus ID was found.

func (*DeploymentStatusQuery) FirstIDX

func (dsq *DeploymentStatusQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*DeploymentStatusQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*DeploymentStatusQuery) ForShare

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*DeploymentStatusQuery) ForUpdate

func (dsq *DeploymentStatusQuery) ForUpdate(opts ...sql.LockOption) *DeploymentStatusQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*DeploymentStatusQuery) GroupBy

func (dsq *DeploymentStatusQuery) GroupBy(field string, fields ...string) *DeploymentStatusGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Status string `json:"status"`
	Count int `json:"count,omitempty"`
}

client.DeploymentStatus.Query().
	GroupBy(deploymentstatus.FieldStatus).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*DeploymentStatusQuery) IDs

func (dsq *DeploymentStatusQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of DeploymentStatus IDs.

func (*DeploymentStatusQuery) IDsX

func (dsq *DeploymentStatusQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*DeploymentStatusQuery) Limit

func (dsq *DeploymentStatusQuery) Limit(limit int) *DeploymentStatusQuery

Limit adds a limit step to the query.

func (*DeploymentStatusQuery) Offset

func (dsq *DeploymentStatusQuery) Offset(offset int) *DeploymentStatusQuery

Offset adds an offset step to the query.

func (*DeploymentStatusQuery) Only

Only returns a single DeploymentStatus entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one DeploymentStatus entity is found. Returns a *NotFoundError when no DeploymentStatus entities are found.

func (*DeploymentStatusQuery) OnlyID

func (dsq *DeploymentStatusQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only DeploymentStatus ID in the query. Returns a *NotSingularError when more than one DeploymentStatus ID is found. Returns a *NotFoundError when no entities are found.

func (*DeploymentStatusQuery) OnlyIDX

func (dsq *DeploymentStatusQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*DeploymentStatusQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*DeploymentStatusQuery) Order

Order adds an order step to the query.

func (*DeploymentStatusQuery) QueryDeployment

func (dsq *DeploymentStatusQuery) QueryDeployment() *DeploymentQuery

QueryDeployment chains the current query on the "deployment" edge.

func (*DeploymentStatusQuery) QueryEvent

func (dsq *DeploymentStatusQuery) QueryEvent() *EventQuery

QueryEvent chains the current query on the "event" edge.

func (*DeploymentStatusQuery) QueryRepo

func (dsq *DeploymentStatusQuery) QueryRepo() *RepoQuery

QueryRepo chains the current query on the "repo" edge.

func (*DeploymentStatusQuery) Select

func (dsq *DeploymentStatusQuery) Select(fields ...string) *DeploymentStatusSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Status string `json:"status"`
}

client.DeploymentStatus.Query().
	Select(deploymentstatus.FieldStatus).
	Scan(ctx, &v)

func (*DeploymentStatusQuery) Unique

func (dsq *DeploymentStatusQuery) Unique(unique bool) *DeploymentStatusQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*DeploymentStatusQuery) Where

Where adds a new predicate for the DeploymentStatusQuery builder.

func (*DeploymentStatusQuery) WithDeployment

func (dsq *DeploymentStatusQuery) WithDeployment(opts ...func(*DeploymentQuery)) *DeploymentStatusQuery

WithDeployment tells the query-builder to eager-load the nodes that are connected to the "deployment" edge. The optional arguments are used to configure the query builder of the edge.

func (*DeploymentStatusQuery) WithEvent

func (dsq *DeploymentStatusQuery) WithEvent(opts ...func(*EventQuery)) *DeploymentStatusQuery

WithEvent tells the query-builder to eager-load the nodes that are connected to the "event" edge. The optional arguments are used to configure the query builder of the edge.

func (*DeploymentStatusQuery) WithRepo

func (dsq *DeploymentStatusQuery) WithRepo(opts ...func(*RepoQuery)) *DeploymentStatusQuery

WithRepo tells the query-builder to eager-load the nodes that are connected to the "repo" edge. The optional arguments are used to configure the query builder of the edge.

type DeploymentStatusSelect

type DeploymentStatusSelect struct {
	*DeploymentStatusQuery
	// contains filtered or unexported fields
}

DeploymentStatusSelect is the builder for selecting fields of DeploymentStatus entities.

func (*DeploymentStatusSelect) Bool

func (dss *DeploymentStatusSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*DeploymentStatusSelect) BoolX

func (dss *DeploymentStatusSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*DeploymentStatusSelect) Bools

func (dss *DeploymentStatusSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*DeploymentStatusSelect) BoolsX

func (dss *DeploymentStatusSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*DeploymentStatusSelect) Float64

func (dss *DeploymentStatusSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*DeploymentStatusSelect) Float64X

func (dss *DeploymentStatusSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*DeploymentStatusSelect) Float64s

func (dss *DeploymentStatusSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*DeploymentStatusSelect) Float64sX

func (dss *DeploymentStatusSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*DeploymentStatusSelect) Int

func (dss *DeploymentStatusSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*DeploymentStatusSelect) IntX

func (dss *DeploymentStatusSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*DeploymentStatusSelect) Ints

func (dss *DeploymentStatusSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*DeploymentStatusSelect) IntsX

func (dss *DeploymentStatusSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*DeploymentStatusSelect) Scan

func (dss *DeploymentStatusSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*DeploymentStatusSelect) ScanX

func (dss *DeploymentStatusSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*DeploymentStatusSelect) String

func (dss *DeploymentStatusSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*DeploymentStatusSelect) StringX

func (dss *DeploymentStatusSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*DeploymentStatusSelect) Strings

func (dss *DeploymentStatusSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*DeploymentStatusSelect) StringsX

func (dss *DeploymentStatusSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type DeploymentStatusSlice

type DeploymentStatusSlice []*DeploymentStatus

DeploymentStatusSlice is a parsable slice of DeploymentStatus.

type DeploymentStatusUpdate

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

DeploymentStatusUpdate is the builder for updating DeploymentStatus entities.

func (*DeploymentStatusUpdate) AddEvent

func (dsu *DeploymentStatusUpdate) AddEvent(e ...*Event) *DeploymentStatusUpdate

AddEvent adds the "event" edges to the Event entity.

func (*DeploymentStatusUpdate) AddEventIDs

func (dsu *DeploymentStatusUpdate) AddEventIDs(ids ...int) *DeploymentStatusUpdate

AddEventIDs adds the "event" edge to the Event entity by IDs.

func (*DeploymentStatusUpdate) ClearDeployment

func (dsu *DeploymentStatusUpdate) ClearDeployment() *DeploymentStatusUpdate

ClearDeployment clears the "deployment" edge to the Deployment entity.

func (*DeploymentStatusUpdate) ClearDescription

func (dsu *DeploymentStatusUpdate) ClearDescription() *DeploymentStatusUpdate

ClearDescription clears the value of the "description" field.

func (*DeploymentStatusUpdate) ClearEvent

ClearEvent clears all "event" edges to the Event entity.

func (*DeploymentStatusUpdate) ClearLogURL

func (dsu *DeploymentStatusUpdate) ClearLogURL() *DeploymentStatusUpdate

ClearLogURL clears the value of the "log_url" field.

func (*DeploymentStatusUpdate) ClearRepo

ClearRepo clears the "repo" edge to the Repo entity.

func (*DeploymentStatusUpdate) ClearRepoID

func (dsu *DeploymentStatusUpdate) ClearRepoID() *DeploymentStatusUpdate

ClearRepoID clears the value of the "repo_id" field.

func (*DeploymentStatusUpdate) Exec

Exec executes the query.

func (*DeploymentStatusUpdate) ExecX

func (dsu *DeploymentStatusUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentStatusUpdate) Mutation

Mutation returns the DeploymentStatusMutation object of the builder.

func (*DeploymentStatusUpdate) RemoveEvent

func (dsu *DeploymentStatusUpdate) RemoveEvent(e ...*Event) *DeploymentStatusUpdate

RemoveEvent removes "event" edges to Event entities.

func (*DeploymentStatusUpdate) RemoveEventIDs

func (dsu *DeploymentStatusUpdate) RemoveEventIDs(ids ...int) *DeploymentStatusUpdate

RemoveEventIDs removes the "event" edge to Event entities by IDs.

func (*DeploymentStatusUpdate) Save

func (dsu *DeploymentStatusUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DeploymentStatusUpdate) SaveX

func (dsu *DeploymentStatusUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DeploymentStatusUpdate) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*DeploymentStatusUpdate) SetDeployment

SetDeployment sets the "deployment" edge to the Deployment entity.

func (*DeploymentStatusUpdate) SetDeploymentID

func (dsu *DeploymentStatusUpdate) SetDeploymentID(i int) *DeploymentStatusUpdate

SetDeploymentID sets the "deployment_id" field.

func (*DeploymentStatusUpdate) SetDescription

func (dsu *DeploymentStatusUpdate) SetDescription(s string) *DeploymentStatusUpdate

SetDescription sets the "description" field.

func (*DeploymentStatusUpdate) SetLogURL

SetLogURL sets the "log_url" field.

func (*DeploymentStatusUpdate) SetNillableCreatedAt

func (dsu *DeploymentStatusUpdate) SetNillableCreatedAt(t *time.Time) *DeploymentStatusUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeploymentStatusUpdate) SetNillableDescription

func (dsu *DeploymentStatusUpdate) SetNillableDescription(s *string) *DeploymentStatusUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*DeploymentStatusUpdate) SetNillableLogURL

func (dsu *DeploymentStatusUpdate) SetNillableLogURL(s *string) *DeploymentStatusUpdate

SetNillableLogURL sets the "log_url" field if the given value is not nil.

func (*DeploymentStatusUpdate) SetNillableRepoID

func (dsu *DeploymentStatusUpdate) SetNillableRepoID(i *int64) *DeploymentStatusUpdate

SetNillableRepoID sets the "repo_id" field if the given value is not nil.

func (*DeploymentStatusUpdate) SetRepo

SetRepo sets the "repo" edge to the Repo entity.

func (*DeploymentStatusUpdate) SetRepoID

SetRepoID sets the "repo_id" field.

func (*DeploymentStatusUpdate) SetStatus

SetStatus sets the "status" field.

func (*DeploymentStatusUpdate) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentStatusUpdate) Where

Where appends a list predicates to the DeploymentStatusUpdate builder.

type DeploymentStatusUpdateOne

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

DeploymentStatusUpdateOne is the builder for updating a single DeploymentStatus entity.

func (*DeploymentStatusUpdateOne) AddEvent

AddEvent adds the "event" edges to the Event entity.

func (*DeploymentStatusUpdateOne) AddEventIDs

func (dsuo *DeploymentStatusUpdateOne) AddEventIDs(ids ...int) *DeploymentStatusUpdateOne

AddEventIDs adds the "event" edge to the Event entity by IDs.

func (*DeploymentStatusUpdateOne) ClearDeployment

func (dsuo *DeploymentStatusUpdateOne) ClearDeployment() *DeploymentStatusUpdateOne

ClearDeployment clears the "deployment" edge to the Deployment entity.

func (*DeploymentStatusUpdateOne) ClearDescription

func (dsuo *DeploymentStatusUpdateOne) ClearDescription() *DeploymentStatusUpdateOne

ClearDescription clears the value of the "description" field.

func (*DeploymentStatusUpdateOne) ClearEvent

ClearEvent clears all "event" edges to the Event entity.

func (*DeploymentStatusUpdateOne) ClearLogURL

ClearLogURL clears the value of the "log_url" field.

func (*DeploymentStatusUpdateOne) ClearRepo

ClearRepo clears the "repo" edge to the Repo entity.

func (*DeploymentStatusUpdateOne) ClearRepoID

ClearRepoID clears the value of the "repo_id" field.

func (*DeploymentStatusUpdateOne) Exec

Exec executes the query on the entity.

func (*DeploymentStatusUpdateOne) ExecX

func (dsuo *DeploymentStatusUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentStatusUpdateOne) Mutation

Mutation returns the DeploymentStatusMutation object of the builder.

func (*DeploymentStatusUpdateOne) RemoveEvent

func (dsuo *DeploymentStatusUpdateOne) RemoveEvent(e ...*Event) *DeploymentStatusUpdateOne

RemoveEvent removes "event" edges to Event entities.

func (*DeploymentStatusUpdateOne) RemoveEventIDs

func (dsuo *DeploymentStatusUpdateOne) RemoveEventIDs(ids ...int) *DeploymentStatusUpdateOne

RemoveEventIDs removes the "event" edge to Event entities by IDs.

func (*DeploymentStatusUpdateOne) Save

Save executes the query and returns the updated DeploymentStatus entity.

func (*DeploymentStatusUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*DeploymentStatusUpdateOne) Select

func (dsuo *DeploymentStatusUpdateOne) Select(field string, fields ...string) *DeploymentStatusUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DeploymentStatusUpdateOne) SetCreatedAt

SetCreatedAt sets the "created_at" field.

func (*DeploymentStatusUpdateOne) SetDeployment

SetDeployment sets the "deployment" edge to the Deployment entity.

func (*DeploymentStatusUpdateOne) SetDeploymentID

func (dsuo *DeploymentStatusUpdateOne) SetDeploymentID(i int) *DeploymentStatusUpdateOne

SetDeploymentID sets the "deployment_id" field.

func (*DeploymentStatusUpdateOne) SetDescription

SetDescription sets the "description" field.

func (*DeploymentStatusUpdateOne) SetLogURL

SetLogURL sets the "log_url" field.

func (*DeploymentStatusUpdateOne) SetNillableCreatedAt

func (dsuo *DeploymentStatusUpdateOne) SetNillableCreatedAt(t *time.Time) *DeploymentStatusUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeploymentStatusUpdateOne) SetNillableDescription

func (dsuo *DeploymentStatusUpdateOne) SetNillableDescription(s *string) *DeploymentStatusUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*DeploymentStatusUpdateOne) SetNillableLogURL

func (dsuo *DeploymentStatusUpdateOne) SetNillableLogURL(s *string) *DeploymentStatusUpdateOne

SetNillableLogURL sets the "log_url" field if the given value is not nil.

func (*DeploymentStatusUpdateOne) SetNillableRepoID

func (dsuo *DeploymentStatusUpdateOne) SetNillableRepoID(i *int64) *DeploymentStatusUpdateOne

SetNillableRepoID sets the "repo_id" field if the given value is not nil.

func (*DeploymentStatusUpdateOne) SetRepo

SetRepo sets the "repo" edge to the Repo entity.

func (*DeploymentStatusUpdateOne) SetRepoID

SetRepoID sets the "repo_id" field.

func (*DeploymentStatusUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*DeploymentStatusUpdateOne) SetUpdatedAt

SetUpdatedAt sets the "updated_at" field.

type DeploymentUpdate

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

DeploymentUpdate is the builder for updating Deployment entities.

func (*DeploymentUpdate) AddDeploymentStatusIDs

func (du *DeploymentUpdate) AddDeploymentStatusIDs(ids ...int) *DeploymentUpdate

AddDeploymentStatusIDs adds the "deployment_statuses" edge to the DeploymentStatus entity by IDs.

func (*DeploymentUpdate) AddDeploymentStatuses

func (du *DeploymentUpdate) AddDeploymentStatuses(d ...*DeploymentStatus) *DeploymentUpdate

AddDeploymentStatuses adds the "deployment_statuses" edges to the DeploymentStatus entity.

func (*DeploymentUpdate) AddNumber

func (du *DeploymentUpdate) AddNumber(i int) *DeploymentUpdate

AddNumber adds i to the "number" field.

func (*DeploymentUpdate) AddRequiredApprovalCount

func (du *DeploymentUpdate) AddRequiredApprovalCount(i int) *DeploymentUpdate

AddRequiredApprovalCount adds i to the "required_approval_count" field.

func (*DeploymentUpdate) AddReviewIDs

func (du *DeploymentUpdate) AddReviewIDs(ids ...int) *DeploymentUpdate

AddReviewIDs adds the "reviews" edge to the Review entity by IDs.

func (*DeploymentUpdate) AddReviews

func (du *DeploymentUpdate) AddReviews(r ...*Review) *DeploymentUpdate

AddReviews adds the "reviews" edges to the Review entity.

func (*DeploymentUpdate) AddUID

func (du *DeploymentUpdate) AddUID(i int64) *DeploymentUpdate

AddUID adds i to the "uid" field.

func (*DeploymentUpdate) ClearDeploymentStatuses

func (du *DeploymentUpdate) ClearDeploymentStatuses() *DeploymentUpdate

ClearDeploymentStatuses clears all "deployment_statuses" edges to the DeploymentStatus entity.

func (*DeploymentUpdate) ClearDynamicPayload

func (du *DeploymentUpdate) ClearDynamicPayload() *DeploymentUpdate

ClearDynamicPayload clears the value of the "dynamic_payload" field.

func (*DeploymentUpdate) ClearHTMLURL

func (du *DeploymentUpdate) ClearHTMLURL() *DeploymentUpdate

ClearHTMLURL clears the value of the "html_url" field.

func (*DeploymentUpdate) ClearIsApprovalEnabled

func (du *DeploymentUpdate) ClearIsApprovalEnabled() *DeploymentUpdate

ClearIsApprovalEnabled clears the value of the "is_approval_enabled" field.

func (*DeploymentUpdate) ClearRepo

func (du *DeploymentUpdate) ClearRepo() *DeploymentUpdate

ClearRepo clears the "repo" edge to the Repo entity.

func (*DeploymentUpdate) ClearRequiredApprovalCount

func (du *DeploymentUpdate) ClearRequiredApprovalCount() *DeploymentUpdate

ClearRequiredApprovalCount clears the value of the "required_approval_count" field.

func (*DeploymentUpdate) ClearReviews

func (du *DeploymentUpdate) ClearReviews() *DeploymentUpdate

ClearReviews clears all "reviews" edges to the Review entity.

func (*DeploymentUpdate) ClearSha

func (du *DeploymentUpdate) ClearSha() *DeploymentUpdate

ClearSha clears the value of the "sha" field.

func (*DeploymentUpdate) ClearUID

func (du *DeploymentUpdate) ClearUID() *DeploymentUpdate

ClearUID clears the value of the "uid" field.

func (*DeploymentUpdate) ClearUser

func (du *DeploymentUpdate) ClearUser() *DeploymentUpdate

ClearUser clears the "user" edge to the User entity.

func (*DeploymentUpdate) ClearUserID

func (du *DeploymentUpdate) ClearUserID() *DeploymentUpdate

ClearUserID clears the value of the "user_id" field.

func (*DeploymentUpdate) Exec

func (du *DeploymentUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*DeploymentUpdate) ExecX

func (du *DeploymentUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentUpdate) Mutation

func (du *DeploymentUpdate) Mutation() *DeploymentMutation

Mutation returns the DeploymentMutation object of the builder.

func (*DeploymentUpdate) RemoveDeploymentStatusIDs

func (du *DeploymentUpdate) RemoveDeploymentStatusIDs(ids ...int) *DeploymentUpdate

RemoveDeploymentStatusIDs removes the "deployment_statuses" edge to DeploymentStatus entities by IDs.

func (*DeploymentUpdate) RemoveDeploymentStatuses

func (du *DeploymentUpdate) RemoveDeploymentStatuses(d ...*DeploymentStatus) *DeploymentUpdate

RemoveDeploymentStatuses removes "deployment_statuses" edges to DeploymentStatus entities.

func (*DeploymentUpdate) RemoveReviewIDs

func (du *DeploymentUpdate) RemoveReviewIDs(ids ...int) *DeploymentUpdate

RemoveReviewIDs removes the "reviews" edge to Review entities by IDs.

func (*DeploymentUpdate) RemoveReviews

func (du *DeploymentUpdate) RemoveReviews(r ...*Review) *DeploymentUpdate

RemoveReviews removes "reviews" edges to Review entities.

func (*DeploymentUpdate) Save

func (du *DeploymentUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*DeploymentUpdate) SaveX

func (du *DeploymentUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*DeploymentUpdate) SetCreatedAt

func (du *DeploymentUpdate) SetCreatedAt(t time.Time) *DeploymentUpdate

SetCreatedAt sets the "created_at" field.

func (*DeploymentUpdate) SetDynamicPayload

func (du *DeploymentUpdate) SetDynamicPayload(m map[string]interface{}) *DeploymentUpdate

SetDynamicPayload sets the "dynamic_payload" field.

func (*DeploymentUpdate) SetEnv

func (du *DeploymentUpdate) SetEnv(s string) *DeploymentUpdate

SetEnv sets the "env" field.

func (*DeploymentUpdate) SetHTMLURL

func (du *DeploymentUpdate) SetHTMLURL(s string) *DeploymentUpdate

SetHTMLURL sets the "html_url" field.

func (*DeploymentUpdate) SetIsApprovalEnabled

func (du *DeploymentUpdate) SetIsApprovalEnabled(b bool) *DeploymentUpdate

SetIsApprovalEnabled sets the "is_approval_enabled" field.

func (*DeploymentUpdate) SetIsRollback

func (du *DeploymentUpdate) SetIsRollback(b bool) *DeploymentUpdate

SetIsRollback sets the "is_rollback" field.

func (*DeploymentUpdate) SetNillableCreatedAt

func (du *DeploymentUpdate) SetNillableCreatedAt(t *time.Time) *DeploymentUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeploymentUpdate) SetNillableHTMLURL

func (du *DeploymentUpdate) SetNillableHTMLURL(s *string) *DeploymentUpdate

SetNillableHTMLURL sets the "html_url" field if the given value is not nil.

func (*DeploymentUpdate) SetNillableIsApprovalEnabled

func (du *DeploymentUpdate) SetNillableIsApprovalEnabled(b *bool) *DeploymentUpdate

SetNillableIsApprovalEnabled sets the "is_approval_enabled" field if the given value is not nil.

func (*DeploymentUpdate) SetNillableIsRollback

func (du *DeploymentUpdate) SetNillableIsRollback(b *bool) *DeploymentUpdate

SetNillableIsRollback sets the "is_rollback" field if the given value is not nil.

func (*DeploymentUpdate) SetNillableProductionEnvironment

func (du *DeploymentUpdate) SetNillableProductionEnvironment(b *bool) *DeploymentUpdate

SetNillableProductionEnvironment sets the "production_environment" field if the given value is not nil.

func (*DeploymentUpdate) SetNillableRequiredApprovalCount

func (du *DeploymentUpdate) SetNillableRequiredApprovalCount(i *int) *DeploymentUpdate

SetNillableRequiredApprovalCount sets the "required_approval_count" field if the given value is not nil.

func (*DeploymentUpdate) SetNillableSha

func (du *DeploymentUpdate) SetNillableSha(s *string) *DeploymentUpdate

SetNillableSha sets the "sha" field if the given value is not nil.

func (*DeploymentUpdate) SetNillableStatus

func (du *DeploymentUpdate) SetNillableStatus(d *deployment.Status) *DeploymentUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeploymentUpdate) SetNillableType

func (du *DeploymentUpdate) SetNillableType(d *deployment.Type) *DeploymentUpdate

SetNillableType sets the "type" field if the given value is not nil.

func (*DeploymentUpdate) SetNillableUID

func (du *DeploymentUpdate) SetNillableUID(i *int64) *DeploymentUpdate

SetNillableUID sets the "uid" field if the given value is not nil.

func (*DeploymentUpdate) SetNillableUserID

func (du *DeploymentUpdate) SetNillableUserID(i *int64) *DeploymentUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*DeploymentUpdate) SetNumber

func (du *DeploymentUpdate) SetNumber(i int) *DeploymentUpdate

SetNumber sets the "number" field.

func (*DeploymentUpdate) SetProductionEnvironment

func (du *DeploymentUpdate) SetProductionEnvironment(b bool) *DeploymentUpdate

SetProductionEnvironment sets the "production_environment" field.

func (*DeploymentUpdate) SetRef

func (du *DeploymentUpdate) SetRef(s string) *DeploymentUpdate

SetRef sets the "ref" field.

func (*DeploymentUpdate) SetRepo

func (du *DeploymentUpdate) SetRepo(r *Repo) *DeploymentUpdate

SetRepo sets the "repo" edge to the Repo entity.

func (*DeploymentUpdate) SetRepoID

func (du *DeploymentUpdate) SetRepoID(i int64) *DeploymentUpdate

SetRepoID sets the "repo_id" field.

func (*DeploymentUpdate) SetRequiredApprovalCount

func (du *DeploymentUpdate) SetRequiredApprovalCount(i int) *DeploymentUpdate

SetRequiredApprovalCount sets the "required_approval_count" field.

func (*DeploymentUpdate) SetSha

func (du *DeploymentUpdate) SetSha(s string) *DeploymentUpdate

SetSha sets the "sha" field.

func (*DeploymentUpdate) SetStatus

SetStatus sets the "status" field.

func (*DeploymentUpdate) SetType

SetType sets the "type" field.

func (*DeploymentUpdate) SetUID

func (du *DeploymentUpdate) SetUID(i int64) *DeploymentUpdate

SetUID sets the "uid" field.

func (*DeploymentUpdate) SetUpdatedAt

func (du *DeploymentUpdate) SetUpdatedAt(t time.Time) *DeploymentUpdate

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentUpdate) SetUser

func (du *DeploymentUpdate) SetUser(u *User) *DeploymentUpdate

SetUser sets the "user" edge to the User entity.

func (*DeploymentUpdate) SetUserID

func (du *DeploymentUpdate) SetUserID(i int64) *DeploymentUpdate

SetUserID sets the "user_id" field.

func (*DeploymentUpdate) Where

Where appends a list predicates to the DeploymentUpdate builder.

type DeploymentUpdateOne

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

DeploymentUpdateOne is the builder for updating a single Deployment entity.

func (*DeploymentUpdateOne) AddDeploymentStatusIDs

func (duo *DeploymentUpdateOne) AddDeploymentStatusIDs(ids ...int) *DeploymentUpdateOne

AddDeploymentStatusIDs adds the "deployment_statuses" edge to the DeploymentStatus entity by IDs.

func (*DeploymentUpdateOne) AddDeploymentStatuses

func (duo *DeploymentUpdateOne) AddDeploymentStatuses(d ...*DeploymentStatus) *DeploymentUpdateOne

AddDeploymentStatuses adds the "deployment_statuses" edges to the DeploymentStatus entity.

func (*DeploymentUpdateOne) AddNumber

func (duo *DeploymentUpdateOne) AddNumber(i int) *DeploymentUpdateOne

AddNumber adds i to the "number" field.

func (*DeploymentUpdateOne) AddRequiredApprovalCount

func (duo *DeploymentUpdateOne) AddRequiredApprovalCount(i int) *DeploymentUpdateOne

AddRequiredApprovalCount adds i to the "required_approval_count" field.

func (*DeploymentUpdateOne) AddReviewIDs

func (duo *DeploymentUpdateOne) AddReviewIDs(ids ...int) *DeploymentUpdateOne

AddReviewIDs adds the "reviews" edge to the Review entity by IDs.

func (*DeploymentUpdateOne) AddReviews

func (duo *DeploymentUpdateOne) AddReviews(r ...*Review) *DeploymentUpdateOne

AddReviews adds the "reviews" edges to the Review entity.

func (*DeploymentUpdateOne) AddUID

AddUID adds i to the "uid" field.

func (*DeploymentUpdateOne) ClearDeploymentStatuses

func (duo *DeploymentUpdateOne) ClearDeploymentStatuses() *DeploymentUpdateOne

ClearDeploymentStatuses clears all "deployment_statuses" edges to the DeploymentStatus entity.

func (*DeploymentUpdateOne) ClearDynamicPayload

func (duo *DeploymentUpdateOne) ClearDynamicPayload() *DeploymentUpdateOne

ClearDynamicPayload clears the value of the "dynamic_payload" field.

func (*DeploymentUpdateOne) ClearHTMLURL

func (duo *DeploymentUpdateOne) ClearHTMLURL() *DeploymentUpdateOne

ClearHTMLURL clears the value of the "html_url" field.

func (*DeploymentUpdateOne) ClearIsApprovalEnabled

func (duo *DeploymentUpdateOne) ClearIsApprovalEnabled() *DeploymentUpdateOne

ClearIsApprovalEnabled clears the value of the "is_approval_enabled" field.

func (*DeploymentUpdateOne) ClearRepo

func (duo *DeploymentUpdateOne) ClearRepo() *DeploymentUpdateOne

ClearRepo clears the "repo" edge to the Repo entity.

func (*DeploymentUpdateOne) ClearRequiredApprovalCount

func (duo *DeploymentUpdateOne) ClearRequiredApprovalCount() *DeploymentUpdateOne

ClearRequiredApprovalCount clears the value of the "required_approval_count" field.

func (*DeploymentUpdateOne) ClearReviews

func (duo *DeploymentUpdateOne) ClearReviews() *DeploymentUpdateOne

ClearReviews clears all "reviews" edges to the Review entity.

func (*DeploymentUpdateOne) ClearSha

func (duo *DeploymentUpdateOne) ClearSha() *DeploymentUpdateOne

ClearSha clears the value of the "sha" field.

func (*DeploymentUpdateOne) ClearUID

func (duo *DeploymentUpdateOne) ClearUID() *DeploymentUpdateOne

ClearUID clears the value of the "uid" field.

func (*DeploymentUpdateOne) ClearUser

func (duo *DeploymentUpdateOne) ClearUser() *DeploymentUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*DeploymentUpdateOne) ClearUserID

func (duo *DeploymentUpdateOne) ClearUserID() *DeploymentUpdateOne

ClearUserID clears the value of the "user_id" field.

func (*DeploymentUpdateOne) Exec

func (duo *DeploymentUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*DeploymentUpdateOne) ExecX

func (duo *DeploymentUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*DeploymentUpdateOne) Mutation

func (duo *DeploymentUpdateOne) Mutation() *DeploymentMutation

Mutation returns the DeploymentMutation object of the builder.

func (*DeploymentUpdateOne) RemoveDeploymentStatusIDs

func (duo *DeploymentUpdateOne) RemoveDeploymentStatusIDs(ids ...int) *DeploymentUpdateOne

RemoveDeploymentStatusIDs removes the "deployment_statuses" edge to DeploymentStatus entities by IDs.

func (*DeploymentUpdateOne) RemoveDeploymentStatuses

func (duo *DeploymentUpdateOne) RemoveDeploymentStatuses(d ...*DeploymentStatus) *DeploymentUpdateOne

RemoveDeploymentStatuses removes "deployment_statuses" edges to DeploymentStatus entities.

func (*DeploymentUpdateOne) RemoveReviewIDs

func (duo *DeploymentUpdateOne) RemoveReviewIDs(ids ...int) *DeploymentUpdateOne

RemoveReviewIDs removes the "reviews" edge to Review entities by IDs.

func (*DeploymentUpdateOne) RemoveReviews

func (duo *DeploymentUpdateOne) RemoveReviews(r ...*Review) *DeploymentUpdateOne

RemoveReviews removes "reviews" edges to Review entities.

func (*DeploymentUpdateOne) Save

func (duo *DeploymentUpdateOne) Save(ctx context.Context) (*Deployment, error)

Save executes the query and returns the updated Deployment entity.

func (*DeploymentUpdateOne) SaveX

func (duo *DeploymentUpdateOne) SaveX(ctx context.Context) *Deployment

SaveX is like Save, but panics if an error occurs.

func (*DeploymentUpdateOne) Select

func (duo *DeploymentUpdateOne) Select(field string, fields ...string) *DeploymentUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*DeploymentUpdateOne) SetCreatedAt

func (duo *DeploymentUpdateOne) SetCreatedAt(t time.Time) *DeploymentUpdateOne

SetCreatedAt sets the "created_at" field.

func (*DeploymentUpdateOne) SetDynamicPayload

func (duo *DeploymentUpdateOne) SetDynamicPayload(m map[string]interface{}) *DeploymentUpdateOne

SetDynamicPayload sets the "dynamic_payload" field.

func (*DeploymentUpdateOne) SetEnv

SetEnv sets the "env" field.

func (*DeploymentUpdateOne) SetHTMLURL

func (duo *DeploymentUpdateOne) SetHTMLURL(s string) *DeploymentUpdateOne

SetHTMLURL sets the "html_url" field.

func (*DeploymentUpdateOne) SetIsApprovalEnabled

func (duo *DeploymentUpdateOne) SetIsApprovalEnabled(b bool) *DeploymentUpdateOne

SetIsApprovalEnabled sets the "is_approval_enabled" field.

func (*DeploymentUpdateOne) SetIsRollback

func (duo *DeploymentUpdateOne) SetIsRollback(b bool) *DeploymentUpdateOne

SetIsRollback sets the "is_rollback" field.

func (*DeploymentUpdateOne) SetNillableCreatedAt

func (duo *DeploymentUpdateOne) SetNillableCreatedAt(t *time.Time) *DeploymentUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*DeploymentUpdateOne) SetNillableHTMLURL

func (duo *DeploymentUpdateOne) SetNillableHTMLURL(s *string) *DeploymentUpdateOne

SetNillableHTMLURL sets the "html_url" field if the given value is not nil.

func (*DeploymentUpdateOne) SetNillableIsApprovalEnabled

func (duo *DeploymentUpdateOne) SetNillableIsApprovalEnabled(b *bool) *DeploymentUpdateOne

SetNillableIsApprovalEnabled sets the "is_approval_enabled" field if the given value is not nil.

func (*DeploymentUpdateOne) SetNillableIsRollback

func (duo *DeploymentUpdateOne) SetNillableIsRollback(b *bool) *DeploymentUpdateOne

SetNillableIsRollback sets the "is_rollback" field if the given value is not nil.

func (*DeploymentUpdateOne) SetNillableProductionEnvironment

func (duo *DeploymentUpdateOne) SetNillableProductionEnvironment(b *bool) *DeploymentUpdateOne

SetNillableProductionEnvironment sets the "production_environment" field if the given value is not nil.

func (*DeploymentUpdateOne) SetNillableRequiredApprovalCount

func (duo *DeploymentUpdateOne) SetNillableRequiredApprovalCount(i *int) *DeploymentUpdateOne

SetNillableRequiredApprovalCount sets the "required_approval_count" field if the given value is not nil.

func (*DeploymentUpdateOne) SetNillableSha

func (duo *DeploymentUpdateOne) SetNillableSha(s *string) *DeploymentUpdateOne

SetNillableSha sets the "sha" field if the given value is not nil.

func (*DeploymentUpdateOne) SetNillableStatus

func (duo *DeploymentUpdateOne) SetNillableStatus(d *deployment.Status) *DeploymentUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*DeploymentUpdateOne) SetNillableType

func (duo *DeploymentUpdateOne) SetNillableType(d *deployment.Type) *DeploymentUpdateOne

SetNillableType sets the "type" field if the given value is not nil.

func (*DeploymentUpdateOne) SetNillableUID

func (duo *DeploymentUpdateOne) SetNillableUID(i *int64) *DeploymentUpdateOne

SetNillableUID sets the "uid" field if the given value is not nil.

func (*DeploymentUpdateOne) SetNillableUserID

func (duo *DeploymentUpdateOne) SetNillableUserID(i *int64) *DeploymentUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*DeploymentUpdateOne) SetNumber

func (duo *DeploymentUpdateOne) SetNumber(i int) *DeploymentUpdateOne

SetNumber sets the "number" field.

func (*DeploymentUpdateOne) SetProductionEnvironment

func (duo *DeploymentUpdateOne) SetProductionEnvironment(b bool) *DeploymentUpdateOne

SetProductionEnvironment sets the "production_environment" field.

func (*DeploymentUpdateOne) SetRef

SetRef sets the "ref" field.

func (*DeploymentUpdateOne) SetRepo

func (duo *DeploymentUpdateOne) SetRepo(r *Repo) *DeploymentUpdateOne

SetRepo sets the "repo" edge to the Repo entity.

func (*DeploymentUpdateOne) SetRepoID

func (duo *DeploymentUpdateOne) SetRepoID(i int64) *DeploymentUpdateOne

SetRepoID sets the "repo_id" field.

func (*DeploymentUpdateOne) SetRequiredApprovalCount

func (duo *DeploymentUpdateOne) SetRequiredApprovalCount(i int) *DeploymentUpdateOne

SetRequiredApprovalCount sets the "required_approval_count" field.

func (*DeploymentUpdateOne) SetSha

SetSha sets the "sha" field.

func (*DeploymentUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*DeploymentUpdateOne) SetType

SetType sets the "type" field.

func (*DeploymentUpdateOne) SetUID

SetUID sets the "uid" field.

func (*DeploymentUpdateOne) SetUpdatedAt

func (duo *DeploymentUpdateOne) SetUpdatedAt(t time.Time) *DeploymentUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*DeploymentUpdateOne) SetUser

func (duo *DeploymentUpdateOne) SetUser(u *User) *DeploymentUpdateOne

SetUser sets the "user" edge to the User entity.

func (*DeploymentUpdateOne) SetUserID

func (duo *DeploymentUpdateOne) SetUserID(i int64) *DeploymentUpdateOne

SetUserID sets the "user_id" field.

type Deployments

type Deployments []*Deployment

Deployments is a parsable slice of Deployment.

type Event

type Event struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Kind holds the value of the "kind" field.
	Kind event.Kind `json:"kind"`
	// Type holds the value of the "type" field.
	Type event.Type `json:"type"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at"`
	// DeploymentStatusID holds the value of the "deployment_status_id" field.
	DeploymentStatusID int `json:"deployment_status_id,omitemtpy"`
	// ReviewID holds the value of the "review_id" field.
	ReviewID int `json:"review_id,omitemtpy"`
	// DeletedID holds the value of the "deleted_id" field.
	DeletedID int `json:"deleted_id,omitemtpy"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the EventQuery when eager-loading is set.
	Edges EventEdges `json:"edges"`
	// contains filtered or unexported fields
}

Event is the model entity for the Event schema.

func (*Event) QueryDeploymentStatus

func (e *Event) QueryDeploymentStatus() *DeploymentStatusQuery

QueryDeploymentStatus queries the "deployment_status" edge of the Event entity.

func (*Event) QueryNotificationRecord

func (e *Event) QueryNotificationRecord() *NotificationRecordQuery

QueryNotificationRecord queries the "notification_record" edge of the Event entity.

func (*Event) QueryReview

func (e *Event) QueryReview() *ReviewQuery

QueryReview queries the "review" edge of the Event entity.

func (*Event) String

func (e *Event) String() string

String implements the fmt.Stringer.

func (*Event) Unwrap

func (e *Event) Unwrap() *Event

Unwrap unwraps the Event entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Event) Update

func (e *Event) Update() *EventUpdateOne

Update returns a builder for updating this Event. Note that you need to call Event.Unwrap() before calling this method if this Event was returned from a transaction, and the transaction was committed or rolled back.

type EventClient

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

EventClient is a client for the Event schema.

func NewEventClient

func NewEventClient(c config) *EventClient

NewEventClient returns a client for the Event from the given config.

func (*EventClient) Create

func (c *EventClient) Create() *EventCreate

Create returns a create builder for Event.

func (*EventClient) CreateBulk

func (c *EventClient) CreateBulk(builders ...*EventCreate) *EventCreateBulk

CreateBulk returns a builder for creating a bulk of Event entities.

func (*EventClient) Delete

func (c *EventClient) Delete() *EventDelete

Delete returns a delete builder for Event.

func (*EventClient) DeleteOne

func (c *EventClient) DeleteOne(e *Event) *EventDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*EventClient) DeleteOneID

func (c *EventClient) DeleteOneID(id int) *EventDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*EventClient) Get

func (c *EventClient) Get(ctx context.Context, id int) (*Event, error)

Get returns a Event entity by its id.

func (*EventClient) GetX

func (c *EventClient) GetX(ctx context.Context, id int) *Event

GetX is like Get, but panics if an error occurs.

func (*EventClient) Hooks

func (c *EventClient) Hooks() []Hook

Hooks returns the client hooks.

func (*EventClient) Query

func (c *EventClient) Query() *EventQuery

Query returns a query builder for Event.

func (*EventClient) QueryDeploymentStatus

func (c *EventClient) QueryDeploymentStatus(e *Event) *DeploymentStatusQuery

QueryDeploymentStatus queries the deployment_status edge of a Event.

func (*EventClient) QueryNotificationRecord

func (c *EventClient) QueryNotificationRecord(e *Event) *NotificationRecordQuery

QueryNotificationRecord queries the notification_record edge of a Event.

func (*EventClient) QueryReview

func (c *EventClient) QueryReview(e *Event) *ReviewQuery

QueryReview queries the review edge of a Event.

func (*EventClient) Update

func (c *EventClient) Update() *EventUpdate

Update returns an update builder for Event.

func (*EventClient) UpdateOne

func (c *EventClient) UpdateOne(e *Event) *EventUpdateOne

UpdateOne returns an update builder for the given entity.

func (*EventClient) UpdateOneID

func (c *EventClient) UpdateOneID(id int) *EventUpdateOne

UpdateOneID returns an update builder for the given id.

func (*EventClient) Use

func (c *EventClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `event.Hooks(f(g(h())))`.

type EventCreate

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

EventCreate is the builder for creating a Event entity.

func (*EventCreate) Exec

func (ec *EventCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*EventCreate) ExecX

func (ec *EventCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EventCreate) Mutation

func (ec *EventCreate) Mutation() *EventMutation

Mutation returns the EventMutation object of the builder.

func (*EventCreate) Save

func (ec *EventCreate) Save(ctx context.Context) (*Event, error)

Save creates the Event in the database.

func (*EventCreate) SaveX

func (ec *EventCreate) SaveX(ctx context.Context) *Event

SaveX calls Save and panics if Save returns an error.

func (*EventCreate) SetCreatedAt

func (ec *EventCreate) SetCreatedAt(t time.Time) *EventCreate

SetCreatedAt sets the "created_at" field.

func (*EventCreate) SetDeletedID

func (ec *EventCreate) SetDeletedID(i int) *EventCreate

SetDeletedID sets the "deleted_id" field.

func (*EventCreate) SetDeploymentStatus

func (ec *EventCreate) SetDeploymentStatus(d *DeploymentStatus) *EventCreate

SetDeploymentStatus sets the "deployment_status" edge to the DeploymentStatus entity.

func (*EventCreate) SetDeploymentStatusID

func (ec *EventCreate) SetDeploymentStatusID(i int) *EventCreate

SetDeploymentStatusID sets the "deployment_status_id" field.

func (*EventCreate) SetKind

func (ec *EventCreate) SetKind(e event.Kind) *EventCreate

SetKind sets the "kind" field.

func (*EventCreate) SetNillableCreatedAt

func (ec *EventCreate) SetNillableCreatedAt(t *time.Time) *EventCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*EventCreate) SetNillableDeletedID

func (ec *EventCreate) SetNillableDeletedID(i *int) *EventCreate

SetNillableDeletedID sets the "deleted_id" field if the given value is not nil.

func (*EventCreate) SetNillableDeploymentStatusID

func (ec *EventCreate) SetNillableDeploymentStatusID(i *int) *EventCreate

SetNillableDeploymentStatusID sets the "deployment_status_id" field if the given value is not nil.

func (*EventCreate) SetNillableNotificationRecordID

func (ec *EventCreate) SetNillableNotificationRecordID(id *int) *EventCreate

SetNillableNotificationRecordID sets the "notification_record" edge to the NotificationRecord entity by ID if the given value is not nil.

func (*EventCreate) SetNillableReviewID

func (ec *EventCreate) SetNillableReviewID(i *int) *EventCreate

SetNillableReviewID sets the "review_id" field if the given value is not nil.

func (*EventCreate) SetNotificationRecord

func (ec *EventCreate) SetNotificationRecord(n *NotificationRecord) *EventCreate

SetNotificationRecord sets the "notification_record" edge to the NotificationRecord entity.

func (*EventCreate) SetNotificationRecordID

func (ec *EventCreate) SetNotificationRecordID(id int) *EventCreate

SetNotificationRecordID sets the "notification_record" edge to the NotificationRecord entity by ID.

func (*EventCreate) SetReview

func (ec *EventCreate) SetReview(r *Review) *EventCreate

SetReview sets the "review" edge to the Review entity.

func (*EventCreate) SetReviewID

func (ec *EventCreate) SetReviewID(i int) *EventCreate

SetReviewID sets the "review_id" field.

func (*EventCreate) SetType

func (ec *EventCreate) SetType(e event.Type) *EventCreate

SetType sets the "type" field.

type EventCreateBulk

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

EventCreateBulk is the builder for creating many Event entities in bulk.

func (*EventCreateBulk) Exec

func (ecb *EventCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*EventCreateBulk) ExecX

func (ecb *EventCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EventCreateBulk) Save

func (ecb *EventCreateBulk) Save(ctx context.Context) ([]*Event, error)

Save creates the Event entities in the database.

func (*EventCreateBulk) SaveX

func (ecb *EventCreateBulk) SaveX(ctx context.Context) []*Event

SaveX is like Save, but panics if an error occurs.

type EventDelete

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

EventDelete is the builder for deleting a Event entity.

func (*EventDelete) Exec

func (ed *EventDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*EventDelete) ExecX

func (ed *EventDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*EventDelete) Where

func (ed *EventDelete) Where(ps ...predicate.Event) *EventDelete

Where appends a list predicates to the EventDelete builder.

type EventDeleteOne

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

EventDeleteOne is the builder for deleting a single Event entity.

func (*EventDeleteOne) Exec

func (edo *EventDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*EventDeleteOne) ExecX

func (edo *EventDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type EventEdges

type EventEdges struct {
	// DeploymentStatus holds the value of the deployment_status edge.
	DeploymentStatus *DeploymentStatus `json:"deployment_status,omitempty"`
	// Review holds the value of the review edge.
	Review *Review `json:"review,omitempty"`
	// NotificationRecord holds the value of the notification_record edge.
	NotificationRecord *NotificationRecord `json:"notification_record,omitempty"`
	// contains filtered or unexported fields
}

EventEdges holds the relations/edges for other nodes in the graph.

func (EventEdges) DeploymentStatusOrErr

func (e EventEdges) DeploymentStatusOrErr() (*DeploymentStatus, error)

DeploymentStatusOrErr returns the DeploymentStatus value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (EventEdges) NotificationRecordOrErr

func (e EventEdges) NotificationRecordOrErr() (*NotificationRecord, error)

NotificationRecordOrErr returns the NotificationRecord value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (EventEdges) ReviewOrErr

func (e EventEdges) ReviewOrErr() (*Review, error)

ReviewOrErr returns the Review value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type EventGroupBy

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

EventGroupBy is the group-by builder for Event entities.

func (*EventGroupBy) Aggregate

func (egb *EventGroupBy) Aggregate(fns ...AggregateFunc) *EventGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*EventGroupBy) Bool

func (egb *EventGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) BoolX

func (egb *EventGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EventGroupBy) Bools

func (egb *EventGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) BoolsX

func (egb *EventGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EventGroupBy) Float64

func (egb *EventGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) Float64X

func (egb *EventGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EventGroupBy) Float64s

func (egb *EventGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) Float64sX

func (egb *EventGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EventGroupBy) Int

func (egb *EventGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) IntX

func (egb *EventGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EventGroupBy) Ints

func (egb *EventGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) IntsX

func (egb *EventGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EventGroupBy) Scan

func (egb *EventGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*EventGroupBy) ScanX

func (egb *EventGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*EventGroupBy) String

func (egb *EventGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) StringX

func (egb *EventGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EventGroupBy) Strings

func (egb *EventGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*EventGroupBy) StringsX

func (egb *EventGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EventMutation

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

EventMutation represents an operation that mutates the Event nodes in the graph.

func (*EventMutation) AddDeletedID

func (m *EventMutation) AddDeletedID(i int)

AddDeletedID adds i to the "deleted_id" field.

func (*EventMutation) AddField

func (m *EventMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*EventMutation) AddedDeletedID

func (m *EventMutation) AddedDeletedID() (r int, exists bool)

AddedDeletedID returns the value that was added to the "deleted_id" field in this mutation.

func (*EventMutation) AddedEdges

func (m *EventMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*EventMutation) AddedField

func (m *EventMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*EventMutation) AddedFields

func (m *EventMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*EventMutation) AddedIDs

func (m *EventMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*EventMutation) ClearDeletedID

func (m *EventMutation) ClearDeletedID()

ClearDeletedID clears the value of the "deleted_id" field.

func (*EventMutation) ClearDeploymentStatus

func (m *EventMutation) ClearDeploymentStatus()

ClearDeploymentStatus clears the "deployment_status" edge to the DeploymentStatus entity.

func (*EventMutation) ClearDeploymentStatusID

func (m *EventMutation) ClearDeploymentStatusID()

ClearDeploymentStatusID clears the value of the "deployment_status_id" field.

func (*EventMutation) ClearEdge

func (m *EventMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*EventMutation) ClearField

func (m *EventMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*EventMutation) ClearNotificationRecord

func (m *EventMutation) ClearNotificationRecord()

ClearNotificationRecord clears the "notification_record" edge to the NotificationRecord entity.

func (*EventMutation) ClearReview

func (m *EventMutation) ClearReview()

ClearReview clears the "review" edge to the Review entity.

func (*EventMutation) ClearReviewID

func (m *EventMutation) ClearReviewID()

ClearReviewID clears the value of the "review_id" field.

func (*EventMutation) ClearedEdges

func (m *EventMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*EventMutation) ClearedFields

func (m *EventMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (EventMutation) Client

func (m EventMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*EventMutation) CreatedAt

func (m *EventMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*EventMutation) DeletedID

func (m *EventMutation) DeletedID() (r int, exists bool)

DeletedID returns the value of the "deleted_id" field in the mutation.

func (*EventMutation) DeletedIDCleared

func (m *EventMutation) DeletedIDCleared() bool

DeletedIDCleared returns if the "deleted_id" field was cleared in this mutation.

func (*EventMutation) DeploymentStatusCleared

func (m *EventMutation) DeploymentStatusCleared() bool

DeploymentStatusCleared reports if the "deployment_status" edge to the DeploymentStatus entity was cleared.

func (*EventMutation) DeploymentStatusID

func (m *EventMutation) DeploymentStatusID() (r int, exists bool)

DeploymentStatusID returns the value of the "deployment_status_id" field in the mutation.

func (*EventMutation) DeploymentStatusIDCleared

func (m *EventMutation) DeploymentStatusIDCleared() bool

DeploymentStatusIDCleared returns if the "deployment_status_id" field was cleared in this mutation.

func (*EventMutation) DeploymentStatusIDs

func (m *EventMutation) DeploymentStatusIDs() (ids []int)

DeploymentStatusIDs returns the "deployment_status" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DeploymentStatusID instead. It exists only for internal usage by the builders.

func (*EventMutation) EdgeCleared

func (m *EventMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*EventMutation) Field

func (m *EventMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*EventMutation) FieldCleared

func (m *EventMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*EventMutation) Fields

func (m *EventMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*EventMutation) GetType

func (m *EventMutation) GetType() (r event.Type, exists bool)

GetType returns the value of the "type" field in the mutation.

func (*EventMutation) ID

func (m *EventMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*EventMutation) IDs

func (m *EventMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*EventMutation) Kind

func (m *EventMutation) Kind() (r event.Kind, exists bool)

Kind returns the value of the "kind" field in the mutation.

func (*EventMutation) NotificationRecordCleared

func (m *EventMutation) NotificationRecordCleared() bool

NotificationRecordCleared reports if the "notification_record" edge to the NotificationRecord entity was cleared.

func (*EventMutation) NotificationRecordID

func (m *EventMutation) NotificationRecordID() (id int, exists bool)

NotificationRecordID returns the "notification_record" edge ID in the mutation.

func (*EventMutation) NotificationRecordIDs

func (m *EventMutation) NotificationRecordIDs() (ids []int)

NotificationRecordIDs returns the "notification_record" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use NotificationRecordID instead. It exists only for internal usage by the builders.

func (*EventMutation) OldCreatedAt

func (m *EventMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) OldDeletedID

func (m *EventMutation) OldDeletedID(ctx context.Context) (v int, err error)

OldDeletedID returns the old "deleted_id" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) OldDeploymentStatusID

func (m *EventMutation) OldDeploymentStatusID(ctx context.Context) (v int, err error)

OldDeploymentStatusID returns the old "deployment_status_id" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) OldField

func (m *EventMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*EventMutation) OldKind

func (m *EventMutation) OldKind(ctx context.Context) (v event.Kind, err error)

OldKind returns the old "kind" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) OldReviewID

func (m *EventMutation) OldReviewID(ctx context.Context) (v int, err error)

OldReviewID returns the old "review_id" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) OldType

func (m *EventMutation) OldType(ctx context.Context) (v event.Type, err error)

OldType returns the old "type" field's value of the Event entity. If the Event object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*EventMutation) Op

func (m *EventMutation) Op() Op

Op returns the operation name.

func (*EventMutation) RemovedEdges

func (m *EventMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*EventMutation) RemovedIDs

func (m *EventMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*EventMutation) ResetCreatedAt

func (m *EventMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*EventMutation) ResetDeletedID

func (m *EventMutation) ResetDeletedID()

ResetDeletedID resets all changes to the "deleted_id" field.

func (*EventMutation) ResetDeploymentStatus

func (m *EventMutation) ResetDeploymentStatus()

ResetDeploymentStatus resets all changes to the "deployment_status" edge.

func (*EventMutation) ResetDeploymentStatusID

func (m *EventMutation) ResetDeploymentStatusID()

ResetDeploymentStatusID resets all changes to the "deployment_status_id" field.

func (*EventMutation) ResetEdge

func (m *EventMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*EventMutation) ResetField

func (m *EventMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*EventMutation) ResetKind

func (m *EventMutation) ResetKind()

ResetKind resets all changes to the "kind" field.

func (*EventMutation) ResetNotificationRecord

func (m *EventMutation) ResetNotificationRecord()

ResetNotificationRecord resets all changes to the "notification_record" edge.

func (*EventMutation) ResetReview

func (m *EventMutation) ResetReview()

ResetReview resets all changes to the "review" edge.

func (*EventMutation) ResetReviewID

func (m *EventMutation) ResetReviewID()

ResetReviewID resets all changes to the "review_id" field.

func (*EventMutation) ResetType

func (m *EventMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*EventMutation) ReviewCleared

func (m *EventMutation) ReviewCleared() bool

ReviewCleared reports if the "review" edge to the Review entity was cleared.

func (*EventMutation) ReviewID

func (m *EventMutation) ReviewID() (r int, exists bool)

ReviewID returns the value of the "review_id" field in the mutation.

func (*EventMutation) ReviewIDCleared

func (m *EventMutation) ReviewIDCleared() bool

ReviewIDCleared returns if the "review_id" field was cleared in this mutation.

func (*EventMutation) ReviewIDs

func (m *EventMutation) ReviewIDs() (ids []int)

ReviewIDs returns the "review" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ReviewID instead. It exists only for internal usage by the builders.

func (*EventMutation) SetCreatedAt

func (m *EventMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*EventMutation) SetDeletedID

func (m *EventMutation) SetDeletedID(i int)

SetDeletedID sets the "deleted_id" field.

func (*EventMutation) SetDeploymentStatusID

func (m *EventMutation) SetDeploymentStatusID(i int)

SetDeploymentStatusID sets the "deployment_status_id" field.

func (*EventMutation) SetField

func (m *EventMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*EventMutation) SetKind

func (m *EventMutation) SetKind(e event.Kind)

SetKind sets the "kind" field.

func (*EventMutation) SetNotificationRecordID

func (m *EventMutation) SetNotificationRecordID(id int)

SetNotificationRecordID sets the "notification_record" edge to the NotificationRecord entity by id.

func (*EventMutation) SetReviewID

func (m *EventMutation) SetReviewID(i int)

SetReviewID sets the "review_id" field.

func (*EventMutation) SetType

func (m *EventMutation) SetType(e event.Type)

SetType sets the "type" field.

func (EventMutation) Tx

func (m EventMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*EventMutation) Type

func (m *EventMutation) Type() string

Type returns the node type of this mutation (Event).

func (*EventMutation) Where

func (m *EventMutation) Where(ps ...predicate.Event)

Where appends a list predicates to the EventMutation builder.

type EventQuery

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

EventQuery is the builder for querying Event entities.

func (*EventQuery) All

func (eq *EventQuery) All(ctx context.Context) ([]*Event, error)

All executes the query and returns a list of Events.

func (*EventQuery) AllX

func (eq *EventQuery) AllX(ctx context.Context) []*Event

AllX is like All, but panics if an error occurs.

func (*EventQuery) Clone

func (eq *EventQuery) Clone() *EventQuery

Clone returns a duplicate of the EventQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*EventQuery) Count

func (eq *EventQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*EventQuery) CountX

func (eq *EventQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*EventQuery) Exist

func (eq *EventQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*EventQuery) ExistX

func (eq *EventQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*EventQuery) First

func (eq *EventQuery) First(ctx context.Context) (*Event, error)

First returns the first Event entity from the query. Returns a *NotFoundError when no Event was found.

func (*EventQuery) FirstID

func (eq *EventQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Event ID from the query. Returns a *NotFoundError when no Event ID was found.

func (*EventQuery) FirstIDX

func (eq *EventQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*EventQuery) FirstX

func (eq *EventQuery) FirstX(ctx context.Context) *Event

FirstX is like First, but panics if an error occurs.

func (*EventQuery) ForShare

func (eq *EventQuery) ForShare(opts ...sql.LockOption) *EventQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*EventQuery) ForUpdate

func (eq *EventQuery) ForUpdate(opts ...sql.LockOption) *EventQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*EventQuery) GroupBy

func (eq *EventQuery) GroupBy(field string, fields ...string) *EventGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Kind event.Kind `json:"kind"`
	Count int `json:"count,omitempty"`
}

client.Event.Query().
	GroupBy(event.FieldKind).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*EventQuery) IDs

func (eq *EventQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Event IDs.

func (*EventQuery) IDsX

func (eq *EventQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*EventQuery) Limit

func (eq *EventQuery) Limit(limit int) *EventQuery

Limit adds a limit step to the query.

func (*EventQuery) Offset

func (eq *EventQuery) Offset(offset int) *EventQuery

Offset adds an offset step to the query.

func (*EventQuery) Only

func (eq *EventQuery) Only(ctx context.Context) (*Event, error)

Only returns a single Event entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Event entity is found. Returns a *NotFoundError when no Event entities are found.

func (*EventQuery) OnlyID

func (eq *EventQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Event ID in the query. Returns a *NotSingularError when more than one Event ID is found. Returns a *NotFoundError when no entities are found.

func (*EventQuery) OnlyIDX

func (eq *EventQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*EventQuery) OnlyX

func (eq *EventQuery) OnlyX(ctx context.Context) *Event

OnlyX is like Only, but panics if an error occurs.

func (*EventQuery) Order

func (eq *EventQuery) Order(o ...OrderFunc) *EventQuery

Order adds an order step to the query.

func (*EventQuery) QueryDeploymentStatus

func (eq *EventQuery) QueryDeploymentStatus() *DeploymentStatusQuery

QueryDeploymentStatus chains the current query on the "deployment_status" edge.

func (*EventQuery) QueryNotificationRecord

func (eq *EventQuery) QueryNotificationRecord() *NotificationRecordQuery

QueryNotificationRecord chains the current query on the "notification_record" edge.

func (*EventQuery) QueryReview

func (eq *EventQuery) QueryReview() *ReviewQuery

QueryReview chains the current query on the "review" edge.

func (*EventQuery) Select

func (eq *EventQuery) Select(fields ...string) *EventSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Kind event.Kind `json:"kind"`
}

client.Event.Query().
	Select(event.FieldKind).
	Scan(ctx, &v)

func (*EventQuery) Unique

func (eq *EventQuery) Unique(unique bool) *EventQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*EventQuery) Where

func (eq *EventQuery) Where(ps ...predicate.Event) *EventQuery

Where adds a new predicate for the EventQuery builder.

func (*EventQuery) WithDeploymentStatus

func (eq *EventQuery) WithDeploymentStatus(opts ...func(*DeploymentStatusQuery)) *EventQuery

WithDeploymentStatus tells the query-builder to eager-load the nodes that are connected to the "deployment_status" edge. The optional arguments are used to configure the query builder of the edge.

func (*EventQuery) WithNotificationRecord

func (eq *EventQuery) WithNotificationRecord(opts ...func(*NotificationRecordQuery)) *EventQuery

WithNotificationRecord tells the query-builder to eager-load the nodes that are connected to the "notification_record" edge. The optional arguments are used to configure the query builder of the edge.

func (*EventQuery) WithReview

func (eq *EventQuery) WithReview(opts ...func(*ReviewQuery)) *EventQuery

WithReview tells the query-builder to eager-load the nodes that are connected to the "review" edge. The optional arguments are used to configure the query builder of the edge.

type EventSelect

type EventSelect struct {
	*EventQuery
	// contains filtered or unexported fields
}

EventSelect is the builder for selecting fields of Event entities.

func (*EventSelect) Bool

func (es *EventSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*EventSelect) BoolX

func (es *EventSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*EventSelect) Bools

func (es *EventSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*EventSelect) BoolsX

func (es *EventSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*EventSelect) Float64

func (es *EventSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*EventSelect) Float64X

func (es *EventSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*EventSelect) Float64s

func (es *EventSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*EventSelect) Float64sX

func (es *EventSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*EventSelect) Int

func (es *EventSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*EventSelect) IntX

func (es *EventSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*EventSelect) Ints

func (es *EventSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*EventSelect) IntsX

func (es *EventSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*EventSelect) Scan

func (es *EventSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*EventSelect) ScanX

func (es *EventSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*EventSelect) String

func (es *EventSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*EventSelect) StringX

func (es *EventSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*EventSelect) Strings

func (es *EventSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*EventSelect) StringsX

func (es *EventSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type EventUpdate

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

EventUpdate is the builder for updating Event entities.

func (*EventUpdate) AddDeletedID

func (eu *EventUpdate) AddDeletedID(i int) *EventUpdate

AddDeletedID adds i to the "deleted_id" field.

func (*EventUpdate) ClearDeletedID

func (eu *EventUpdate) ClearDeletedID() *EventUpdate

ClearDeletedID clears the value of the "deleted_id" field.

func (*EventUpdate) ClearDeploymentStatus

func (eu *EventUpdate) ClearDeploymentStatus() *EventUpdate

ClearDeploymentStatus clears the "deployment_status" edge to the DeploymentStatus entity.

func (*EventUpdate) ClearDeploymentStatusID

func (eu *EventUpdate) ClearDeploymentStatusID() *EventUpdate

ClearDeploymentStatusID clears the value of the "deployment_status_id" field.

func (*EventUpdate) ClearNotificationRecord

func (eu *EventUpdate) ClearNotificationRecord() *EventUpdate

ClearNotificationRecord clears the "notification_record" edge to the NotificationRecord entity.

func (*EventUpdate) ClearReview

func (eu *EventUpdate) ClearReview() *EventUpdate

ClearReview clears the "review" edge to the Review entity.

func (*EventUpdate) ClearReviewID

func (eu *EventUpdate) ClearReviewID() *EventUpdate

ClearReviewID clears the value of the "review_id" field.

func (*EventUpdate) Exec

func (eu *EventUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*EventUpdate) ExecX

func (eu *EventUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EventUpdate) Mutation

func (eu *EventUpdate) Mutation() *EventMutation

Mutation returns the EventMutation object of the builder.

func (*EventUpdate) Save

func (eu *EventUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*EventUpdate) SaveX

func (eu *EventUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*EventUpdate) SetCreatedAt

func (eu *EventUpdate) SetCreatedAt(t time.Time) *EventUpdate

SetCreatedAt sets the "created_at" field.

func (*EventUpdate) SetDeletedID

func (eu *EventUpdate) SetDeletedID(i int) *EventUpdate

SetDeletedID sets the "deleted_id" field.

func (*EventUpdate) SetDeploymentStatus

func (eu *EventUpdate) SetDeploymentStatus(d *DeploymentStatus) *EventUpdate

SetDeploymentStatus sets the "deployment_status" edge to the DeploymentStatus entity.

func (*EventUpdate) SetDeploymentStatusID

func (eu *EventUpdate) SetDeploymentStatusID(i int) *EventUpdate

SetDeploymentStatusID sets the "deployment_status_id" field.

func (*EventUpdate) SetKind

func (eu *EventUpdate) SetKind(e event.Kind) *EventUpdate

SetKind sets the "kind" field.

func (*EventUpdate) SetNillableCreatedAt

func (eu *EventUpdate) SetNillableCreatedAt(t *time.Time) *EventUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*EventUpdate) SetNillableDeletedID

func (eu *EventUpdate) SetNillableDeletedID(i *int) *EventUpdate

SetNillableDeletedID sets the "deleted_id" field if the given value is not nil.

func (*EventUpdate) SetNillableDeploymentStatusID

func (eu *EventUpdate) SetNillableDeploymentStatusID(i *int) *EventUpdate

SetNillableDeploymentStatusID sets the "deployment_status_id" field if the given value is not nil.

func (*EventUpdate) SetNillableNotificationRecordID

func (eu *EventUpdate) SetNillableNotificationRecordID(id *int) *EventUpdate

SetNillableNotificationRecordID sets the "notification_record" edge to the NotificationRecord entity by ID if the given value is not nil.

func (*EventUpdate) SetNillableReviewID

func (eu *EventUpdate) SetNillableReviewID(i *int) *EventUpdate

SetNillableReviewID sets the "review_id" field if the given value is not nil.

func (*EventUpdate) SetNotificationRecord

func (eu *EventUpdate) SetNotificationRecord(n *NotificationRecord) *EventUpdate

SetNotificationRecord sets the "notification_record" edge to the NotificationRecord entity.

func (*EventUpdate) SetNotificationRecordID

func (eu *EventUpdate) SetNotificationRecordID(id int) *EventUpdate

SetNotificationRecordID sets the "notification_record" edge to the NotificationRecord entity by ID.

func (*EventUpdate) SetReview

func (eu *EventUpdate) SetReview(r *Review) *EventUpdate

SetReview sets the "review" edge to the Review entity.

func (*EventUpdate) SetReviewID

func (eu *EventUpdate) SetReviewID(i int) *EventUpdate

SetReviewID sets the "review_id" field.

func (*EventUpdate) SetType

func (eu *EventUpdate) SetType(e event.Type) *EventUpdate

SetType sets the "type" field.

func (*EventUpdate) Where

func (eu *EventUpdate) Where(ps ...predicate.Event) *EventUpdate

Where appends a list predicates to the EventUpdate builder.

type EventUpdateOne

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

EventUpdateOne is the builder for updating a single Event entity.

func (*EventUpdateOne) AddDeletedID

func (euo *EventUpdateOne) AddDeletedID(i int) *EventUpdateOne

AddDeletedID adds i to the "deleted_id" field.

func (*EventUpdateOne) ClearDeletedID

func (euo *EventUpdateOne) ClearDeletedID() *EventUpdateOne

ClearDeletedID clears the value of the "deleted_id" field.

func (*EventUpdateOne) ClearDeploymentStatus

func (euo *EventUpdateOne) ClearDeploymentStatus() *EventUpdateOne

ClearDeploymentStatus clears the "deployment_status" edge to the DeploymentStatus entity.

func (*EventUpdateOne) ClearDeploymentStatusID

func (euo *EventUpdateOne) ClearDeploymentStatusID() *EventUpdateOne

ClearDeploymentStatusID clears the value of the "deployment_status_id" field.

func (*EventUpdateOne) ClearNotificationRecord

func (euo *EventUpdateOne) ClearNotificationRecord() *EventUpdateOne

ClearNotificationRecord clears the "notification_record" edge to the NotificationRecord entity.

func (*EventUpdateOne) ClearReview

func (euo *EventUpdateOne) ClearReview() *EventUpdateOne

ClearReview clears the "review" edge to the Review entity.

func (*EventUpdateOne) ClearReviewID

func (euo *EventUpdateOne) ClearReviewID() *EventUpdateOne

ClearReviewID clears the value of the "review_id" field.

func (*EventUpdateOne) Exec

func (euo *EventUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*EventUpdateOne) ExecX

func (euo *EventUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*EventUpdateOne) Mutation

func (euo *EventUpdateOne) Mutation() *EventMutation

Mutation returns the EventMutation object of the builder.

func (*EventUpdateOne) Save

func (euo *EventUpdateOne) Save(ctx context.Context) (*Event, error)

Save executes the query and returns the updated Event entity.

func (*EventUpdateOne) SaveX

func (euo *EventUpdateOne) SaveX(ctx context.Context) *Event

SaveX is like Save, but panics if an error occurs.

func (*EventUpdateOne) Select

func (euo *EventUpdateOne) Select(field string, fields ...string) *EventUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*EventUpdateOne) SetCreatedAt

func (euo *EventUpdateOne) SetCreatedAt(t time.Time) *EventUpdateOne

SetCreatedAt sets the "created_at" field.

func (*EventUpdateOne) SetDeletedID

func (euo *EventUpdateOne) SetDeletedID(i int) *EventUpdateOne

SetDeletedID sets the "deleted_id" field.

func (*EventUpdateOne) SetDeploymentStatus

func (euo *EventUpdateOne) SetDeploymentStatus(d *DeploymentStatus) *EventUpdateOne

SetDeploymentStatus sets the "deployment_status" edge to the DeploymentStatus entity.

func (*EventUpdateOne) SetDeploymentStatusID

func (euo *EventUpdateOne) SetDeploymentStatusID(i int) *EventUpdateOne

SetDeploymentStatusID sets the "deployment_status_id" field.

func (*EventUpdateOne) SetKind

func (euo *EventUpdateOne) SetKind(e event.Kind) *EventUpdateOne

SetKind sets the "kind" field.

func (*EventUpdateOne) SetNillableCreatedAt

func (euo *EventUpdateOne) SetNillableCreatedAt(t *time.Time) *EventUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*EventUpdateOne) SetNillableDeletedID

func (euo *EventUpdateOne) SetNillableDeletedID(i *int) *EventUpdateOne

SetNillableDeletedID sets the "deleted_id" field if the given value is not nil.

func (*EventUpdateOne) SetNillableDeploymentStatusID

func (euo *EventUpdateOne) SetNillableDeploymentStatusID(i *int) *EventUpdateOne

SetNillableDeploymentStatusID sets the "deployment_status_id" field if the given value is not nil.

func (*EventUpdateOne) SetNillableNotificationRecordID

func (euo *EventUpdateOne) SetNillableNotificationRecordID(id *int) *EventUpdateOne

SetNillableNotificationRecordID sets the "notification_record" edge to the NotificationRecord entity by ID if the given value is not nil.

func (*EventUpdateOne) SetNillableReviewID

func (euo *EventUpdateOne) SetNillableReviewID(i *int) *EventUpdateOne

SetNillableReviewID sets the "review_id" field if the given value is not nil.

func (*EventUpdateOne) SetNotificationRecord

func (euo *EventUpdateOne) SetNotificationRecord(n *NotificationRecord) *EventUpdateOne

SetNotificationRecord sets the "notification_record" edge to the NotificationRecord entity.

func (*EventUpdateOne) SetNotificationRecordID

func (euo *EventUpdateOne) SetNotificationRecordID(id int) *EventUpdateOne

SetNotificationRecordID sets the "notification_record" edge to the NotificationRecord entity by ID.

func (*EventUpdateOne) SetReview

func (euo *EventUpdateOne) SetReview(r *Review) *EventUpdateOne

SetReview sets the "review" edge to the Review entity.

func (*EventUpdateOne) SetReviewID

func (euo *EventUpdateOne) SetReviewID(i int) *EventUpdateOne

SetReviewID sets the "review_id" field.

func (*EventUpdateOne) SetType

func (euo *EventUpdateOne) SetType(e event.Type) *EventUpdateOne

SetType sets the "type" field.

type Events

type Events []*Event

Events is a parsable slice of Event.

type Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

type Lock

type Lock struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Env holds the value of the "env" field.
	Env string `json:"env"`
	// ExpiredAt holds the value of the "expired_at" field.
	ExpiredAt *time.Time `json:"expired_at,omitemtpy"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at"`
	// UserID holds the value of the "user_id" field.
	UserID int64 `json:"user_id,omitemtpy"`
	// RepoID holds the value of the "repo_id" field.
	RepoID int64 `json:"repo_id"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the LockQuery when eager-loading is set.
	Edges LockEdges `json:"edges"`
	// contains filtered or unexported fields
}

Lock is the model entity for the Lock schema.

func (*Lock) QueryRepo

func (l *Lock) QueryRepo() *RepoQuery

QueryRepo queries the "repo" edge of the Lock entity.

func (*Lock) QueryUser

func (l *Lock) QueryUser() *UserQuery

QueryUser queries the "user" edge of the Lock entity.

func (*Lock) String

func (l *Lock) String() string

String implements the fmt.Stringer.

func (*Lock) Unwrap

func (l *Lock) Unwrap() *Lock

Unwrap unwraps the Lock entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Lock) Update

func (l *Lock) Update() *LockUpdateOne

Update returns a builder for updating this Lock. Note that you need to call Lock.Unwrap() before calling this method if this Lock was returned from a transaction, and the transaction was committed or rolled back.

type LockClient

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

LockClient is a client for the Lock schema.

func NewLockClient

func NewLockClient(c config) *LockClient

NewLockClient returns a client for the Lock from the given config.

func (*LockClient) Create

func (c *LockClient) Create() *LockCreate

Create returns a create builder for Lock.

func (*LockClient) CreateBulk

func (c *LockClient) CreateBulk(builders ...*LockCreate) *LockCreateBulk

CreateBulk returns a builder for creating a bulk of Lock entities.

func (*LockClient) Delete

func (c *LockClient) Delete() *LockDelete

Delete returns a delete builder for Lock.

func (*LockClient) DeleteOne

func (c *LockClient) DeleteOne(l *Lock) *LockDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*LockClient) DeleteOneID

func (c *LockClient) DeleteOneID(id int) *LockDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*LockClient) Get

func (c *LockClient) Get(ctx context.Context, id int) (*Lock, error)

Get returns a Lock entity by its id.

func (*LockClient) GetX

func (c *LockClient) GetX(ctx context.Context, id int) *Lock

GetX is like Get, but panics if an error occurs.

func (*LockClient) Hooks

func (c *LockClient) Hooks() []Hook

Hooks returns the client hooks.

func (*LockClient) Query

func (c *LockClient) Query() *LockQuery

Query returns a query builder for Lock.

func (*LockClient) QueryRepo

func (c *LockClient) QueryRepo(l *Lock) *RepoQuery

QueryRepo queries the repo edge of a Lock.

func (*LockClient) QueryUser

func (c *LockClient) QueryUser(l *Lock) *UserQuery

QueryUser queries the user edge of a Lock.

func (*LockClient) Update

func (c *LockClient) Update() *LockUpdate

Update returns an update builder for Lock.

func (*LockClient) UpdateOne

func (c *LockClient) UpdateOne(l *Lock) *LockUpdateOne

UpdateOne returns an update builder for the given entity.

func (*LockClient) UpdateOneID

func (c *LockClient) UpdateOneID(id int) *LockUpdateOne

UpdateOneID returns an update builder for the given id.

func (*LockClient) Use

func (c *LockClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `lock.Hooks(f(g(h())))`.

type LockCreate

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

LockCreate is the builder for creating a Lock entity.

func (*LockCreate) Exec

func (lc *LockCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*LockCreate) ExecX

func (lc *LockCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LockCreate) Mutation

func (lc *LockCreate) Mutation() *LockMutation

Mutation returns the LockMutation object of the builder.

func (*LockCreate) Save

func (lc *LockCreate) Save(ctx context.Context) (*Lock, error)

Save creates the Lock in the database.

func (*LockCreate) SaveX

func (lc *LockCreate) SaveX(ctx context.Context) *Lock

SaveX calls Save and panics if Save returns an error.

func (*LockCreate) SetCreatedAt

func (lc *LockCreate) SetCreatedAt(t time.Time) *LockCreate

SetCreatedAt sets the "created_at" field.

func (*LockCreate) SetEnv

func (lc *LockCreate) SetEnv(s string) *LockCreate

SetEnv sets the "env" field.

func (*LockCreate) SetExpiredAt

func (lc *LockCreate) SetExpiredAt(t time.Time) *LockCreate

SetExpiredAt sets the "expired_at" field.

func (*LockCreate) SetNillableCreatedAt

func (lc *LockCreate) SetNillableCreatedAt(t *time.Time) *LockCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*LockCreate) SetNillableExpiredAt

func (lc *LockCreate) SetNillableExpiredAt(t *time.Time) *LockCreate

SetNillableExpiredAt sets the "expired_at" field if the given value is not nil.

func (*LockCreate) SetNillableUserID

func (lc *LockCreate) SetNillableUserID(i *int64) *LockCreate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*LockCreate) SetRepo

func (lc *LockCreate) SetRepo(r *Repo) *LockCreate

SetRepo sets the "repo" edge to the Repo entity.

func (*LockCreate) SetRepoID

func (lc *LockCreate) SetRepoID(i int64) *LockCreate

SetRepoID sets the "repo_id" field.

func (*LockCreate) SetUser

func (lc *LockCreate) SetUser(u *User) *LockCreate

SetUser sets the "user" edge to the User entity.

func (*LockCreate) SetUserID

func (lc *LockCreate) SetUserID(i int64) *LockCreate

SetUserID sets the "user_id" field.

type LockCreateBulk

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

LockCreateBulk is the builder for creating many Lock entities in bulk.

func (*LockCreateBulk) Exec

func (lcb *LockCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*LockCreateBulk) ExecX

func (lcb *LockCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LockCreateBulk) Save

func (lcb *LockCreateBulk) Save(ctx context.Context) ([]*Lock, error)

Save creates the Lock entities in the database.

func (*LockCreateBulk) SaveX

func (lcb *LockCreateBulk) SaveX(ctx context.Context) []*Lock

SaveX is like Save, but panics if an error occurs.

type LockDelete

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

LockDelete is the builder for deleting a Lock entity.

func (*LockDelete) Exec

func (ld *LockDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*LockDelete) ExecX

func (ld *LockDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*LockDelete) Where

func (ld *LockDelete) Where(ps ...predicate.Lock) *LockDelete

Where appends a list predicates to the LockDelete builder.

type LockDeleteOne

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

LockDeleteOne is the builder for deleting a single Lock entity.

func (*LockDeleteOne) Exec

func (ldo *LockDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*LockDeleteOne) ExecX

func (ldo *LockDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type LockEdges

type LockEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// Repo holds the value of the repo edge.
	Repo *Repo `json:"repo,omitempty"`
	// contains filtered or unexported fields
}

LockEdges holds the relations/edges for other nodes in the graph.

func (LockEdges) RepoOrErr

func (e LockEdges) RepoOrErr() (*Repo, error)

RepoOrErr returns the Repo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (LockEdges) UserOrErr

func (e LockEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type LockGroupBy

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

LockGroupBy is the group-by builder for Lock entities.

func (*LockGroupBy) Aggregate

func (lgb *LockGroupBy) Aggregate(fns ...AggregateFunc) *LockGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*LockGroupBy) Bool

func (lgb *LockGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*LockGroupBy) BoolX

func (lgb *LockGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*LockGroupBy) Bools

func (lgb *LockGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*LockGroupBy) BoolsX

func (lgb *LockGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*LockGroupBy) Float64

func (lgb *LockGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*LockGroupBy) Float64X

func (lgb *LockGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*LockGroupBy) Float64s

func (lgb *LockGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*LockGroupBy) Float64sX

func (lgb *LockGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*LockGroupBy) Int

func (lgb *LockGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*LockGroupBy) IntX

func (lgb *LockGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*LockGroupBy) Ints

func (lgb *LockGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*LockGroupBy) IntsX

func (lgb *LockGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*LockGroupBy) Scan

func (lgb *LockGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*LockGroupBy) ScanX

func (lgb *LockGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*LockGroupBy) String

func (lgb *LockGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*LockGroupBy) StringX

func (lgb *LockGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*LockGroupBy) Strings

func (lgb *LockGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*LockGroupBy) StringsX

func (lgb *LockGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type LockMutation

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

LockMutation represents an operation that mutates the Lock nodes in the graph.

func (*LockMutation) AddField

func (m *LockMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*LockMutation) AddedEdges

func (m *LockMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*LockMutation) AddedField

func (m *LockMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*LockMutation) AddedFields

func (m *LockMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*LockMutation) AddedIDs

func (m *LockMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*LockMutation) ClearEdge

func (m *LockMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*LockMutation) ClearExpiredAt

func (m *LockMutation) ClearExpiredAt()

ClearExpiredAt clears the value of the "expired_at" field.

func (*LockMutation) ClearField

func (m *LockMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*LockMutation) ClearRepo

func (m *LockMutation) ClearRepo()

ClearRepo clears the "repo" edge to the Repo entity.

func (*LockMutation) ClearUser

func (m *LockMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*LockMutation) ClearUserID

func (m *LockMutation) ClearUserID()

ClearUserID clears the value of the "user_id" field.

func (*LockMutation) ClearedEdges

func (m *LockMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*LockMutation) ClearedFields

func (m *LockMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (LockMutation) Client

func (m LockMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*LockMutation) CreatedAt

func (m *LockMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*LockMutation) EdgeCleared

func (m *LockMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*LockMutation) Env

func (m *LockMutation) Env() (r string, exists bool)

Env returns the value of the "env" field in the mutation.

func (*LockMutation) ExpiredAt

func (m *LockMutation) ExpiredAt() (r time.Time, exists bool)

ExpiredAt returns the value of the "expired_at" field in the mutation.

func (*LockMutation) ExpiredAtCleared

func (m *LockMutation) ExpiredAtCleared() bool

ExpiredAtCleared returns if the "expired_at" field was cleared in this mutation.

func (*LockMutation) Field

func (m *LockMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*LockMutation) FieldCleared

func (m *LockMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*LockMutation) Fields

func (m *LockMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*LockMutation) ID

func (m *LockMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*LockMutation) IDs

func (m *LockMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*LockMutation) OldCreatedAt

func (m *LockMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Lock entity. If the Lock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*LockMutation) OldEnv

func (m *LockMutation) OldEnv(ctx context.Context) (v string, err error)

OldEnv returns the old "env" field's value of the Lock entity. If the Lock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*LockMutation) OldExpiredAt

func (m *LockMutation) OldExpiredAt(ctx context.Context) (v *time.Time, err error)

OldExpiredAt returns the old "expired_at" field's value of the Lock entity. If the Lock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*LockMutation) OldField

func (m *LockMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*LockMutation) OldRepoID

func (m *LockMutation) OldRepoID(ctx context.Context) (v int64, err error)

OldRepoID returns the old "repo_id" field's value of the Lock entity. If the Lock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*LockMutation) OldUserID

func (m *LockMutation) OldUserID(ctx context.Context) (v int64, err error)

OldUserID returns the old "user_id" field's value of the Lock entity. If the Lock object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*LockMutation) Op

func (m *LockMutation) Op() Op

Op returns the operation name.

func (*LockMutation) RemovedEdges

func (m *LockMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*LockMutation) RemovedIDs

func (m *LockMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*LockMutation) RepoCleared

func (m *LockMutation) RepoCleared() bool

RepoCleared reports if the "repo" edge to the Repo entity was cleared.

func (*LockMutation) RepoID

func (m *LockMutation) RepoID() (r int64, exists bool)

RepoID returns the value of the "repo_id" field in the mutation.

func (*LockMutation) RepoIDs

func (m *LockMutation) RepoIDs() (ids []int64)

RepoIDs returns the "repo" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RepoID instead. It exists only for internal usage by the builders.

func (*LockMutation) ResetCreatedAt

func (m *LockMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*LockMutation) ResetEdge

func (m *LockMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*LockMutation) ResetEnv

func (m *LockMutation) ResetEnv()

ResetEnv resets all changes to the "env" field.

func (*LockMutation) ResetExpiredAt

func (m *LockMutation) ResetExpiredAt()

ResetExpiredAt resets all changes to the "expired_at" field.

func (*LockMutation) ResetField

func (m *LockMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*LockMutation) ResetRepo

func (m *LockMutation) ResetRepo()

ResetRepo resets all changes to the "repo" edge.

func (*LockMutation) ResetRepoID

func (m *LockMutation) ResetRepoID()

ResetRepoID resets all changes to the "repo_id" field.

func (*LockMutation) ResetUser

func (m *LockMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*LockMutation) ResetUserID

func (m *LockMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*LockMutation) SetCreatedAt

func (m *LockMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*LockMutation) SetEnv

func (m *LockMutation) SetEnv(s string)

SetEnv sets the "env" field.

func (*LockMutation) SetExpiredAt

func (m *LockMutation) SetExpiredAt(t time.Time)

SetExpiredAt sets the "expired_at" field.

func (*LockMutation) SetField

func (m *LockMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*LockMutation) SetRepoID

func (m *LockMutation) SetRepoID(i int64)

SetRepoID sets the "repo_id" field.

func (*LockMutation) SetUserID

func (m *LockMutation) SetUserID(i int64)

SetUserID sets the "user_id" field.

func (LockMutation) Tx

func (m LockMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*LockMutation) Type

func (m *LockMutation) Type() string

Type returns the node type of this mutation (Lock).

func (*LockMutation) UserCleared

func (m *LockMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*LockMutation) UserID

func (m *LockMutation) UserID() (r int64, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*LockMutation) UserIDCleared

func (m *LockMutation) UserIDCleared() bool

UserIDCleared returns if the "user_id" field was cleared in this mutation.

func (*LockMutation) UserIDs

func (m *LockMutation) UserIDs() (ids []int64)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*LockMutation) Where

func (m *LockMutation) Where(ps ...predicate.Lock)

Where appends a list predicates to the LockMutation builder.

type LockQuery

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

LockQuery is the builder for querying Lock entities.

func (*LockQuery) All

func (lq *LockQuery) All(ctx context.Context) ([]*Lock, error)

All executes the query and returns a list of Locks.

func (*LockQuery) AllX

func (lq *LockQuery) AllX(ctx context.Context) []*Lock

AllX is like All, but panics if an error occurs.

func (*LockQuery) Clone

func (lq *LockQuery) Clone() *LockQuery

Clone returns a duplicate of the LockQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*LockQuery) Count

func (lq *LockQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*LockQuery) CountX

func (lq *LockQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*LockQuery) Exist

func (lq *LockQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*LockQuery) ExistX

func (lq *LockQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*LockQuery) First

func (lq *LockQuery) First(ctx context.Context) (*Lock, error)

First returns the first Lock entity from the query. Returns a *NotFoundError when no Lock was found.

func (*LockQuery) FirstID

func (lq *LockQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Lock ID from the query. Returns a *NotFoundError when no Lock ID was found.

func (*LockQuery) FirstIDX

func (lq *LockQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*LockQuery) FirstX

func (lq *LockQuery) FirstX(ctx context.Context) *Lock

FirstX is like First, but panics if an error occurs.

func (*LockQuery) ForShare

func (lq *LockQuery) ForShare(opts ...sql.LockOption) *LockQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*LockQuery) ForUpdate

func (lq *LockQuery) ForUpdate(opts ...sql.LockOption) *LockQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*LockQuery) GroupBy

func (lq *LockQuery) GroupBy(field string, fields ...string) *LockGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Env string `json:"env"`
	Count int `json:"count,omitempty"`
}

client.Lock.Query().
	GroupBy(lock.FieldEnv).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*LockQuery) IDs

func (lq *LockQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Lock IDs.

func (*LockQuery) IDsX

func (lq *LockQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*LockQuery) Limit

func (lq *LockQuery) Limit(limit int) *LockQuery

Limit adds a limit step to the query.

func (*LockQuery) Offset

func (lq *LockQuery) Offset(offset int) *LockQuery

Offset adds an offset step to the query.

func (*LockQuery) Only

func (lq *LockQuery) Only(ctx context.Context) (*Lock, error)

Only returns a single Lock entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Lock entity is found. Returns a *NotFoundError when no Lock entities are found.

func (*LockQuery) OnlyID

func (lq *LockQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Lock ID in the query. Returns a *NotSingularError when more than one Lock ID is found. Returns a *NotFoundError when no entities are found.

func (*LockQuery) OnlyIDX

func (lq *LockQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*LockQuery) OnlyX

func (lq *LockQuery) OnlyX(ctx context.Context) *Lock

OnlyX is like Only, but panics if an error occurs.

func (*LockQuery) Order

func (lq *LockQuery) Order(o ...OrderFunc) *LockQuery

Order adds an order step to the query.

func (*LockQuery) QueryRepo

func (lq *LockQuery) QueryRepo() *RepoQuery

QueryRepo chains the current query on the "repo" edge.

func (*LockQuery) QueryUser

func (lq *LockQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*LockQuery) Select

func (lq *LockQuery) Select(fields ...string) *LockSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Env string `json:"env"`
}

client.Lock.Query().
	Select(lock.FieldEnv).
	Scan(ctx, &v)

func (*LockQuery) Unique

func (lq *LockQuery) Unique(unique bool) *LockQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*LockQuery) Where

func (lq *LockQuery) Where(ps ...predicate.Lock) *LockQuery

Where adds a new predicate for the LockQuery builder.

func (*LockQuery) WithRepo

func (lq *LockQuery) WithRepo(opts ...func(*RepoQuery)) *LockQuery

WithRepo tells the query-builder to eager-load the nodes that are connected to the "repo" edge. The optional arguments are used to configure the query builder of the edge.

func (*LockQuery) WithUser

func (lq *LockQuery) WithUser(opts ...func(*UserQuery)) *LockQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type LockSelect

type LockSelect struct {
	*LockQuery
	// contains filtered or unexported fields
}

LockSelect is the builder for selecting fields of Lock entities.

func (*LockSelect) Bool

func (ls *LockSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*LockSelect) BoolX

func (ls *LockSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*LockSelect) Bools

func (ls *LockSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*LockSelect) BoolsX

func (ls *LockSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*LockSelect) Float64

func (ls *LockSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*LockSelect) Float64X

func (ls *LockSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*LockSelect) Float64s

func (ls *LockSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*LockSelect) Float64sX

func (ls *LockSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*LockSelect) Int

func (ls *LockSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*LockSelect) IntX

func (ls *LockSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*LockSelect) Ints

func (ls *LockSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*LockSelect) IntsX

func (ls *LockSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*LockSelect) Scan

func (ls *LockSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*LockSelect) ScanX

func (ls *LockSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*LockSelect) String

func (ls *LockSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*LockSelect) StringX

func (ls *LockSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*LockSelect) Strings

func (ls *LockSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*LockSelect) StringsX

func (ls *LockSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type LockUpdate

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

LockUpdate is the builder for updating Lock entities.

func (*LockUpdate) ClearExpiredAt

func (lu *LockUpdate) ClearExpiredAt() *LockUpdate

ClearExpiredAt clears the value of the "expired_at" field.

func (*LockUpdate) ClearRepo

func (lu *LockUpdate) ClearRepo() *LockUpdate

ClearRepo clears the "repo" edge to the Repo entity.

func (*LockUpdate) ClearUser

func (lu *LockUpdate) ClearUser() *LockUpdate

ClearUser clears the "user" edge to the User entity.

func (*LockUpdate) ClearUserID

func (lu *LockUpdate) ClearUserID() *LockUpdate

ClearUserID clears the value of the "user_id" field.

func (*LockUpdate) Exec

func (lu *LockUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*LockUpdate) ExecX

func (lu *LockUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LockUpdate) Mutation

func (lu *LockUpdate) Mutation() *LockMutation

Mutation returns the LockMutation object of the builder.

func (*LockUpdate) Save

func (lu *LockUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*LockUpdate) SaveX

func (lu *LockUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*LockUpdate) SetCreatedAt

func (lu *LockUpdate) SetCreatedAt(t time.Time) *LockUpdate

SetCreatedAt sets the "created_at" field.

func (*LockUpdate) SetEnv

func (lu *LockUpdate) SetEnv(s string) *LockUpdate

SetEnv sets the "env" field.

func (*LockUpdate) SetExpiredAt

func (lu *LockUpdate) SetExpiredAt(t time.Time) *LockUpdate

SetExpiredAt sets the "expired_at" field.

func (*LockUpdate) SetNillableCreatedAt

func (lu *LockUpdate) SetNillableCreatedAt(t *time.Time) *LockUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*LockUpdate) SetNillableExpiredAt

func (lu *LockUpdate) SetNillableExpiredAt(t *time.Time) *LockUpdate

SetNillableExpiredAt sets the "expired_at" field if the given value is not nil.

func (*LockUpdate) SetNillableUserID

func (lu *LockUpdate) SetNillableUserID(i *int64) *LockUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*LockUpdate) SetRepo

func (lu *LockUpdate) SetRepo(r *Repo) *LockUpdate

SetRepo sets the "repo" edge to the Repo entity.

func (*LockUpdate) SetRepoID

func (lu *LockUpdate) SetRepoID(i int64) *LockUpdate

SetRepoID sets the "repo_id" field.

func (*LockUpdate) SetUser

func (lu *LockUpdate) SetUser(u *User) *LockUpdate

SetUser sets the "user" edge to the User entity.

func (*LockUpdate) SetUserID

func (lu *LockUpdate) SetUserID(i int64) *LockUpdate

SetUserID sets the "user_id" field.

func (*LockUpdate) Where

func (lu *LockUpdate) Where(ps ...predicate.Lock) *LockUpdate

Where appends a list predicates to the LockUpdate builder.

type LockUpdateOne

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

LockUpdateOne is the builder for updating a single Lock entity.

func (*LockUpdateOne) ClearExpiredAt

func (luo *LockUpdateOne) ClearExpiredAt() *LockUpdateOne

ClearExpiredAt clears the value of the "expired_at" field.

func (*LockUpdateOne) ClearRepo

func (luo *LockUpdateOne) ClearRepo() *LockUpdateOne

ClearRepo clears the "repo" edge to the Repo entity.

func (*LockUpdateOne) ClearUser

func (luo *LockUpdateOne) ClearUser() *LockUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*LockUpdateOne) ClearUserID

func (luo *LockUpdateOne) ClearUserID() *LockUpdateOne

ClearUserID clears the value of the "user_id" field.

func (*LockUpdateOne) Exec

func (luo *LockUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*LockUpdateOne) ExecX

func (luo *LockUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*LockUpdateOne) Mutation

func (luo *LockUpdateOne) Mutation() *LockMutation

Mutation returns the LockMutation object of the builder.

func (*LockUpdateOne) Save

func (luo *LockUpdateOne) Save(ctx context.Context) (*Lock, error)

Save executes the query and returns the updated Lock entity.

func (*LockUpdateOne) SaveX

func (luo *LockUpdateOne) SaveX(ctx context.Context) *Lock

SaveX is like Save, but panics if an error occurs.

func (*LockUpdateOne) Select

func (luo *LockUpdateOne) Select(field string, fields ...string) *LockUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*LockUpdateOne) SetCreatedAt

func (luo *LockUpdateOne) SetCreatedAt(t time.Time) *LockUpdateOne

SetCreatedAt sets the "created_at" field.

func (*LockUpdateOne) SetEnv

func (luo *LockUpdateOne) SetEnv(s string) *LockUpdateOne

SetEnv sets the "env" field.

func (*LockUpdateOne) SetExpiredAt

func (luo *LockUpdateOne) SetExpiredAt(t time.Time) *LockUpdateOne

SetExpiredAt sets the "expired_at" field.

func (*LockUpdateOne) SetNillableCreatedAt

func (luo *LockUpdateOne) SetNillableCreatedAt(t *time.Time) *LockUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*LockUpdateOne) SetNillableExpiredAt

func (luo *LockUpdateOne) SetNillableExpiredAt(t *time.Time) *LockUpdateOne

SetNillableExpiredAt sets the "expired_at" field if the given value is not nil.

func (*LockUpdateOne) SetNillableUserID

func (luo *LockUpdateOne) SetNillableUserID(i *int64) *LockUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*LockUpdateOne) SetRepo

func (luo *LockUpdateOne) SetRepo(r *Repo) *LockUpdateOne

SetRepo sets the "repo" edge to the Repo entity.

func (*LockUpdateOne) SetRepoID

func (luo *LockUpdateOne) SetRepoID(i int64) *LockUpdateOne

SetRepoID sets the "repo_id" field.

func (*LockUpdateOne) SetUser

func (luo *LockUpdateOne) SetUser(u *User) *LockUpdateOne

SetUser sets the "user" edge to the User entity.

func (*LockUpdateOne) SetUserID

func (luo *LockUpdateOne) SetUserID(i int64) *LockUpdateOne

SetUserID sets the "user_id" field.

type Locks

type Locks []*Lock

Locks is a parsable slice of Lock.

type MutateFunc

type MutateFunc = ent.MutateFunc

ent aliases to avoid import conflicts in user's code.

type Mutation

type Mutation = ent.Mutation

ent aliases to avoid import conflicts in user's code.

type Mutator

type Mutator = ent.Mutator

ent aliases to avoid import conflicts in user's code.

type NotFoundError

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

NotFoundError returns when trying to fetch a specific entity and it was not found in the database.

func (*NotFoundError) Error

func (e *NotFoundError) Error() string

Error implements the error interface.

type NotLoadedError

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

NotLoadedError returns when trying to get a node that was not loaded by the query.

func (*NotLoadedError) Error

func (e *NotLoadedError) Error() string

Error implements the error interface.

type NotSingularError

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

NotSingularError returns when trying to fetch a singular entity and more then one was found in the database.

func (*NotSingularError) Error

func (e *NotSingularError) Error() string

Error implements the error interface.

type NotificationRecord

type NotificationRecord struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// EventID holds the value of the "event_id" field.
	EventID int `json:"event_id,omitemtpy"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the NotificationRecordQuery when eager-loading is set.
	Edges NotificationRecordEdges `json:"edges"`
	// contains filtered or unexported fields
}

NotificationRecord is the model entity for the NotificationRecord schema.

func (*NotificationRecord) QueryEvent

func (nr *NotificationRecord) QueryEvent() *EventQuery

QueryEvent queries the "event" edge of the NotificationRecord entity.

func (*NotificationRecord) String

func (nr *NotificationRecord) String() string

String implements the fmt.Stringer.

func (*NotificationRecord) Unwrap

func (nr *NotificationRecord) Unwrap() *NotificationRecord

Unwrap unwraps the NotificationRecord entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*NotificationRecord) Update

Update returns a builder for updating this NotificationRecord. Note that you need to call NotificationRecord.Unwrap() before calling this method if this NotificationRecord was returned from a transaction, and the transaction was committed or rolled back.

type NotificationRecordClient

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

NotificationRecordClient is a client for the NotificationRecord schema.

func NewNotificationRecordClient

func NewNotificationRecordClient(c config) *NotificationRecordClient

NewNotificationRecordClient returns a client for the NotificationRecord from the given config.

func (*NotificationRecordClient) Create

Create returns a create builder for NotificationRecord.

func (*NotificationRecordClient) CreateBulk

CreateBulk returns a builder for creating a bulk of NotificationRecord entities.

func (*NotificationRecordClient) Delete

Delete returns a delete builder for NotificationRecord.

func (*NotificationRecordClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*NotificationRecordClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*NotificationRecordClient) Get

Get returns a NotificationRecord entity by its id.

func (*NotificationRecordClient) GetX

GetX is like Get, but panics if an error occurs.

func (*NotificationRecordClient) Hooks

func (c *NotificationRecordClient) Hooks() []Hook

Hooks returns the client hooks.

func (*NotificationRecordClient) Query

Query returns a query builder for NotificationRecord.

func (*NotificationRecordClient) QueryEvent

QueryEvent queries the event edge of a NotificationRecord.

func (*NotificationRecordClient) Update

Update returns an update builder for NotificationRecord.

func (*NotificationRecordClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*NotificationRecordClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*NotificationRecordClient) Use

func (c *NotificationRecordClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `notificationrecord.Hooks(f(g(h())))`.

type NotificationRecordCreate

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

NotificationRecordCreate is the builder for creating a NotificationRecord entity.

func (*NotificationRecordCreate) Exec

Exec executes the query.

func (*NotificationRecordCreate) ExecX

func (nrc *NotificationRecordCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NotificationRecordCreate) Mutation

Mutation returns the NotificationRecordMutation object of the builder.

func (*NotificationRecordCreate) Save

Save creates the NotificationRecord in the database.

func (*NotificationRecordCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*NotificationRecordCreate) SetEvent

SetEvent sets the "event" edge to the Event entity.

func (*NotificationRecordCreate) SetEventID

SetEventID sets the "event_id" field.

func (*NotificationRecordCreate) SetNillableEventID

func (nrc *NotificationRecordCreate) SetNillableEventID(i *int) *NotificationRecordCreate

SetNillableEventID sets the "event_id" field if the given value is not nil.

type NotificationRecordCreateBulk

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

NotificationRecordCreateBulk is the builder for creating many NotificationRecord entities in bulk.

func (*NotificationRecordCreateBulk) Exec

Exec executes the query.

func (*NotificationRecordCreateBulk) ExecX

func (nrcb *NotificationRecordCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NotificationRecordCreateBulk) Save

Save creates the NotificationRecord entities in the database.

func (*NotificationRecordCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type NotificationRecordDelete

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

NotificationRecordDelete is the builder for deleting a NotificationRecord entity.

func (*NotificationRecordDelete) Exec

func (nrd *NotificationRecordDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*NotificationRecordDelete) ExecX

func (nrd *NotificationRecordDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*NotificationRecordDelete) Where

Where appends a list predicates to the NotificationRecordDelete builder.

type NotificationRecordDeleteOne

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

NotificationRecordDeleteOne is the builder for deleting a single NotificationRecord entity.

func (*NotificationRecordDeleteOne) Exec

Exec executes the deletion query.

func (*NotificationRecordDeleteOne) ExecX

func (nrdo *NotificationRecordDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type NotificationRecordEdges

type NotificationRecordEdges struct {
	// Event holds the value of the event edge.
	Event *Event `json:"event,omitempty"`
	// contains filtered or unexported fields
}

NotificationRecordEdges holds the relations/edges for other nodes in the graph.

func (NotificationRecordEdges) EventOrErr

func (e NotificationRecordEdges) EventOrErr() (*Event, error)

EventOrErr returns the Event value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type NotificationRecordGroupBy

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

NotificationRecordGroupBy is the group-by builder for NotificationRecord entities.

func (*NotificationRecordGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*NotificationRecordGroupBy) Bool

func (nrgb *NotificationRecordGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*NotificationRecordGroupBy) BoolX

func (nrgb *NotificationRecordGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NotificationRecordGroupBy) Bools

func (nrgb *NotificationRecordGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*NotificationRecordGroupBy) BoolsX

func (nrgb *NotificationRecordGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NotificationRecordGroupBy) Float64

func (nrgb *NotificationRecordGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*NotificationRecordGroupBy) Float64X

func (nrgb *NotificationRecordGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NotificationRecordGroupBy) Float64s

func (nrgb *NotificationRecordGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*NotificationRecordGroupBy) Float64sX

func (nrgb *NotificationRecordGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NotificationRecordGroupBy) Int

func (nrgb *NotificationRecordGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*NotificationRecordGroupBy) IntX

func (nrgb *NotificationRecordGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*NotificationRecordGroupBy) Ints

func (nrgb *NotificationRecordGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*NotificationRecordGroupBy) IntsX

func (nrgb *NotificationRecordGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NotificationRecordGroupBy) Scan

func (nrgb *NotificationRecordGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*NotificationRecordGroupBy) ScanX

func (nrgb *NotificationRecordGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*NotificationRecordGroupBy) String

func (nrgb *NotificationRecordGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*NotificationRecordGroupBy) StringX

func (nrgb *NotificationRecordGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NotificationRecordGroupBy) Strings

func (nrgb *NotificationRecordGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*NotificationRecordGroupBy) StringsX

func (nrgb *NotificationRecordGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NotificationRecordMutation

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

NotificationRecordMutation represents an operation that mutates the NotificationRecord nodes in the graph.

func (*NotificationRecordMutation) AddField

func (m *NotificationRecordMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*NotificationRecordMutation) AddedEdges

func (m *NotificationRecordMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*NotificationRecordMutation) AddedField

func (m *NotificationRecordMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*NotificationRecordMutation) AddedFields

func (m *NotificationRecordMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*NotificationRecordMutation) AddedIDs

func (m *NotificationRecordMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*NotificationRecordMutation) ClearEdge

func (m *NotificationRecordMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*NotificationRecordMutation) ClearEvent

func (m *NotificationRecordMutation) ClearEvent()

ClearEvent clears the "event" edge to the Event entity.

func (*NotificationRecordMutation) ClearEventID

func (m *NotificationRecordMutation) ClearEventID()

ClearEventID clears the value of the "event_id" field.

func (*NotificationRecordMutation) ClearField

func (m *NotificationRecordMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*NotificationRecordMutation) ClearedEdges

func (m *NotificationRecordMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*NotificationRecordMutation) ClearedFields

func (m *NotificationRecordMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (NotificationRecordMutation) Client

func (m NotificationRecordMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*NotificationRecordMutation) EdgeCleared

func (m *NotificationRecordMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*NotificationRecordMutation) EventCleared

func (m *NotificationRecordMutation) EventCleared() bool

EventCleared reports if the "event" edge to the Event entity was cleared.

func (*NotificationRecordMutation) EventID

func (m *NotificationRecordMutation) EventID() (r int, exists bool)

EventID returns the value of the "event_id" field in the mutation.

func (*NotificationRecordMutation) EventIDCleared

func (m *NotificationRecordMutation) EventIDCleared() bool

EventIDCleared returns if the "event_id" field was cleared in this mutation.

func (*NotificationRecordMutation) EventIDs

func (m *NotificationRecordMutation) EventIDs() (ids []int)

EventIDs returns the "event" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use EventID instead. It exists only for internal usage by the builders.

func (*NotificationRecordMutation) Field

func (m *NotificationRecordMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*NotificationRecordMutation) FieldCleared

func (m *NotificationRecordMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*NotificationRecordMutation) Fields

func (m *NotificationRecordMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*NotificationRecordMutation) ID

func (m *NotificationRecordMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*NotificationRecordMutation) IDs

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*NotificationRecordMutation) OldEventID

func (m *NotificationRecordMutation) OldEventID(ctx context.Context) (v int, err error)

OldEventID returns the old "event_id" field's value of the NotificationRecord entity. If the NotificationRecord object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*NotificationRecordMutation) OldField

func (m *NotificationRecordMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*NotificationRecordMutation) Op

Op returns the operation name.

func (*NotificationRecordMutation) RemovedEdges

func (m *NotificationRecordMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*NotificationRecordMutation) RemovedIDs

func (m *NotificationRecordMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*NotificationRecordMutation) ResetEdge

func (m *NotificationRecordMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*NotificationRecordMutation) ResetEvent

func (m *NotificationRecordMutation) ResetEvent()

ResetEvent resets all changes to the "event" edge.

func (*NotificationRecordMutation) ResetEventID

func (m *NotificationRecordMutation) ResetEventID()

ResetEventID resets all changes to the "event_id" field.

func (*NotificationRecordMutation) ResetField

func (m *NotificationRecordMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*NotificationRecordMutation) SetEventID

func (m *NotificationRecordMutation) SetEventID(i int)

SetEventID sets the "event_id" field.

func (*NotificationRecordMutation) SetField

func (m *NotificationRecordMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (NotificationRecordMutation) Tx

func (m NotificationRecordMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*NotificationRecordMutation) Type

Type returns the node type of this mutation (NotificationRecord).

func (*NotificationRecordMutation) Where

Where appends a list predicates to the NotificationRecordMutation builder.

type NotificationRecordQuery

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

NotificationRecordQuery is the builder for querying NotificationRecord entities.

func (*NotificationRecordQuery) All

All executes the query and returns a list of NotificationRecords.

func (*NotificationRecordQuery) AllX

AllX is like All, but panics if an error occurs.

func (*NotificationRecordQuery) Clone

Clone returns a duplicate of the NotificationRecordQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*NotificationRecordQuery) Count

func (nrq *NotificationRecordQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*NotificationRecordQuery) CountX

func (nrq *NotificationRecordQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*NotificationRecordQuery) Exist

func (nrq *NotificationRecordQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*NotificationRecordQuery) ExistX

func (nrq *NotificationRecordQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*NotificationRecordQuery) First

First returns the first NotificationRecord entity from the query. Returns a *NotFoundError when no NotificationRecord was found.

func (*NotificationRecordQuery) FirstID

func (nrq *NotificationRecordQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first NotificationRecord ID from the query. Returns a *NotFoundError when no NotificationRecord ID was found.

func (*NotificationRecordQuery) FirstIDX

func (nrq *NotificationRecordQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*NotificationRecordQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*NotificationRecordQuery) ForShare

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*NotificationRecordQuery) ForUpdate

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*NotificationRecordQuery) GroupBy

func (nrq *NotificationRecordQuery) GroupBy(field string, fields ...string) *NotificationRecordGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	EventID int `json:"event_id,omitemtpy"`
	Count int `json:"count,omitempty"`
}

client.NotificationRecord.Query().
	GroupBy(notificationrecord.FieldEventID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*NotificationRecordQuery) IDs

func (nrq *NotificationRecordQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of NotificationRecord IDs.

func (*NotificationRecordQuery) IDsX

func (nrq *NotificationRecordQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*NotificationRecordQuery) Limit

Limit adds a limit step to the query.

func (*NotificationRecordQuery) Offset

Offset adds an offset step to the query.

func (*NotificationRecordQuery) Only

Only returns a single NotificationRecord entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one NotificationRecord entity is found. Returns a *NotFoundError when no NotificationRecord entities are found.

func (*NotificationRecordQuery) OnlyID

func (nrq *NotificationRecordQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only NotificationRecord ID in the query. Returns a *NotSingularError when more than one NotificationRecord ID is found. Returns a *NotFoundError when no entities are found.

func (*NotificationRecordQuery) OnlyIDX

func (nrq *NotificationRecordQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*NotificationRecordQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*NotificationRecordQuery) Order

Order adds an order step to the query.

func (*NotificationRecordQuery) QueryEvent

func (nrq *NotificationRecordQuery) QueryEvent() *EventQuery

QueryEvent chains the current query on the "event" edge.

func (*NotificationRecordQuery) Select

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	EventID int `json:"event_id,omitemtpy"`
}

client.NotificationRecord.Query().
	Select(notificationrecord.FieldEventID).
	Scan(ctx, &v)

func (*NotificationRecordQuery) Unique

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*NotificationRecordQuery) Where

Where adds a new predicate for the NotificationRecordQuery builder.

func (*NotificationRecordQuery) WithEvent

func (nrq *NotificationRecordQuery) WithEvent(opts ...func(*EventQuery)) *NotificationRecordQuery

WithEvent tells the query-builder to eager-load the nodes that are connected to the "event" edge. The optional arguments are used to configure the query builder of the edge.

type NotificationRecordSelect

type NotificationRecordSelect struct {
	*NotificationRecordQuery
	// contains filtered or unexported fields
}

NotificationRecordSelect is the builder for selecting fields of NotificationRecord entities.

func (*NotificationRecordSelect) Bool

func (nrs *NotificationRecordSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*NotificationRecordSelect) BoolX

func (nrs *NotificationRecordSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*NotificationRecordSelect) Bools

func (nrs *NotificationRecordSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*NotificationRecordSelect) BoolsX

func (nrs *NotificationRecordSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*NotificationRecordSelect) Float64

func (nrs *NotificationRecordSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*NotificationRecordSelect) Float64X

func (nrs *NotificationRecordSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*NotificationRecordSelect) Float64s

func (nrs *NotificationRecordSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*NotificationRecordSelect) Float64sX

func (nrs *NotificationRecordSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*NotificationRecordSelect) Int

func (nrs *NotificationRecordSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*NotificationRecordSelect) IntX

IntX is like Int, but panics if an error occurs.

func (*NotificationRecordSelect) Ints

func (nrs *NotificationRecordSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*NotificationRecordSelect) IntsX

func (nrs *NotificationRecordSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*NotificationRecordSelect) Scan

func (nrs *NotificationRecordSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*NotificationRecordSelect) ScanX

func (nrs *NotificationRecordSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*NotificationRecordSelect) String

func (nrs *NotificationRecordSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*NotificationRecordSelect) StringX

func (nrs *NotificationRecordSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*NotificationRecordSelect) Strings

func (nrs *NotificationRecordSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*NotificationRecordSelect) StringsX

func (nrs *NotificationRecordSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type NotificationRecordUpdate

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

NotificationRecordUpdate is the builder for updating NotificationRecord entities.

func (*NotificationRecordUpdate) ClearEvent

ClearEvent clears the "event" edge to the Event entity.

func (*NotificationRecordUpdate) ClearEventID

ClearEventID clears the value of the "event_id" field.

func (*NotificationRecordUpdate) Exec

Exec executes the query.

func (*NotificationRecordUpdate) ExecX

func (nru *NotificationRecordUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NotificationRecordUpdate) Mutation

Mutation returns the NotificationRecordMutation object of the builder.

func (*NotificationRecordUpdate) Save

func (nru *NotificationRecordUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*NotificationRecordUpdate) SaveX

func (nru *NotificationRecordUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*NotificationRecordUpdate) SetEvent

SetEvent sets the "event" edge to the Event entity.

func (*NotificationRecordUpdate) SetEventID

SetEventID sets the "event_id" field.

func (*NotificationRecordUpdate) SetNillableEventID

func (nru *NotificationRecordUpdate) SetNillableEventID(i *int) *NotificationRecordUpdate

SetNillableEventID sets the "event_id" field if the given value is not nil.

func (*NotificationRecordUpdate) Where

Where appends a list predicates to the NotificationRecordUpdate builder.

type NotificationRecordUpdateOne

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

NotificationRecordUpdateOne is the builder for updating a single NotificationRecord entity.

func (*NotificationRecordUpdateOne) ClearEvent

ClearEvent clears the "event" edge to the Event entity.

func (*NotificationRecordUpdateOne) ClearEventID

ClearEventID clears the value of the "event_id" field.

func (*NotificationRecordUpdateOne) Exec

Exec executes the query on the entity.

func (*NotificationRecordUpdateOne) ExecX

func (nruo *NotificationRecordUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*NotificationRecordUpdateOne) Mutation

Mutation returns the NotificationRecordMutation object of the builder.

func (*NotificationRecordUpdateOne) Save

Save executes the query and returns the updated NotificationRecord entity.

func (*NotificationRecordUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*NotificationRecordUpdateOne) Select

func (nruo *NotificationRecordUpdateOne) Select(field string, fields ...string) *NotificationRecordUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*NotificationRecordUpdateOne) SetEvent

SetEvent sets the "event" edge to the Event entity.

func (*NotificationRecordUpdateOne) SetEventID

SetEventID sets the "event_id" field.

func (*NotificationRecordUpdateOne) SetNillableEventID

func (nruo *NotificationRecordUpdateOne) SetNillableEventID(i *int) *NotificationRecordUpdateOne

SetNillableEventID sets the "event_id" field if the given value is not nil.

type NotificationRecords

type NotificationRecords []*NotificationRecord

NotificationRecords is a parsable slice of NotificationRecord.

type Op

type Op = ent.Op

ent aliases to avoid import conflicts in user's code.

type Option

type Option func(*config)

Option function to configure the client.

func Debug

func Debug() Option

Debug enables debug logging on the ent.Driver.

func Driver

func Driver(driver dialect.Driver) Option

Driver configures the client driver.

func Log

func Log(fn func(...interface{})) Option

Log sets the logging function for debug mode.

type OrderFunc

type OrderFunc func(*sql.Selector)

OrderFunc applies an ordering on the sql selector.

func Asc

func Asc(fields ...string) OrderFunc

Asc applies the given fields in ASC order.

func Desc

func Desc(fields ...string) OrderFunc

Desc applies the given fields in DESC order.

type Perm

type Perm struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// RepoPerm holds the value of the "repo_perm" field.
	RepoPerm perm.RepoPerm `json:"repo_perm"`
	// SyncedAt holds the value of the "synced_at" field.
	SyncedAt time.Time `json:"synced_at,omitemtpy"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at"`
	// UserID holds the value of the "user_id" field.
	UserID int64 `json:"user_id"`
	// RepoID holds the value of the "repo_id" field.
	RepoID int64 `json:"repo_id"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PermQuery when eager-loading is set.
	Edges PermEdges `json:"edges"`
	// contains filtered or unexported fields
}

Perm is the model entity for the Perm schema.

func (*Perm) QueryRepo

func (pe *Perm) QueryRepo() *RepoQuery

QueryRepo queries the "repo" edge of the Perm entity.

func (*Perm) QueryUser

func (pe *Perm) QueryUser() *UserQuery

QueryUser queries the "user" edge of the Perm entity.

func (*Perm) String

func (pe *Perm) String() string

String implements the fmt.Stringer.

func (*Perm) Unwrap

func (pe *Perm) Unwrap() *Perm

Unwrap unwraps the Perm entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Perm) Update

func (pe *Perm) Update() *PermUpdateOne

Update returns a builder for updating this Perm. Note that you need to call Perm.Unwrap() before calling this method if this Perm was returned from a transaction, and the transaction was committed or rolled back.

type PermClient

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

PermClient is a client for the Perm schema.

func NewPermClient

func NewPermClient(c config) *PermClient

NewPermClient returns a client for the Perm from the given config.

func (*PermClient) Create

func (c *PermClient) Create() *PermCreate

Create returns a create builder for Perm.

func (*PermClient) CreateBulk

func (c *PermClient) CreateBulk(builders ...*PermCreate) *PermCreateBulk

CreateBulk returns a builder for creating a bulk of Perm entities.

func (*PermClient) Delete

func (c *PermClient) Delete() *PermDelete

Delete returns a delete builder for Perm.

func (*PermClient) DeleteOne

func (c *PermClient) DeleteOne(pe *Perm) *PermDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*PermClient) DeleteOneID

func (c *PermClient) DeleteOneID(id int) *PermDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*PermClient) Get

func (c *PermClient) Get(ctx context.Context, id int) (*Perm, error)

Get returns a Perm entity by its id.

func (*PermClient) GetX

func (c *PermClient) GetX(ctx context.Context, id int) *Perm

GetX is like Get, but panics if an error occurs.

func (*PermClient) Hooks

func (c *PermClient) Hooks() []Hook

Hooks returns the client hooks.

func (*PermClient) Query

func (c *PermClient) Query() *PermQuery

Query returns a query builder for Perm.

func (*PermClient) QueryRepo

func (c *PermClient) QueryRepo(pe *Perm) *RepoQuery

QueryRepo queries the repo edge of a Perm.

func (*PermClient) QueryUser

func (c *PermClient) QueryUser(pe *Perm) *UserQuery

QueryUser queries the user edge of a Perm.

func (*PermClient) Update

func (c *PermClient) Update() *PermUpdate

Update returns an update builder for Perm.

func (*PermClient) UpdateOne

func (c *PermClient) UpdateOne(pe *Perm) *PermUpdateOne

UpdateOne returns an update builder for the given entity.

func (*PermClient) UpdateOneID

func (c *PermClient) UpdateOneID(id int) *PermUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PermClient) Use

func (c *PermClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `perm.Hooks(f(g(h())))`.

type PermCreate

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

PermCreate is the builder for creating a Perm entity.

func (*PermCreate) Exec

func (pc *PermCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PermCreate) ExecX

func (pc *PermCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PermCreate) Mutation

func (pc *PermCreate) Mutation() *PermMutation

Mutation returns the PermMutation object of the builder.

func (*PermCreate) Save

func (pc *PermCreate) Save(ctx context.Context) (*Perm, error)

Save creates the Perm in the database.

func (*PermCreate) SaveX

func (pc *PermCreate) SaveX(ctx context.Context) *Perm

SaveX calls Save and panics if Save returns an error.

func (*PermCreate) SetCreatedAt

func (pc *PermCreate) SetCreatedAt(t time.Time) *PermCreate

SetCreatedAt sets the "created_at" field.

func (*PermCreate) SetNillableCreatedAt

func (pc *PermCreate) SetNillableCreatedAt(t *time.Time) *PermCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PermCreate) SetNillableRepoPerm

func (pc *PermCreate) SetNillableRepoPerm(pp *perm.RepoPerm) *PermCreate

SetNillableRepoPerm sets the "repo_perm" field if the given value is not nil.

func (*PermCreate) SetNillableSyncedAt

func (pc *PermCreate) SetNillableSyncedAt(t *time.Time) *PermCreate

SetNillableSyncedAt sets the "synced_at" field if the given value is not nil.

func (*PermCreate) SetNillableUpdatedAt

func (pc *PermCreate) SetNillableUpdatedAt(t *time.Time) *PermCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*PermCreate) SetRepo

func (pc *PermCreate) SetRepo(r *Repo) *PermCreate

SetRepo sets the "repo" edge to the Repo entity.

func (*PermCreate) SetRepoID

func (pc *PermCreate) SetRepoID(i int64) *PermCreate

SetRepoID sets the "repo_id" field.

func (*PermCreate) SetRepoPerm

func (pc *PermCreate) SetRepoPerm(pp perm.RepoPerm) *PermCreate

SetRepoPerm sets the "repo_perm" field.

func (*PermCreate) SetSyncedAt

func (pc *PermCreate) SetSyncedAt(t time.Time) *PermCreate

SetSyncedAt sets the "synced_at" field.

func (*PermCreate) SetUpdatedAt

func (pc *PermCreate) SetUpdatedAt(t time.Time) *PermCreate

SetUpdatedAt sets the "updated_at" field.

func (*PermCreate) SetUser

func (pc *PermCreate) SetUser(u *User) *PermCreate

SetUser sets the "user" edge to the User entity.

func (*PermCreate) SetUserID

func (pc *PermCreate) SetUserID(i int64) *PermCreate

SetUserID sets the "user_id" field.

type PermCreateBulk

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

PermCreateBulk is the builder for creating many Perm entities in bulk.

func (*PermCreateBulk) Exec

func (pcb *PermCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PermCreateBulk) ExecX

func (pcb *PermCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PermCreateBulk) Save

func (pcb *PermCreateBulk) Save(ctx context.Context) ([]*Perm, error)

Save creates the Perm entities in the database.

func (*PermCreateBulk) SaveX

func (pcb *PermCreateBulk) SaveX(ctx context.Context) []*Perm

SaveX is like Save, but panics if an error occurs.

type PermDelete

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

PermDelete is the builder for deleting a Perm entity.

func (*PermDelete) Exec

func (pd *PermDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*PermDelete) ExecX

func (pd *PermDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*PermDelete) Where

func (pd *PermDelete) Where(ps ...predicate.Perm) *PermDelete

Where appends a list predicates to the PermDelete builder.

type PermDeleteOne

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

PermDeleteOne is the builder for deleting a single Perm entity.

func (*PermDeleteOne) Exec

func (pdo *PermDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PermDeleteOne) ExecX

func (pdo *PermDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type PermEdges

type PermEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// Repo holds the value of the repo edge.
	Repo *Repo `json:"repo,omitempty"`
	// contains filtered or unexported fields
}

PermEdges holds the relations/edges for other nodes in the graph.

func (PermEdges) RepoOrErr

func (e PermEdges) RepoOrErr() (*Repo, error)

RepoOrErr returns the Repo value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (PermEdges) UserOrErr

func (e PermEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type PermGroupBy

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

PermGroupBy is the group-by builder for Perm entities.

func (*PermGroupBy) Aggregate

func (pgb *PermGroupBy) Aggregate(fns ...AggregateFunc) *PermGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*PermGroupBy) Bool

func (pgb *PermGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*PermGroupBy) BoolX

func (pgb *PermGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PermGroupBy) Bools

func (pgb *PermGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*PermGroupBy) BoolsX

func (pgb *PermGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PermGroupBy) Float64

func (pgb *PermGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*PermGroupBy) Float64X

func (pgb *PermGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PermGroupBy) Float64s

func (pgb *PermGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*PermGroupBy) Float64sX

func (pgb *PermGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PermGroupBy) Int

func (pgb *PermGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*PermGroupBy) IntX

func (pgb *PermGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PermGroupBy) Ints

func (pgb *PermGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*PermGroupBy) IntsX

func (pgb *PermGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PermGroupBy) Scan

func (pgb *PermGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*PermGroupBy) ScanX

func (pgb *PermGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*PermGroupBy) String

func (pgb *PermGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*PermGroupBy) StringX

func (pgb *PermGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PermGroupBy) Strings

func (pgb *PermGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*PermGroupBy) StringsX

func (pgb *PermGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PermMutation

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

PermMutation represents an operation that mutates the Perm nodes in the graph.

func (*PermMutation) AddField

func (m *PermMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PermMutation) AddedEdges

func (m *PermMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*PermMutation) AddedField

func (m *PermMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PermMutation) AddedFields

func (m *PermMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*PermMutation) AddedIDs

func (m *PermMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*PermMutation) ClearEdge

func (m *PermMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*PermMutation) ClearField

func (m *PermMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*PermMutation) ClearRepo

func (m *PermMutation) ClearRepo()

ClearRepo clears the "repo" edge to the Repo entity.

func (*PermMutation) ClearSyncedAt

func (m *PermMutation) ClearSyncedAt()

ClearSyncedAt clears the value of the "synced_at" field.

func (*PermMutation) ClearUser

func (m *PermMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*PermMutation) ClearedEdges

func (m *PermMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*PermMutation) ClearedFields

func (m *PermMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (PermMutation) Client

func (m PermMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*PermMutation) CreatedAt

func (m *PermMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*PermMutation) EdgeCleared

func (m *PermMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*PermMutation) Field

func (m *PermMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*PermMutation) FieldCleared

func (m *PermMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*PermMutation) Fields

func (m *PermMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*PermMutation) ID

func (m *PermMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*PermMutation) IDs

func (m *PermMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*PermMutation) OldCreatedAt

func (m *PermMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Perm entity. If the Perm object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermMutation) OldField

func (m *PermMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*PermMutation) OldRepoID

func (m *PermMutation) OldRepoID(ctx context.Context) (v int64, err error)

OldRepoID returns the old "repo_id" field's value of the Perm entity. If the Perm object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermMutation) OldRepoPerm

func (m *PermMutation) OldRepoPerm(ctx context.Context) (v perm.RepoPerm, err error)

OldRepoPerm returns the old "repo_perm" field's value of the Perm entity. If the Perm object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermMutation) OldSyncedAt

func (m *PermMutation) OldSyncedAt(ctx context.Context) (v time.Time, err error)

OldSyncedAt returns the old "synced_at" field's value of the Perm entity. If the Perm object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermMutation) OldUpdatedAt

func (m *PermMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Perm entity. If the Perm object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermMutation) OldUserID

func (m *PermMutation) OldUserID(ctx context.Context) (v int64, err error)

OldUserID returns the old "user_id" field's value of the Perm entity. If the Perm object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*PermMutation) Op

func (m *PermMutation) Op() Op

Op returns the operation name.

func (*PermMutation) RemovedEdges

func (m *PermMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*PermMutation) RemovedIDs

func (m *PermMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*PermMutation) RepoCleared

func (m *PermMutation) RepoCleared() bool

RepoCleared reports if the "repo" edge to the Repo entity was cleared.

func (*PermMutation) RepoID

func (m *PermMutation) RepoID() (r int64, exists bool)

RepoID returns the value of the "repo_id" field in the mutation.

func (*PermMutation) RepoIDs

func (m *PermMutation) RepoIDs() (ids []int64)

RepoIDs returns the "repo" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use RepoID instead. It exists only for internal usage by the builders.

func (*PermMutation) RepoPerm

func (m *PermMutation) RepoPerm() (r perm.RepoPerm, exists bool)

RepoPerm returns the value of the "repo_perm" field in the mutation.

func (*PermMutation) ResetCreatedAt

func (m *PermMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*PermMutation) ResetEdge

func (m *PermMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*PermMutation) ResetField

func (m *PermMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*PermMutation) ResetRepo

func (m *PermMutation) ResetRepo()

ResetRepo resets all changes to the "repo" edge.

func (*PermMutation) ResetRepoID

func (m *PermMutation) ResetRepoID()

ResetRepoID resets all changes to the "repo_id" field.

func (*PermMutation) ResetRepoPerm

func (m *PermMutation) ResetRepoPerm()

ResetRepoPerm resets all changes to the "repo_perm" field.

func (*PermMutation) ResetSyncedAt

func (m *PermMutation) ResetSyncedAt()

ResetSyncedAt resets all changes to the "synced_at" field.

func (*PermMutation) ResetUpdatedAt

func (m *PermMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*PermMutation) ResetUser

func (m *PermMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*PermMutation) ResetUserID

func (m *PermMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*PermMutation) SetCreatedAt

func (m *PermMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*PermMutation) SetField

func (m *PermMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*PermMutation) SetRepoID

func (m *PermMutation) SetRepoID(i int64)

SetRepoID sets the "repo_id" field.

func (*PermMutation) SetRepoPerm

func (m *PermMutation) SetRepoPerm(pp perm.RepoPerm)

SetRepoPerm sets the "repo_perm" field.

func (*PermMutation) SetSyncedAt

func (m *PermMutation) SetSyncedAt(t time.Time)

SetSyncedAt sets the "synced_at" field.

func (*PermMutation) SetUpdatedAt

func (m *PermMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*PermMutation) SetUserID

func (m *PermMutation) SetUserID(i int64)

SetUserID sets the "user_id" field.

func (*PermMutation) SyncedAt

func (m *PermMutation) SyncedAt() (r time.Time, exists bool)

SyncedAt returns the value of the "synced_at" field in the mutation.

func (*PermMutation) SyncedAtCleared

func (m *PermMutation) SyncedAtCleared() bool

SyncedAtCleared returns if the "synced_at" field was cleared in this mutation.

func (PermMutation) Tx

func (m PermMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*PermMutation) Type

func (m *PermMutation) Type() string

Type returns the node type of this mutation (Perm).

func (*PermMutation) UpdatedAt

func (m *PermMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*PermMutation) UserCleared

func (m *PermMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*PermMutation) UserID

func (m *PermMutation) UserID() (r int64, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*PermMutation) UserIDs

func (m *PermMutation) UserIDs() (ids []int64)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*PermMutation) Where

func (m *PermMutation) Where(ps ...predicate.Perm)

Where appends a list predicates to the PermMutation builder.

type PermQuery

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

PermQuery is the builder for querying Perm entities.

func (*PermQuery) All

func (pq *PermQuery) All(ctx context.Context) ([]*Perm, error)

All executes the query and returns a list of Perms.

func (*PermQuery) AllX

func (pq *PermQuery) AllX(ctx context.Context) []*Perm

AllX is like All, but panics if an error occurs.

func (*PermQuery) Clone

func (pq *PermQuery) Clone() *PermQuery

Clone returns a duplicate of the PermQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*PermQuery) Count

func (pq *PermQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PermQuery) CountX

func (pq *PermQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*PermQuery) Exist

func (pq *PermQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*PermQuery) ExistX

func (pq *PermQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*PermQuery) First

func (pq *PermQuery) First(ctx context.Context) (*Perm, error)

First returns the first Perm entity from the query. Returns a *NotFoundError when no Perm was found.

func (*PermQuery) FirstID

func (pq *PermQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Perm ID from the query. Returns a *NotFoundError when no Perm ID was found.

func (*PermQuery) FirstIDX

func (pq *PermQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*PermQuery) FirstX

func (pq *PermQuery) FirstX(ctx context.Context) *Perm

FirstX is like First, but panics if an error occurs.

func (*PermQuery) ForShare

func (pq *PermQuery) ForShare(opts ...sql.LockOption) *PermQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*PermQuery) ForUpdate

func (pq *PermQuery) ForUpdate(opts ...sql.LockOption) *PermQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*PermQuery) GroupBy

func (pq *PermQuery) GroupBy(field string, fields ...string) *PermGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	RepoPerm perm.RepoPerm `json:"repo_perm"`
	Count int `json:"count,omitempty"`
}

client.Perm.Query().
	GroupBy(perm.FieldRepoPerm).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PermQuery) IDs

func (pq *PermQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Perm IDs.

func (*PermQuery) IDsX

func (pq *PermQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*PermQuery) Limit

func (pq *PermQuery) Limit(limit int) *PermQuery

Limit adds a limit step to the query.

func (*PermQuery) Offset

func (pq *PermQuery) Offset(offset int) *PermQuery

Offset adds an offset step to the query.

func (*PermQuery) Only

func (pq *PermQuery) Only(ctx context.Context) (*Perm, error)

Only returns a single Perm entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Perm entity is found. Returns a *NotFoundError when no Perm entities are found.

func (*PermQuery) OnlyID

func (pq *PermQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Perm ID in the query. Returns a *NotSingularError when more than one Perm ID is found. Returns a *NotFoundError when no entities are found.

func (*PermQuery) OnlyIDX

func (pq *PermQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*PermQuery) OnlyX

func (pq *PermQuery) OnlyX(ctx context.Context) *Perm

OnlyX is like Only, but panics if an error occurs.

func (*PermQuery) Order

func (pq *PermQuery) Order(o ...OrderFunc) *PermQuery

Order adds an order step to the query.

func (*PermQuery) QueryRepo

func (pq *PermQuery) QueryRepo() *RepoQuery

QueryRepo chains the current query on the "repo" edge.

func (*PermQuery) QueryUser

func (pq *PermQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*PermQuery) Select

func (pq *PermQuery) Select(fields ...string) *PermSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	RepoPerm perm.RepoPerm `json:"repo_perm"`
}

client.Perm.Query().
	Select(perm.FieldRepoPerm).
	Scan(ctx, &v)

func (*PermQuery) Unique

func (pq *PermQuery) Unique(unique bool) *PermQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*PermQuery) Where

func (pq *PermQuery) Where(ps ...predicate.Perm) *PermQuery

Where adds a new predicate for the PermQuery builder.

func (*PermQuery) WithRepo

func (pq *PermQuery) WithRepo(opts ...func(*RepoQuery)) *PermQuery

WithRepo tells the query-builder to eager-load the nodes that are connected to the "repo" edge. The optional arguments are used to configure the query builder of the edge.

func (*PermQuery) WithUser

func (pq *PermQuery) WithUser(opts ...func(*UserQuery)) *PermQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type PermSelect

type PermSelect struct {
	*PermQuery
	// contains filtered or unexported fields
}

PermSelect is the builder for selecting fields of Perm entities.

func (*PermSelect) Bool

func (ps *PermSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*PermSelect) BoolX

func (ps *PermSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*PermSelect) Bools

func (ps *PermSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*PermSelect) BoolsX

func (ps *PermSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*PermSelect) Float64

func (ps *PermSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*PermSelect) Float64X

func (ps *PermSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*PermSelect) Float64s

func (ps *PermSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*PermSelect) Float64sX

func (ps *PermSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*PermSelect) Int

func (ps *PermSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*PermSelect) IntX

func (ps *PermSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*PermSelect) Ints

func (ps *PermSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*PermSelect) IntsX

func (ps *PermSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*PermSelect) Scan

func (ps *PermSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*PermSelect) ScanX

func (ps *PermSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*PermSelect) String

func (ps *PermSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*PermSelect) StringX

func (ps *PermSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*PermSelect) Strings

func (ps *PermSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*PermSelect) StringsX

func (ps *PermSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type PermUpdate

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

PermUpdate is the builder for updating Perm entities.

func (*PermUpdate) ClearRepo

func (pu *PermUpdate) ClearRepo() *PermUpdate

ClearRepo clears the "repo" edge to the Repo entity.

func (*PermUpdate) ClearSyncedAt

func (pu *PermUpdate) ClearSyncedAt() *PermUpdate

ClearSyncedAt clears the value of the "synced_at" field.

func (*PermUpdate) ClearUser

func (pu *PermUpdate) ClearUser() *PermUpdate

ClearUser clears the "user" edge to the User entity.

func (*PermUpdate) Exec

func (pu *PermUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PermUpdate) ExecX

func (pu *PermUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PermUpdate) Mutation

func (pu *PermUpdate) Mutation() *PermMutation

Mutation returns the PermMutation object of the builder.

func (*PermUpdate) Save

func (pu *PermUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*PermUpdate) SaveX

func (pu *PermUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*PermUpdate) SetCreatedAt

func (pu *PermUpdate) SetCreatedAt(t time.Time) *PermUpdate

SetCreatedAt sets the "created_at" field.

func (*PermUpdate) SetNillableCreatedAt

func (pu *PermUpdate) SetNillableCreatedAt(t *time.Time) *PermUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PermUpdate) SetNillableRepoPerm

func (pu *PermUpdate) SetNillableRepoPerm(pp *perm.RepoPerm) *PermUpdate

SetNillableRepoPerm sets the "repo_perm" field if the given value is not nil.

func (*PermUpdate) SetNillableSyncedAt

func (pu *PermUpdate) SetNillableSyncedAt(t *time.Time) *PermUpdate

SetNillableSyncedAt sets the "synced_at" field if the given value is not nil.

func (*PermUpdate) SetRepo

func (pu *PermUpdate) SetRepo(r *Repo) *PermUpdate

SetRepo sets the "repo" edge to the Repo entity.

func (*PermUpdate) SetRepoID

func (pu *PermUpdate) SetRepoID(i int64) *PermUpdate

SetRepoID sets the "repo_id" field.

func (*PermUpdate) SetRepoPerm

func (pu *PermUpdate) SetRepoPerm(pp perm.RepoPerm) *PermUpdate

SetRepoPerm sets the "repo_perm" field.

func (*PermUpdate) SetSyncedAt

func (pu *PermUpdate) SetSyncedAt(t time.Time) *PermUpdate

SetSyncedAt sets the "synced_at" field.

func (*PermUpdate) SetUpdatedAt

func (pu *PermUpdate) SetUpdatedAt(t time.Time) *PermUpdate

SetUpdatedAt sets the "updated_at" field.

func (*PermUpdate) SetUser

func (pu *PermUpdate) SetUser(u *User) *PermUpdate

SetUser sets the "user" edge to the User entity.

func (*PermUpdate) SetUserID

func (pu *PermUpdate) SetUserID(i int64) *PermUpdate

SetUserID sets the "user_id" field.

func (*PermUpdate) Where

func (pu *PermUpdate) Where(ps ...predicate.Perm) *PermUpdate

Where appends a list predicates to the PermUpdate builder.

type PermUpdateOne

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

PermUpdateOne is the builder for updating a single Perm entity.

func (*PermUpdateOne) ClearRepo

func (puo *PermUpdateOne) ClearRepo() *PermUpdateOne

ClearRepo clears the "repo" edge to the Repo entity.

func (*PermUpdateOne) ClearSyncedAt

func (puo *PermUpdateOne) ClearSyncedAt() *PermUpdateOne

ClearSyncedAt clears the value of the "synced_at" field.

func (*PermUpdateOne) ClearUser

func (puo *PermUpdateOne) ClearUser() *PermUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*PermUpdateOne) Exec

func (puo *PermUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PermUpdateOne) ExecX

func (puo *PermUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*PermUpdateOne) Mutation

func (puo *PermUpdateOne) Mutation() *PermMutation

Mutation returns the PermMutation object of the builder.

func (*PermUpdateOne) Save

func (puo *PermUpdateOne) Save(ctx context.Context) (*Perm, error)

Save executes the query and returns the updated Perm entity.

func (*PermUpdateOne) SaveX

func (puo *PermUpdateOne) SaveX(ctx context.Context) *Perm

SaveX is like Save, but panics if an error occurs.

func (*PermUpdateOne) Select

func (puo *PermUpdateOne) Select(field string, fields ...string) *PermUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*PermUpdateOne) SetCreatedAt

func (puo *PermUpdateOne) SetCreatedAt(t time.Time) *PermUpdateOne

SetCreatedAt sets the "created_at" field.

func (*PermUpdateOne) SetNillableCreatedAt

func (puo *PermUpdateOne) SetNillableCreatedAt(t *time.Time) *PermUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*PermUpdateOne) SetNillableRepoPerm

func (puo *PermUpdateOne) SetNillableRepoPerm(pp *perm.RepoPerm) *PermUpdateOne

SetNillableRepoPerm sets the "repo_perm" field if the given value is not nil.

func (*PermUpdateOne) SetNillableSyncedAt

func (puo *PermUpdateOne) SetNillableSyncedAt(t *time.Time) *PermUpdateOne

SetNillableSyncedAt sets the "synced_at" field if the given value is not nil.

func (*PermUpdateOne) SetRepo

func (puo *PermUpdateOne) SetRepo(r *Repo) *PermUpdateOne

SetRepo sets the "repo" edge to the Repo entity.

func (*PermUpdateOne) SetRepoID

func (puo *PermUpdateOne) SetRepoID(i int64) *PermUpdateOne

SetRepoID sets the "repo_id" field.

func (*PermUpdateOne) SetRepoPerm

func (puo *PermUpdateOne) SetRepoPerm(pp perm.RepoPerm) *PermUpdateOne

SetRepoPerm sets the "repo_perm" field.

func (*PermUpdateOne) SetSyncedAt

func (puo *PermUpdateOne) SetSyncedAt(t time.Time) *PermUpdateOne

SetSyncedAt sets the "synced_at" field.

func (*PermUpdateOne) SetUpdatedAt

func (puo *PermUpdateOne) SetUpdatedAt(t time.Time) *PermUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*PermUpdateOne) SetUser

func (puo *PermUpdateOne) SetUser(u *User) *PermUpdateOne

SetUser sets the "user" edge to the User entity.

func (*PermUpdateOne) SetUserID

func (puo *PermUpdateOne) SetUserID(i int64) *PermUpdateOne

SetUserID sets the "user_id" field.

type Perms

type Perms []*Perm

Perms is a parsable slice of Perm.

type Policy

type Policy = ent.Policy

ent aliases to avoid import conflicts in user's code.

type Query

type Query = ent.Query

ent aliases to avoid import conflicts in user's code.

type Repo

type Repo struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// Namespace holds the value of the "namespace" field.
	Namespace string `json:"namespace"`
	// Name holds the value of the "name" field.
	Name string `json:"name"`
	// Description holds the value of the "description" field.
	Description string `json:"description"`
	// ConfigPath holds the value of the "config_path" field.
	ConfigPath string `json:"config_path"`
	// Active holds the value of the "active" field.
	Active bool `json:"active"`
	// WebhookID holds the value of the "webhook_id" field.
	WebhookID int64 `json:"webhook_id,omitemtpy"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at"`
	// LatestDeployedAt holds the value of the "latest_deployed_at" field.
	LatestDeployedAt time.Time `json:"latest_deployed_at,omitemtpy"`
	// OwnerID holds the value of the "owner_id" field.
	OwnerID int64 `json:"owner_id,omitemtpy"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RepoQuery when eager-loading is set.
	Edges RepoEdges `json:"edges"`
	// contains filtered or unexported fields
}

Repo is the model entity for the Repo schema.

func (*Repo) GetFullName

func (r *Repo) GetFullName() string

func (*Repo) QueryDeploymentStatistics

func (r *Repo) QueryDeploymentStatistics() *DeploymentStatisticsQuery

QueryDeploymentStatistics queries the "deployment_statistics" edge of the Repo entity.

func (*Repo) QueryDeploymentStatuses

func (r *Repo) QueryDeploymentStatuses() *DeploymentStatusQuery

QueryDeploymentStatuses queries the "deployment_statuses" edge of the Repo entity.

func (*Repo) QueryDeployments

func (r *Repo) QueryDeployments() *DeploymentQuery

QueryDeployments queries the "deployments" edge of the Repo entity.

func (*Repo) QueryLocks

func (r *Repo) QueryLocks() *LockQuery

QueryLocks queries the "locks" edge of the Repo entity.

func (*Repo) QueryOwner

func (r *Repo) QueryOwner() *UserQuery

QueryOwner queries the "owner" edge of the Repo entity.

func (*Repo) QueryPerms

func (r *Repo) QueryPerms() *PermQuery

QueryPerms queries the "perms" edge of the Repo entity.

func (*Repo) String

func (r *Repo) String() string

String implements the fmt.Stringer.

func (*Repo) Unwrap

func (r *Repo) Unwrap() *Repo

Unwrap unwraps the Repo entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Repo) Update

func (r *Repo) Update() *RepoUpdateOne

Update returns a builder for updating this Repo. Note that you need to call Repo.Unwrap() before calling this method if this Repo was returned from a transaction, and the transaction was committed or rolled back.

type RepoClient

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

RepoClient is a client for the Repo schema.

func NewRepoClient

func NewRepoClient(c config) *RepoClient

NewRepoClient returns a client for the Repo from the given config.

func (*RepoClient) Create

func (c *RepoClient) Create() *RepoCreate

Create returns a create builder for Repo.

func (*RepoClient) CreateBulk

func (c *RepoClient) CreateBulk(builders ...*RepoCreate) *RepoCreateBulk

CreateBulk returns a builder for creating a bulk of Repo entities.

func (*RepoClient) Delete

func (c *RepoClient) Delete() *RepoDelete

Delete returns a delete builder for Repo.

func (*RepoClient) DeleteOne

func (c *RepoClient) DeleteOne(r *Repo) *RepoDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*RepoClient) DeleteOneID

func (c *RepoClient) DeleteOneID(id int64) *RepoDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*RepoClient) Get

func (c *RepoClient) Get(ctx context.Context, id int64) (*Repo, error)

Get returns a Repo entity by its id.

func (*RepoClient) GetX

func (c *RepoClient) GetX(ctx context.Context, id int64) *Repo

GetX is like Get, but panics if an error occurs.

func (*RepoClient) Hooks

func (c *RepoClient) Hooks() []Hook

Hooks returns the client hooks.

func (*RepoClient) Query

func (c *RepoClient) Query() *RepoQuery

Query returns a query builder for Repo.

func (*RepoClient) QueryDeploymentStatistics

func (c *RepoClient) QueryDeploymentStatistics(r *Repo) *DeploymentStatisticsQuery

QueryDeploymentStatistics queries the deployment_statistics edge of a Repo.

func (*RepoClient) QueryDeploymentStatuses

func (c *RepoClient) QueryDeploymentStatuses(r *Repo) *DeploymentStatusQuery

QueryDeploymentStatuses queries the deployment_statuses edge of a Repo.

func (*RepoClient) QueryDeployments

func (c *RepoClient) QueryDeployments(r *Repo) *DeploymentQuery

QueryDeployments queries the deployments edge of a Repo.

func (*RepoClient) QueryLocks

func (c *RepoClient) QueryLocks(r *Repo) *LockQuery

QueryLocks queries the locks edge of a Repo.

func (*RepoClient) QueryOwner

func (c *RepoClient) QueryOwner(r *Repo) *UserQuery

QueryOwner queries the owner edge of a Repo.

func (*RepoClient) QueryPerms

func (c *RepoClient) QueryPerms(r *Repo) *PermQuery

QueryPerms queries the perms edge of a Repo.

func (*RepoClient) Update

func (c *RepoClient) Update() *RepoUpdate

Update returns an update builder for Repo.

func (*RepoClient) UpdateOne

func (c *RepoClient) UpdateOne(r *Repo) *RepoUpdateOne

UpdateOne returns an update builder for the given entity.

func (*RepoClient) UpdateOneID

func (c *RepoClient) UpdateOneID(id int64) *RepoUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RepoClient) Use

func (c *RepoClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `repo.Hooks(f(g(h())))`.

type RepoCreate

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

RepoCreate is the builder for creating a Repo entity.

func (*RepoCreate) AddDeploymentIDs

func (rc *RepoCreate) AddDeploymentIDs(ids ...int) *RepoCreate

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by IDs.

func (*RepoCreate) AddDeploymentStatisticIDs

func (rc *RepoCreate) AddDeploymentStatisticIDs(ids ...int) *RepoCreate

AddDeploymentStatisticIDs adds the "deployment_statistics" edge to the DeploymentStatistics entity by IDs.

func (*RepoCreate) AddDeploymentStatistics

func (rc *RepoCreate) AddDeploymentStatistics(d ...*DeploymentStatistics) *RepoCreate

AddDeploymentStatistics adds the "deployment_statistics" edges to the DeploymentStatistics entity.

func (*RepoCreate) AddDeploymentStatusIDs

func (rc *RepoCreate) AddDeploymentStatusIDs(ids ...int) *RepoCreate

AddDeploymentStatusIDs adds the "deployment_statuses" edge to the DeploymentStatus entity by IDs.

func (*RepoCreate) AddDeploymentStatuses

func (rc *RepoCreate) AddDeploymentStatuses(d ...*DeploymentStatus) *RepoCreate

AddDeploymentStatuses adds the "deployment_statuses" edges to the DeploymentStatus entity.

func (*RepoCreate) AddDeployments

func (rc *RepoCreate) AddDeployments(d ...*Deployment) *RepoCreate

AddDeployments adds the "deployments" edges to the Deployment entity.

func (*RepoCreate) AddLockIDs

func (rc *RepoCreate) AddLockIDs(ids ...int) *RepoCreate

AddLockIDs adds the "locks" edge to the Lock entity by IDs.

func (*RepoCreate) AddLocks

func (rc *RepoCreate) AddLocks(l ...*Lock) *RepoCreate

AddLocks adds the "locks" edges to the Lock entity.

func (*RepoCreate) AddPermIDs

func (rc *RepoCreate) AddPermIDs(ids ...int) *RepoCreate

AddPermIDs adds the "perms" edge to the Perm entity by IDs.

func (*RepoCreate) AddPerms

func (rc *RepoCreate) AddPerms(p ...*Perm) *RepoCreate

AddPerms adds the "perms" edges to the Perm entity.

func (*RepoCreate) Exec

func (rc *RepoCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RepoCreate) ExecX

func (rc *RepoCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RepoCreate) Mutation

func (rc *RepoCreate) Mutation() *RepoMutation

Mutation returns the RepoMutation object of the builder.

func (*RepoCreate) Save

func (rc *RepoCreate) Save(ctx context.Context) (*Repo, error)

Save creates the Repo in the database.

func (*RepoCreate) SaveX

func (rc *RepoCreate) SaveX(ctx context.Context) *Repo

SaveX calls Save and panics if Save returns an error.

func (*RepoCreate) SetActive

func (rc *RepoCreate) SetActive(b bool) *RepoCreate

SetActive sets the "active" field.

func (*RepoCreate) SetConfigPath

func (rc *RepoCreate) SetConfigPath(s string) *RepoCreate

SetConfigPath sets the "config_path" field.

func (*RepoCreate) SetCreatedAt

func (rc *RepoCreate) SetCreatedAt(t time.Time) *RepoCreate

SetCreatedAt sets the "created_at" field.

func (*RepoCreate) SetDescription

func (rc *RepoCreate) SetDescription(s string) *RepoCreate

SetDescription sets the "description" field.

func (*RepoCreate) SetID

func (rc *RepoCreate) SetID(i int64) *RepoCreate

SetID sets the "id" field.

func (*RepoCreate) SetLatestDeployedAt

func (rc *RepoCreate) SetLatestDeployedAt(t time.Time) *RepoCreate

SetLatestDeployedAt sets the "latest_deployed_at" field.

func (*RepoCreate) SetName

func (rc *RepoCreate) SetName(s string) *RepoCreate

SetName sets the "name" field.

func (*RepoCreate) SetNamespace

func (rc *RepoCreate) SetNamespace(s string) *RepoCreate

SetNamespace sets the "namespace" field.

func (*RepoCreate) SetNillableActive

func (rc *RepoCreate) SetNillableActive(b *bool) *RepoCreate

SetNillableActive sets the "active" field if the given value is not nil.

func (*RepoCreate) SetNillableConfigPath

func (rc *RepoCreate) SetNillableConfigPath(s *string) *RepoCreate

SetNillableConfigPath sets the "config_path" field if the given value is not nil.

func (*RepoCreate) SetNillableCreatedAt

func (rc *RepoCreate) SetNillableCreatedAt(t *time.Time) *RepoCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RepoCreate) SetNillableLatestDeployedAt

func (rc *RepoCreate) SetNillableLatestDeployedAt(t *time.Time) *RepoCreate

SetNillableLatestDeployedAt sets the "latest_deployed_at" field if the given value is not nil.

func (*RepoCreate) SetNillableOwnerID

func (rc *RepoCreate) SetNillableOwnerID(i *int64) *RepoCreate

SetNillableOwnerID sets the "owner_id" field if the given value is not nil.

func (*RepoCreate) SetNillableUpdatedAt

func (rc *RepoCreate) SetNillableUpdatedAt(t *time.Time) *RepoCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*RepoCreate) SetNillableWebhookID

func (rc *RepoCreate) SetNillableWebhookID(i *int64) *RepoCreate

SetNillableWebhookID sets the "webhook_id" field if the given value is not nil.

func (*RepoCreate) SetOwner

func (rc *RepoCreate) SetOwner(u *User) *RepoCreate

SetOwner sets the "owner" edge to the User entity.

func (*RepoCreate) SetOwnerID

func (rc *RepoCreate) SetOwnerID(i int64) *RepoCreate

SetOwnerID sets the "owner_id" field.

func (*RepoCreate) SetUpdatedAt

func (rc *RepoCreate) SetUpdatedAt(t time.Time) *RepoCreate

SetUpdatedAt sets the "updated_at" field.

func (*RepoCreate) SetWebhookID

func (rc *RepoCreate) SetWebhookID(i int64) *RepoCreate

SetWebhookID sets the "webhook_id" field.

type RepoCreateBulk

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

RepoCreateBulk is the builder for creating many Repo entities in bulk.

func (*RepoCreateBulk) Exec

func (rcb *RepoCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RepoCreateBulk) ExecX

func (rcb *RepoCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RepoCreateBulk) Save

func (rcb *RepoCreateBulk) Save(ctx context.Context) ([]*Repo, error)

Save creates the Repo entities in the database.

func (*RepoCreateBulk) SaveX

func (rcb *RepoCreateBulk) SaveX(ctx context.Context) []*Repo

SaveX is like Save, but panics if an error occurs.

type RepoDelete

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

RepoDelete is the builder for deleting a Repo entity.

func (*RepoDelete) Exec

func (rd *RepoDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*RepoDelete) ExecX

func (rd *RepoDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*RepoDelete) Where

func (rd *RepoDelete) Where(ps ...predicate.Repo) *RepoDelete

Where appends a list predicates to the RepoDelete builder.

type RepoDeleteOne

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

RepoDeleteOne is the builder for deleting a single Repo entity.

func (*RepoDeleteOne) Exec

func (rdo *RepoDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RepoDeleteOne) ExecX

func (rdo *RepoDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type RepoEdges

type RepoEdges struct {
	// Perms holds the value of the perms edge.
	Perms []*Perm `json:"perms,omitempty"`
	// Deployments holds the value of the deployments edge.
	Deployments []*Deployment `json:"deployments,omitempty"`
	// DeploymentStatuses holds the value of the deployment_statuses edge.
	DeploymentStatuses []*DeploymentStatus `json:"deployment_statuses,omitempty"`
	// Locks holds the value of the locks edge.
	Locks []*Lock `json:"locks,omitempty"`
	// DeploymentStatistics holds the value of the deployment_statistics edge.
	DeploymentStatistics []*DeploymentStatistics `json:"deployment_statistics,omitempty"`
	// Owner holds the value of the owner edge.
	Owner *User `json:"owner,omitempty"`
	// contains filtered or unexported fields
}

RepoEdges holds the relations/edges for other nodes in the graph.

func (RepoEdges) DeploymentStatisticsOrErr

func (e RepoEdges) DeploymentStatisticsOrErr() ([]*DeploymentStatistics, error)

DeploymentStatisticsOrErr returns the DeploymentStatistics value or an error if the edge was not loaded in eager-loading.

func (RepoEdges) DeploymentStatusesOrErr

func (e RepoEdges) DeploymentStatusesOrErr() ([]*DeploymentStatus, error)

DeploymentStatusesOrErr returns the DeploymentStatuses value or an error if the edge was not loaded in eager-loading.

func (RepoEdges) DeploymentsOrErr

func (e RepoEdges) DeploymentsOrErr() ([]*Deployment, error)

DeploymentsOrErr returns the Deployments value or an error if the edge was not loaded in eager-loading.

func (RepoEdges) LocksOrErr

func (e RepoEdges) LocksOrErr() ([]*Lock, error)

LocksOrErr returns the Locks value or an error if the edge was not loaded in eager-loading.

func (RepoEdges) OwnerOrErr

func (e RepoEdges) OwnerOrErr() (*User, error)

OwnerOrErr returns the Owner value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (RepoEdges) PermsOrErr

func (e RepoEdges) PermsOrErr() ([]*Perm, error)

PermsOrErr returns the Perms value or an error if the edge was not loaded in eager-loading.

type RepoGroupBy

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

RepoGroupBy is the group-by builder for Repo entities.

func (*RepoGroupBy) Aggregate

func (rgb *RepoGroupBy) Aggregate(fns ...AggregateFunc) *RepoGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*RepoGroupBy) Bool

func (rgb *RepoGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*RepoGroupBy) BoolX

func (rgb *RepoGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RepoGroupBy) Bools

func (rgb *RepoGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*RepoGroupBy) BoolsX

func (rgb *RepoGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RepoGroupBy) Float64

func (rgb *RepoGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*RepoGroupBy) Float64X

func (rgb *RepoGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RepoGroupBy) Float64s

func (rgb *RepoGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*RepoGroupBy) Float64sX

func (rgb *RepoGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RepoGroupBy) Int

func (rgb *RepoGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*RepoGroupBy) IntX

func (rgb *RepoGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RepoGroupBy) Ints

func (rgb *RepoGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*RepoGroupBy) IntsX

func (rgb *RepoGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RepoGroupBy) Scan

func (rgb *RepoGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*RepoGroupBy) ScanX

func (rgb *RepoGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*RepoGroupBy) String

func (rgb *RepoGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*RepoGroupBy) StringX

func (rgb *RepoGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RepoGroupBy) Strings

func (rgb *RepoGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*RepoGroupBy) StringsX

func (rgb *RepoGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RepoMutation

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

RepoMutation represents an operation that mutates the Repo nodes in the graph.

func (*RepoMutation) Active

func (m *RepoMutation) Active() (r bool, exists bool)

Active returns the value of the "active" field in the mutation.

func (*RepoMutation) AddDeploymentIDs

func (m *RepoMutation) AddDeploymentIDs(ids ...int)

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by ids.

func (*RepoMutation) AddDeploymentStatisticIDs

func (m *RepoMutation) AddDeploymentStatisticIDs(ids ...int)

AddDeploymentStatisticIDs adds the "deployment_statistics" edge to the DeploymentStatistics entity by ids.

func (*RepoMutation) AddDeploymentStatusIDs

func (m *RepoMutation) AddDeploymentStatusIDs(ids ...int)

AddDeploymentStatusIDs adds the "deployment_statuses" edge to the DeploymentStatus entity by ids.

func (*RepoMutation) AddField

func (m *RepoMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*RepoMutation) AddLockIDs

func (m *RepoMutation) AddLockIDs(ids ...int)

AddLockIDs adds the "locks" edge to the Lock entity by ids.

func (*RepoMutation) AddPermIDs

func (m *RepoMutation) AddPermIDs(ids ...int)

AddPermIDs adds the "perms" edge to the Perm entity by ids.

func (*RepoMutation) AddWebhookID

func (m *RepoMutation) AddWebhookID(i int64)

AddWebhookID adds i to the "webhook_id" field.

func (*RepoMutation) AddedEdges

func (m *RepoMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*RepoMutation) AddedField

func (m *RepoMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*RepoMutation) AddedFields

func (m *RepoMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*RepoMutation) AddedIDs

func (m *RepoMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*RepoMutation) AddedWebhookID

func (m *RepoMutation) AddedWebhookID() (r int64, exists bool)

AddedWebhookID returns the value that was added to the "webhook_id" field in this mutation.

func (*RepoMutation) ClearDeploymentStatistics

func (m *RepoMutation) ClearDeploymentStatistics()

ClearDeploymentStatistics clears the "deployment_statistics" edge to the DeploymentStatistics entity.

func (*RepoMutation) ClearDeploymentStatuses

func (m *RepoMutation) ClearDeploymentStatuses()

ClearDeploymentStatuses clears the "deployment_statuses" edge to the DeploymentStatus entity.

func (*RepoMutation) ClearDeployments

func (m *RepoMutation) ClearDeployments()

ClearDeployments clears the "deployments" edge to the Deployment entity.

func (*RepoMutation) ClearEdge

func (m *RepoMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*RepoMutation) ClearField

func (m *RepoMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*RepoMutation) ClearLatestDeployedAt

func (m *RepoMutation) ClearLatestDeployedAt()

ClearLatestDeployedAt clears the value of the "latest_deployed_at" field.

func (*RepoMutation) ClearLocks

func (m *RepoMutation) ClearLocks()

ClearLocks clears the "locks" edge to the Lock entity.

func (*RepoMutation) ClearOwner

func (m *RepoMutation) ClearOwner()

ClearOwner clears the "owner" edge to the User entity.

func (*RepoMutation) ClearOwnerID

func (m *RepoMutation) ClearOwnerID()

ClearOwnerID clears the value of the "owner_id" field.

func (*RepoMutation) ClearPerms

func (m *RepoMutation) ClearPerms()

ClearPerms clears the "perms" edge to the Perm entity.

func (*RepoMutation) ClearWebhookID

func (m *RepoMutation) ClearWebhookID()

ClearWebhookID clears the value of the "webhook_id" field.

func (*RepoMutation) ClearedEdges

func (m *RepoMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*RepoMutation) ClearedFields

func (m *RepoMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (RepoMutation) Client

func (m RepoMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*RepoMutation) ConfigPath

func (m *RepoMutation) ConfigPath() (r string, exists bool)

ConfigPath returns the value of the "config_path" field in the mutation.

func (*RepoMutation) CreatedAt

func (m *RepoMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*RepoMutation) DeploymentStatisticsCleared

func (m *RepoMutation) DeploymentStatisticsCleared() bool

DeploymentStatisticsCleared reports if the "deployment_statistics" edge to the DeploymentStatistics entity was cleared.

func (*RepoMutation) DeploymentStatisticsIDs

func (m *RepoMutation) DeploymentStatisticsIDs() (ids []int)

DeploymentStatisticsIDs returns the "deployment_statistics" edge IDs in the mutation.

func (*RepoMutation) DeploymentStatusesCleared

func (m *RepoMutation) DeploymentStatusesCleared() bool

DeploymentStatusesCleared reports if the "deployment_statuses" edge to the DeploymentStatus entity was cleared.

func (*RepoMutation) DeploymentStatusesIDs

func (m *RepoMutation) DeploymentStatusesIDs() (ids []int)

DeploymentStatusesIDs returns the "deployment_statuses" edge IDs in the mutation.

func (*RepoMutation) DeploymentsCleared

func (m *RepoMutation) DeploymentsCleared() bool

DeploymentsCleared reports if the "deployments" edge to the Deployment entity was cleared.

func (*RepoMutation) DeploymentsIDs

func (m *RepoMutation) DeploymentsIDs() (ids []int)

DeploymentsIDs returns the "deployments" edge IDs in the mutation.

func (*RepoMutation) Description

func (m *RepoMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*RepoMutation) EdgeCleared

func (m *RepoMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*RepoMutation) Field

func (m *RepoMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*RepoMutation) FieldCleared

func (m *RepoMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*RepoMutation) Fields

func (m *RepoMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*RepoMutation) ID

func (m *RepoMutation) ID() (id int64, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*RepoMutation) IDs

func (m *RepoMutation) IDs(ctx context.Context) ([]int64, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*RepoMutation) LatestDeployedAt

func (m *RepoMutation) LatestDeployedAt() (r time.Time, exists bool)

LatestDeployedAt returns the value of the "latest_deployed_at" field in the mutation.

func (*RepoMutation) LatestDeployedAtCleared

func (m *RepoMutation) LatestDeployedAtCleared() bool

LatestDeployedAtCleared returns if the "latest_deployed_at" field was cleared in this mutation.

func (*RepoMutation) LocksCleared

func (m *RepoMutation) LocksCleared() bool

LocksCleared reports if the "locks" edge to the Lock entity was cleared.

func (*RepoMutation) LocksIDs

func (m *RepoMutation) LocksIDs() (ids []int)

LocksIDs returns the "locks" edge IDs in the mutation.

func (*RepoMutation) Name

func (m *RepoMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*RepoMutation) Namespace

func (m *RepoMutation) Namespace() (r string, exists bool)

Namespace returns the value of the "namespace" field in the mutation.

func (*RepoMutation) OldActive

func (m *RepoMutation) OldActive(ctx context.Context) (v bool, err error)

OldActive returns the old "active" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldConfigPath

func (m *RepoMutation) OldConfigPath(ctx context.Context) (v string, err error)

OldConfigPath returns the old "config_path" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldCreatedAt

func (m *RepoMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldDescription

func (m *RepoMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldField

func (m *RepoMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*RepoMutation) OldLatestDeployedAt

func (m *RepoMutation) OldLatestDeployedAt(ctx context.Context) (v time.Time, err error)

OldLatestDeployedAt returns the old "latest_deployed_at" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldName

func (m *RepoMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldNamespace

func (m *RepoMutation) OldNamespace(ctx context.Context) (v string, err error)

OldNamespace returns the old "namespace" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldOwnerID

func (m *RepoMutation) OldOwnerID(ctx context.Context) (v int64, err error)

OldOwnerID returns the old "owner_id" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldUpdatedAt

func (m *RepoMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) OldWebhookID

func (m *RepoMutation) OldWebhookID(ctx context.Context) (v int64, err error)

OldWebhookID returns the old "webhook_id" field's value of the Repo entity. If the Repo object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*RepoMutation) Op

func (m *RepoMutation) Op() Op

Op returns the operation name.

func (*RepoMutation) OwnerCleared

func (m *RepoMutation) OwnerCleared() bool

OwnerCleared reports if the "owner" edge to the User entity was cleared.

func (*RepoMutation) OwnerID

func (m *RepoMutation) OwnerID() (r int64, exists bool)

OwnerID returns the value of the "owner_id" field in the mutation.

func (*RepoMutation) OwnerIDCleared

func (m *RepoMutation) OwnerIDCleared() bool

OwnerIDCleared returns if the "owner_id" field was cleared in this mutation.

func (*RepoMutation) OwnerIDs

func (m *RepoMutation) OwnerIDs() (ids []int64)

OwnerIDs returns the "owner" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use OwnerID instead. It exists only for internal usage by the builders.

func (*RepoMutation) PermsCleared

func (m *RepoMutation) PermsCleared() bool

PermsCleared reports if the "perms" edge to the Perm entity was cleared.

func (*RepoMutation) PermsIDs

func (m *RepoMutation) PermsIDs() (ids []int)

PermsIDs returns the "perms" edge IDs in the mutation.

func (*RepoMutation) RemoveDeploymentIDs

func (m *RepoMutation) RemoveDeploymentIDs(ids ...int)

RemoveDeploymentIDs removes the "deployments" edge to the Deployment entity by IDs.

func (*RepoMutation) RemoveDeploymentStatisticIDs

func (m *RepoMutation) RemoveDeploymentStatisticIDs(ids ...int)

RemoveDeploymentStatisticIDs removes the "deployment_statistics" edge to the DeploymentStatistics entity by IDs.

func (*RepoMutation) RemoveDeploymentStatusIDs

func (m *RepoMutation) RemoveDeploymentStatusIDs(ids ...int)

RemoveDeploymentStatusIDs removes the "deployment_statuses" edge to the DeploymentStatus entity by IDs.

func (*RepoMutation) RemoveLockIDs

func (m *RepoMutation) RemoveLockIDs(ids ...int)

RemoveLockIDs removes the "locks" edge to the Lock entity by IDs.

func (*RepoMutation) RemovePermIDs

func (m *RepoMutation) RemovePermIDs(ids ...int)

RemovePermIDs removes the "perms" edge to the Perm entity by IDs.

func (*RepoMutation) RemovedDeploymentStatisticsIDs

func (m *RepoMutation) RemovedDeploymentStatisticsIDs() (ids []int)

RemovedDeploymentStatistics returns the removed IDs of the "deployment_statistics" edge to the DeploymentStatistics entity.

func (*RepoMutation) RemovedDeploymentStatusesIDs

func (m *RepoMutation) RemovedDeploymentStatusesIDs() (ids []int)

RemovedDeploymentStatuses returns the removed IDs of the "deployment_statuses" edge to the DeploymentStatus entity.

func (*RepoMutation) RemovedDeploymentsIDs

func (m *RepoMutation) RemovedDeploymentsIDs() (ids []int)

RemovedDeployments returns the removed IDs of the "deployments" edge to the Deployment entity.

func (*RepoMutation) RemovedEdges

func (m *RepoMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*RepoMutation) RemovedIDs

func (m *RepoMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*RepoMutation) RemovedLocksIDs

func (m *RepoMutation) RemovedLocksIDs() (ids []int)

RemovedLocks returns the removed IDs of the "locks" edge to the Lock entity.

func (*RepoMutation) RemovedPermsIDs

func (m *RepoMutation) RemovedPermsIDs() (ids []int)

RemovedPerms returns the removed IDs of the "perms" edge to the Perm entity.

func (*RepoMutation) ResetActive

func (m *RepoMutation) ResetActive()

ResetActive resets all changes to the "active" field.

func (*RepoMutation) ResetConfigPath

func (m *RepoMutation) ResetConfigPath()

ResetConfigPath resets all changes to the "config_path" field.

func (*RepoMutation) ResetCreatedAt

func (m *RepoMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*RepoMutation) ResetDeploymentStatistics

func (m *RepoMutation) ResetDeploymentStatistics()

ResetDeploymentStatistics resets all changes to the "deployment_statistics" edge.

func (*RepoMutation) ResetDeploymentStatuses

func (m *RepoMutation) ResetDeploymentStatuses()

ResetDeploymentStatuses resets all changes to the "deployment_statuses" edge.

func (*RepoMutation) ResetDeployments

func (m *RepoMutation) ResetDeployments()

ResetDeployments resets all changes to the "deployments" edge.

func (*RepoMutation) ResetDescription

func (m *RepoMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*RepoMutation) ResetEdge

func (m *RepoMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*RepoMutation) ResetField

func (m *RepoMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*RepoMutation) ResetLatestDeployedAt

func (m *RepoMutation) ResetLatestDeployedAt()

ResetLatestDeployedAt resets all changes to the "latest_deployed_at" field.

func (*RepoMutation) ResetLocks

func (m *RepoMutation) ResetLocks()

ResetLocks resets all changes to the "locks" edge.

func (*RepoMutation) ResetName

func (m *RepoMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*RepoMutation) ResetNamespace

func (m *RepoMutation) ResetNamespace()

ResetNamespace resets all changes to the "namespace" field.

func (*RepoMutation) ResetOwner

func (m *RepoMutation) ResetOwner()

ResetOwner resets all changes to the "owner" edge.

func (*RepoMutation) ResetOwnerID

func (m *RepoMutation) ResetOwnerID()

ResetOwnerID resets all changes to the "owner_id" field.

func (*RepoMutation) ResetPerms

func (m *RepoMutation) ResetPerms()

ResetPerms resets all changes to the "perms" edge.

func (*RepoMutation) ResetUpdatedAt

func (m *RepoMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*RepoMutation) ResetWebhookID

func (m *RepoMutation) ResetWebhookID()

ResetWebhookID resets all changes to the "webhook_id" field.

func (*RepoMutation) SetActive

func (m *RepoMutation) SetActive(b bool)

SetActive sets the "active" field.

func (*RepoMutation) SetConfigPath

func (m *RepoMutation) SetConfigPath(s string)

SetConfigPath sets the "config_path" field.

func (*RepoMutation) SetCreatedAt

func (m *RepoMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*RepoMutation) SetDescription

func (m *RepoMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*RepoMutation) SetField

func (m *RepoMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*RepoMutation) SetID

func (m *RepoMutation) SetID(id int64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Repo entities.

func (*RepoMutation) SetLatestDeployedAt

func (m *RepoMutation) SetLatestDeployedAt(t time.Time)

SetLatestDeployedAt sets the "latest_deployed_at" field.

func (*RepoMutation) SetName

func (m *RepoMutation) SetName(s string)

SetName sets the "name" field.

func (*RepoMutation) SetNamespace

func (m *RepoMutation) SetNamespace(s string)

SetNamespace sets the "namespace" field.

func (*RepoMutation) SetOwnerID

func (m *RepoMutation) SetOwnerID(i int64)

SetOwnerID sets the "owner_id" field.

func (*RepoMutation) SetUpdatedAt

func (m *RepoMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*RepoMutation) SetWebhookID

func (m *RepoMutation) SetWebhookID(i int64)

SetWebhookID sets the "webhook_id" field.

func (RepoMutation) Tx

func (m RepoMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*RepoMutation) Type

func (m *RepoMutation) Type() string

Type returns the node type of this mutation (Repo).

func (*RepoMutation) UpdatedAt

func (m *RepoMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*RepoMutation) WebhookID

func (m *RepoMutation) WebhookID() (r int64, exists bool)

WebhookID returns the value of the "webhook_id" field in the mutation.

func (*RepoMutation) WebhookIDCleared

func (m *RepoMutation) WebhookIDCleared() bool

WebhookIDCleared returns if the "webhook_id" field was cleared in this mutation.

func (*RepoMutation) Where

func (m *RepoMutation) Where(ps ...predicate.Repo)

Where appends a list predicates to the RepoMutation builder.

type RepoQuery

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

RepoQuery is the builder for querying Repo entities.

func (*RepoQuery) All

func (rq *RepoQuery) All(ctx context.Context) ([]*Repo, error)

All executes the query and returns a list of Repos.

func (*RepoQuery) AllX

func (rq *RepoQuery) AllX(ctx context.Context) []*Repo

AllX is like All, but panics if an error occurs.

func (*RepoQuery) Clone

func (rq *RepoQuery) Clone() *RepoQuery

Clone returns a duplicate of the RepoQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*RepoQuery) Count

func (rq *RepoQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RepoQuery) CountX

func (rq *RepoQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*RepoQuery) Exist

func (rq *RepoQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*RepoQuery) ExistX

func (rq *RepoQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*RepoQuery) First

func (rq *RepoQuery) First(ctx context.Context) (*Repo, error)

First returns the first Repo entity from the query. Returns a *NotFoundError when no Repo was found.

func (*RepoQuery) FirstID

func (rq *RepoQuery) FirstID(ctx context.Context) (id int64, err error)

FirstID returns the first Repo ID from the query. Returns a *NotFoundError when no Repo ID was found.

func (*RepoQuery) FirstIDX

func (rq *RepoQuery) FirstIDX(ctx context.Context) int64

FirstIDX is like FirstID, but panics if an error occurs.

func (*RepoQuery) FirstX

func (rq *RepoQuery) FirstX(ctx context.Context) *Repo

FirstX is like First, but panics if an error occurs.

func (*RepoQuery) ForShare

func (rq *RepoQuery) ForShare(opts ...sql.LockOption) *RepoQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*RepoQuery) ForUpdate

func (rq *RepoQuery) ForUpdate(opts ...sql.LockOption) *RepoQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*RepoQuery) GroupBy

func (rq *RepoQuery) GroupBy(field string, fields ...string) *RepoGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Namespace string `json:"namespace"`
	Count int `json:"count,omitempty"`
}

client.Repo.Query().
	GroupBy(repo.FieldNamespace).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RepoQuery) IDs

func (rq *RepoQuery) IDs(ctx context.Context) ([]int64, error)

IDs executes the query and returns a list of Repo IDs.

func (*RepoQuery) IDsX

func (rq *RepoQuery) IDsX(ctx context.Context) []int64

IDsX is like IDs, but panics if an error occurs.

func (*RepoQuery) Limit

func (rq *RepoQuery) Limit(limit int) *RepoQuery

Limit adds a limit step to the query.

func (*RepoQuery) Offset

func (rq *RepoQuery) Offset(offset int) *RepoQuery

Offset adds an offset step to the query.

func (*RepoQuery) Only

func (rq *RepoQuery) Only(ctx context.Context) (*Repo, error)

Only returns a single Repo entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Repo entity is found. Returns a *NotFoundError when no Repo entities are found.

func (*RepoQuery) OnlyID

func (rq *RepoQuery) OnlyID(ctx context.Context) (id int64, err error)

OnlyID is like Only, but returns the only Repo ID in the query. Returns a *NotSingularError when more than one Repo ID is found. Returns a *NotFoundError when no entities are found.

func (*RepoQuery) OnlyIDX

func (rq *RepoQuery) OnlyIDX(ctx context.Context) int64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*RepoQuery) OnlyX

func (rq *RepoQuery) OnlyX(ctx context.Context) *Repo

OnlyX is like Only, but panics if an error occurs.

func (*RepoQuery) Order

func (rq *RepoQuery) Order(o ...OrderFunc) *RepoQuery

Order adds an order step to the query.

func (*RepoQuery) QueryDeploymentStatistics

func (rq *RepoQuery) QueryDeploymentStatistics() *DeploymentStatisticsQuery

QueryDeploymentStatistics chains the current query on the "deployment_statistics" edge.

func (*RepoQuery) QueryDeploymentStatuses

func (rq *RepoQuery) QueryDeploymentStatuses() *DeploymentStatusQuery

QueryDeploymentStatuses chains the current query on the "deployment_statuses" edge.

func (*RepoQuery) QueryDeployments

func (rq *RepoQuery) QueryDeployments() *DeploymentQuery

QueryDeployments chains the current query on the "deployments" edge.

func (*RepoQuery) QueryLocks

func (rq *RepoQuery) QueryLocks() *LockQuery

QueryLocks chains the current query on the "locks" edge.

func (*RepoQuery) QueryOwner

func (rq *RepoQuery) QueryOwner() *UserQuery

QueryOwner chains the current query on the "owner" edge.

func (*RepoQuery) QueryPerms

func (rq *RepoQuery) QueryPerms() *PermQuery

QueryPerms chains the current query on the "perms" edge.

func (*RepoQuery) Select

func (rq *RepoQuery) Select(fields ...string) *RepoSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Namespace string `json:"namespace"`
}

client.Repo.Query().
	Select(repo.FieldNamespace).
	Scan(ctx, &v)

func (*RepoQuery) Unique

func (rq *RepoQuery) Unique(unique bool) *RepoQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*RepoQuery) Where

func (rq *RepoQuery) Where(ps ...predicate.Repo) *RepoQuery

Where adds a new predicate for the RepoQuery builder.

func (*RepoQuery) WithDeploymentStatistics

func (rq *RepoQuery) WithDeploymentStatistics(opts ...func(*DeploymentStatisticsQuery)) *RepoQuery

WithDeploymentStatistics tells the query-builder to eager-load the nodes that are connected to the "deployment_statistics" edge. The optional arguments are used to configure the query builder of the edge.

func (*RepoQuery) WithDeploymentStatuses

func (rq *RepoQuery) WithDeploymentStatuses(opts ...func(*DeploymentStatusQuery)) *RepoQuery

WithDeploymentStatuses tells the query-builder to eager-load the nodes that are connected to the "deployment_statuses" edge. The optional arguments are used to configure the query builder of the edge.

func (*RepoQuery) WithDeployments

func (rq *RepoQuery) WithDeployments(opts ...func(*DeploymentQuery)) *RepoQuery

WithDeployments tells the query-builder to eager-load the nodes that are connected to the "deployments" edge. The optional arguments are used to configure the query builder of the edge.

func (*RepoQuery) WithLocks

func (rq *RepoQuery) WithLocks(opts ...func(*LockQuery)) *RepoQuery

WithLocks tells the query-builder to eager-load the nodes that are connected to the "locks" edge. The optional arguments are used to configure the query builder of the edge.

func (*RepoQuery) WithOwner

func (rq *RepoQuery) WithOwner(opts ...func(*UserQuery)) *RepoQuery

WithOwner tells the query-builder to eager-load the nodes that are connected to the "owner" edge. The optional arguments are used to configure the query builder of the edge.

func (*RepoQuery) WithPerms

func (rq *RepoQuery) WithPerms(opts ...func(*PermQuery)) *RepoQuery

WithPerms tells the query-builder to eager-load the nodes that are connected to the "perms" edge. The optional arguments are used to configure the query builder of the edge.

type RepoSelect

type RepoSelect struct {
	*RepoQuery
	// contains filtered or unexported fields
}

RepoSelect is the builder for selecting fields of Repo entities.

func (*RepoSelect) Bool

func (rs *RepoSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*RepoSelect) BoolX

func (rs *RepoSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*RepoSelect) Bools

func (rs *RepoSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*RepoSelect) BoolsX

func (rs *RepoSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*RepoSelect) Float64

func (rs *RepoSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*RepoSelect) Float64X

func (rs *RepoSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*RepoSelect) Float64s

func (rs *RepoSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*RepoSelect) Float64sX

func (rs *RepoSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*RepoSelect) Int

func (rs *RepoSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*RepoSelect) IntX

func (rs *RepoSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*RepoSelect) Ints

func (rs *RepoSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*RepoSelect) IntsX

func (rs *RepoSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*RepoSelect) Scan

func (rs *RepoSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*RepoSelect) ScanX

func (rs *RepoSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*RepoSelect) String

func (rs *RepoSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*RepoSelect) StringX

func (rs *RepoSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*RepoSelect) Strings

func (rs *RepoSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*RepoSelect) StringsX

func (rs *RepoSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type RepoUpdate

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

RepoUpdate is the builder for updating Repo entities.

func (*RepoUpdate) AddDeploymentIDs

func (ru *RepoUpdate) AddDeploymentIDs(ids ...int) *RepoUpdate

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by IDs.

func (*RepoUpdate) AddDeploymentStatisticIDs

func (ru *RepoUpdate) AddDeploymentStatisticIDs(ids ...int) *RepoUpdate

AddDeploymentStatisticIDs adds the "deployment_statistics" edge to the DeploymentStatistics entity by IDs.

func (*RepoUpdate) AddDeploymentStatistics

func (ru *RepoUpdate) AddDeploymentStatistics(d ...*DeploymentStatistics) *RepoUpdate

AddDeploymentStatistics adds the "deployment_statistics" edges to the DeploymentStatistics entity.

func (*RepoUpdate) AddDeploymentStatusIDs

func (ru *RepoUpdate) AddDeploymentStatusIDs(ids ...int) *RepoUpdate

AddDeploymentStatusIDs adds the "deployment_statuses" edge to the DeploymentStatus entity by IDs.

func (*RepoUpdate) AddDeploymentStatuses

func (ru *RepoUpdate) AddDeploymentStatuses(d ...*DeploymentStatus) *RepoUpdate

AddDeploymentStatuses adds the "deployment_statuses" edges to the DeploymentStatus entity.

func (*RepoUpdate) AddDeployments

func (ru *RepoUpdate) AddDeployments(d ...*Deployment) *RepoUpdate

AddDeployments adds the "deployments" edges to the Deployment entity.

func (*RepoUpdate) AddLockIDs

func (ru *RepoUpdate) AddLockIDs(ids ...int) *RepoUpdate

AddLockIDs adds the "locks" edge to the Lock entity by IDs.

func (*RepoUpdate) AddLocks

func (ru *RepoUpdate) AddLocks(l ...*Lock) *RepoUpdate

AddLocks adds the "locks" edges to the Lock entity.

func (*RepoUpdate) AddPermIDs

func (ru *RepoUpdate) AddPermIDs(ids ...int) *RepoUpdate

AddPermIDs adds the "perms" edge to the Perm entity by IDs.

func (*RepoUpdate) AddPerms

func (ru *RepoUpdate) AddPerms(p ...*Perm) *RepoUpdate

AddPerms adds the "perms" edges to the Perm entity.

func (*RepoUpdate) AddWebhookID

func (ru *RepoUpdate) AddWebhookID(i int64) *RepoUpdate

AddWebhookID adds i to the "webhook_id" field.

func (*RepoUpdate) ClearDeploymentStatistics

func (ru *RepoUpdate) ClearDeploymentStatistics() *RepoUpdate

ClearDeploymentStatistics clears all "deployment_statistics" edges to the DeploymentStatistics entity.

func (*RepoUpdate) ClearDeploymentStatuses

func (ru *RepoUpdate) ClearDeploymentStatuses() *RepoUpdate

ClearDeploymentStatuses clears all "deployment_statuses" edges to the DeploymentStatus entity.

func (*RepoUpdate) ClearDeployments

func (ru *RepoUpdate) ClearDeployments() *RepoUpdate

ClearDeployments clears all "deployments" edges to the Deployment entity.

func (*RepoUpdate) ClearLatestDeployedAt

func (ru *RepoUpdate) ClearLatestDeployedAt() *RepoUpdate

ClearLatestDeployedAt clears the value of the "latest_deployed_at" field.

func (*RepoUpdate) ClearLocks

func (ru *RepoUpdate) ClearLocks() *RepoUpdate

ClearLocks clears all "locks" edges to the Lock entity.

func (*RepoUpdate) ClearOwner

func (ru *RepoUpdate) ClearOwner() *RepoUpdate

ClearOwner clears the "owner" edge to the User entity.

func (*RepoUpdate) ClearOwnerID

func (ru *RepoUpdate) ClearOwnerID() *RepoUpdate

ClearOwnerID clears the value of the "owner_id" field.

func (*RepoUpdate) ClearPerms

func (ru *RepoUpdate) ClearPerms() *RepoUpdate

ClearPerms clears all "perms" edges to the Perm entity.

func (*RepoUpdate) ClearWebhookID

func (ru *RepoUpdate) ClearWebhookID() *RepoUpdate

ClearWebhookID clears the value of the "webhook_id" field.

func (*RepoUpdate) Exec

func (ru *RepoUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RepoUpdate) ExecX

func (ru *RepoUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RepoUpdate) Mutation

func (ru *RepoUpdate) Mutation() *RepoMutation

Mutation returns the RepoMutation object of the builder.

func (*RepoUpdate) RemoveDeploymentIDs

func (ru *RepoUpdate) RemoveDeploymentIDs(ids ...int) *RepoUpdate

RemoveDeploymentIDs removes the "deployments" edge to Deployment entities by IDs.

func (*RepoUpdate) RemoveDeploymentStatisticIDs

func (ru *RepoUpdate) RemoveDeploymentStatisticIDs(ids ...int) *RepoUpdate

RemoveDeploymentStatisticIDs removes the "deployment_statistics" edge to DeploymentStatistics entities by IDs.

func (*RepoUpdate) RemoveDeploymentStatistics

func (ru *RepoUpdate) RemoveDeploymentStatistics(d ...*DeploymentStatistics) *RepoUpdate

RemoveDeploymentStatistics removes "deployment_statistics" edges to DeploymentStatistics entities.

func (*RepoUpdate) RemoveDeploymentStatusIDs

func (ru *RepoUpdate) RemoveDeploymentStatusIDs(ids ...int) *RepoUpdate

RemoveDeploymentStatusIDs removes the "deployment_statuses" edge to DeploymentStatus entities by IDs.

func (*RepoUpdate) RemoveDeploymentStatuses

func (ru *RepoUpdate) RemoveDeploymentStatuses(d ...*DeploymentStatus) *RepoUpdate

RemoveDeploymentStatuses removes "deployment_statuses" edges to DeploymentStatus entities.

func (*RepoUpdate) RemoveDeployments

func (ru *RepoUpdate) RemoveDeployments(d ...*Deployment) *RepoUpdate

RemoveDeployments removes "deployments" edges to Deployment entities.

func (*RepoUpdate) RemoveLockIDs

func (ru *RepoUpdate) RemoveLockIDs(ids ...int) *RepoUpdate

RemoveLockIDs removes the "locks" edge to Lock entities by IDs.

func (*RepoUpdate) RemoveLocks

func (ru *RepoUpdate) RemoveLocks(l ...*Lock) *RepoUpdate

RemoveLocks removes "locks" edges to Lock entities.

func (*RepoUpdate) RemovePermIDs

func (ru *RepoUpdate) RemovePermIDs(ids ...int) *RepoUpdate

RemovePermIDs removes the "perms" edge to Perm entities by IDs.

func (*RepoUpdate) RemovePerms

func (ru *RepoUpdate) RemovePerms(p ...*Perm) *RepoUpdate

RemovePerms removes "perms" edges to Perm entities.

func (*RepoUpdate) Save

func (ru *RepoUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*RepoUpdate) SaveX

func (ru *RepoUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*RepoUpdate) SetActive

func (ru *RepoUpdate) SetActive(b bool) *RepoUpdate

SetActive sets the "active" field.

func (*RepoUpdate) SetConfigPath

func (ru *RepoUpdate) SetConfigPath(s string) *RepoUpdate

SetConfigPath sets the "config_path" field.

func (*RepoUpdate) SetCreatedAt

func (ru *RepoUpdate) SetCreatedAt(t time.Time) *RepoUpdate

SetCreatedAt sets the "created_at" field.

func (*RepoUpdate) SetDescription

func (ru *RepoUpdate) SetDescription(s string) *RepoUpdate

SetDescription sets the "description" field.

func (*RepoUpdate) SetLatestDeployedAt

func (ru *RepoUpdate) SetLatestDeployedAt(t time.Time) *RepoUpdate

SetLatestDeployedAt sets the "latest_deployed_at" field.

func (*RepoUpdate) SetName

func (ru *RepoUpdate) SetName(s string) *RepoUpdate

SetName sets the "name" field.

func (*RepoUpdate) SetNamespace

func (ru *RepoUpdate) SetNamespace(s string) *RepoUpdate

SetNamespace sets the "namespace" field.

func (*RepoUpdate) SetNillableActive

func (ru *RepoUpdate) SetNillableActive(b *bool) *RepoUpdate

SetNillableActive sets the "active" field if the given value is not nil.

func (*RepoUpdate) SetNillableConfigPath

func (ru *RepoUpdate) SetNillableConfigPath(s *string) *RepoUpdate

SetNillableConfigPath sets the "config_path" field if the given value is not nil.

func (*RepoUpdate) SetNillableCreatedAt

func (ru *RepoUpdate) SetNillableCreatedAt(t *time.Time) *RepoUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RepoUpdate) SetNillableLatestDeployedAt

func (ru *RepoUpdate) SetNillableLatestDeployedAt(t *time.Time) *RepoUpdate

SetNillableLatestDeployedAt sets the "latest_deployed_at" field if the given value is not nil.

func (*RepoUpdate) SetNillableOwnerID

func (ru *RepoUpdate) SetNillableOwnerID(i *int64) *RepoUpdate

SetNillableOwnerID sets the "owner_id" field if the given value is not nil.

func (*RepoUpdate) SetNillableWebhookID

func (ru *RepoUpdate) SetNillableWebhookID(i *int64) *RepoUpdate

SetNillableWebhookID sets the "webhook_id" field if the given value is not nil.

func (*RepoUpdate) SetOwner

func (ru *RepoUpdate) SetOwner(u *User) *RepoUpdate

SetOwner sets the "owner" edge to the User entity.

func (*RepoUpdate) SetOwnerID

func (ru *RepoUpdate) SetOwnerID(i int64) *RepoUpdate

SetOwnerID sets the "owner_id" field.

func (*RepoUpdate) SetUpdatedAt

func (ru *RepoUpdate) SetUpdatedAt(t time.Time) *RepoUpdate

SetUpdatedAt sets the "updated_at" field.

func (*RepoUpdate) SetWebhookID

func (ru *RepoUpdate) SetWebhookID(i int64) *RepoUpdate

SetWebhookID sets the "webhook_id" field.

func (*RepoUpdate) Where

func (ru *RepoUpdate) Where(ps ...predicate.Repo) *RepoUpdate

Where appends a list predicates to the RepoUpdate builder.

type RepoUpdateOne

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

RepoUpdateOne is the builder for updating a single Repo entity.

func (*RepoUpdateOne) AddDeploymentIDs

func (ruo *RepoUpdateOne) AddDeploymentIDs(ids ...int) *RepoUpdateOne

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by IDs.

func (*RepoUpdateOne) AddDeploymentStatisticIDs

func (ruo *RepoUpdateOne) AddDeploymentStatisticIDs(ids ...int) *RepoUpdateOne

AddDeploymentStatisticIDs adds the "deployment_statistics" edge to the DeploymentStatistics entity by IDs.

func (*RepoUpdateOne) AddDeploymentStatistics

func (ruo *RepoUpdateOne) AddDeploymentStatistics(d ...*DeploymentStatistics) *RepoUpdateOne

AddDeploymentStatistics adds the "deployment_statistics" edges to the DeploymentStatistics entity.

func (*RepoUpdateOne) AddDeploymentStatusIDs

func (ruo *RepoUpdateOne) AddDeploymentStatusIDs(ids ...int) *RepoUpdateOne

AddDeploymentStatusIDs adds the "deployment_statuses" edge to the DeploymentStatus entity by IDs.

func (*RepoUpdateOne) AddDeploymentStatuses

func (ruo *RepoUpdateOne) AddDeploymentStatuses(d ...*DeploymentStatus) *RepoUpdateOne

AddDeploymentStatuses adds the "deployment_statuses" edges to the DeploymentStatus entity.

func (*RepoUpdateOne) AddDeployments

func (ruo *RepoUpdateOne) AddDeployments(d ...*Deployment) *RepoUpdateOne

AddDeployments adds the "deployments" edges to the Deployment entity.

func (*RepoUpdateOne) AddLockIDs

func (ruo *RepoUpdateOne) AddLockIDs(ids ...int) *RepoUpdateOne

AddLockIDs adds the "locks" edge to the Lock entity by IDs.

func (*RepoUpdateOne) AddLocks

func (ruo *RepoUpdateOne) AddLocks(l ...*Lock) *RepoUpdateOne

AddLocks adds the "locks" edges to the Lock entity.

func (*RepoUpdateOne) AddPermIDs

func (ruo *RepoUpdateOne) AddPermIDs(ids ...int) *RepoUpdateOne

AddPermIDs adds the "perms" edge to the Perm entity by IDs.

func (*RepoUpdateOne) AddPerms

func (ruo *RepoUpdateOne) AddPerms(p ...*Perm) *RepoUpdateOne

AddPerms adds the "perms" edges to the Perm entity.

func (*RepoUpdateOne) AddWebhookID

func (ruo *RepoUpdateOne) AddWebhookID(i int64) *RepoUpdateOne

AddWebhookID adds i to the "webhook_id" field.

func (*RepoUpdateOne) ClearDeploymentStatistics

func (ruo *RepoUpdateOne) ClearDeploymentStatistics() *RepoUpdateOne

ClearDeploymentStatistics clears all "deployment_statistics" edges to the DeploymentStatistics entity.

func (*RepoUpdateOne) ClearDeploymentStatuses

func (ruo *RepoUpdateOne) ClearDeploymentStatuses() *RepoUpdateOne

ClearDeploymentStatuses clears all "deployment_statuses" edges to the DeploymentStatus entity.

func (*RepoUpdateOne) ClearDeployments

func (ruo *RepoUpdateOne) ClearDeployments() *RepoUpdateOne

ClearDeployments clears all "deployments" edges to the Deployment entity.

func (*RepoUpdateOne) ClearLatestDeployedAt

func (ruo *RepoUpdateOne) ClearLatestDeployedAt() *RepoUpdateOne

ClearLatestDeployedAt clears the value of the "latest_deployed_at" field.

func (*RepoUpdateOne) ClearLocks

func (ruo *RepoUpdateOne) ClearLocks() *RepoUpdateOne

ClearLocks clears all "locks" edges to the Lock entity.

func (*RepoUpdateOne) ClearOwner

func (ruo *RepoUpdateOne) ClearOwner() *RepoUpdateOne

ClearOwner clears the "owner" edge to the User entity.

func (*RepoUpdateOne) ClearOwnerID

func (ruo *RepoUpdateOne) ClearOwnerID() *RepoUpdateOne

ClearOwnerID clears the value of the "owner_id" field.

func (*RepoUpdateOne) ClearPerms

func (ruo *RepoUpdateOne) ClearPerms() *RepoUpdateOne

ClearPerms clears all "perms" edges to the Perm entity.

func (*RepoUpdateOne) ClearWebhookID

func (ruo *RepoUpdateOne) ClearWebhookID() *RepoUpdateOne

ClearWebhookID clears the value of the "webhook_id" field.

func (*RepoUpdateOne) Exec

func (ruo *RepoUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RepoUpdateOne) ExecX

func (ruo *RepoUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*RepoUpdateOne) Mutation

func (ruo *RepoUpdateOne) Mutation() *RepoMutation

Mutation returns the RepoMutation object of the builder.

func (*RepoUpdateOne) RemoveDeploymentIDs

func (ruo *RepoUpdateOne) RemoveDeploymentIDs(ids ...int) *RepoUpdateOne

RemoveDeploymentIDs removes the "deployments" edge to Deployment entities by IDs.

func (*RepoUpdateOne) RemoveDeploymentStatisticIDs

func (ruo *RepoUpdateOne) RemoveDeploymentStatisticIDs(ids ...int) *RepoUpdateOne

RemoveDeploymentStatisticIDs removes the "deployment_statistics" edge to DeploymentStatistics entities by IDs.

func (*RepoUpdateOne) RemoveDeploymentStatistics

func (ruo *RepoUpdateOne) RemoveDeploymentStatistics(d ...*DeploymentStatistics) *RepoUpdateOne

RemoveDeploymentStatistics removes "deployment_statistics" edges to DeploymentStatistics entities.

func (*RepoUpdateOne) RemoveDeploymentStatusIDs

func (ruo *RepoUpdateOne) RemoveDeploymentStatusIDs(ids ...int) *RepoUpdateOne

RemoveDeploymentStatusIDs removes the "deployment_statuses" edge to DeploymentStatus entities by IDs.

func (*RepoUpdateOne) RemoveDeploymentStatuses

func (ruo *RepoUpdateOne) RemoveDeploymentStatuses(d ...*DeploymentStatus) *RepoUpdateOne

RemoveDeploymentStatuses removes "deployment_statuses" edges to DeploymentStatus entities.

func (*RepoUpdateOne) RemoveDeployments

func (ruo *RepoUpdateOne) RemoveDeployments(d ...*Deployment) *RepoUpdateOne

RemoveDeployments removes "deployments" edges to Deployment entities.

func (*RepoUpdateOne) RemoveLockIDs

func (ruo *RepoUpdateOne) RemoveLockIDs(ids ...int) *RepoUpdateOne

RemoveLockIDs removes the "locks" edge to Lock entities by IDs.

func (*RepoUpdateOne) RemoveLocks

func (ruo *RepoUpdateOne) RemoveLocks(l ...*Lock) *RepoUpdateOne

RemoveLocks removes "locks" edges to Lock entities.

func (*RepoUpdateOne) RemovePermIDs

func (ruo *RepoUpdateOne) RemovePermIDs(ids ...int) *RepoUpdateOne

RemovePermIDs removes the "perms" edge to Perm entities by IDs.

func (*RepoUpdateOne) RemovePerms

func (ruo *RepoUpdateOne) RemovePerms(p ...*Perm) *RepoUpdateOne

RemovePerms removes "perms" edges to Perm entities.

func (*RepoUpdateOne) Save

func (ruo *RepoUpdateOne) Save(ctx context.Context) (*Repo, error)

Save executes the query and returns the updated Repo entity.

func (*RepoUpdateOne) SaveX

func (ruo *RepoUpdateOne) SaveX(ctx context.Context) *Repo

SaveX is like Save, but panics if an error occurs.

func (*RepoUpdateOne) Select

func (ruo *RepoUpdateOne) Select(field string, fields ...string) *RepoUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*RepoUpdateOne) SetActive

func (ruo *RepoUpdateOne) SetActive(b bool) *RepoUpdateOne

SetActive sets the "active" field.

func (*RepoUpdateOne) SetConfigPath

func (ruo *RepoUpdateOne) SetConfigPath(s string) *RepoUpdateOne

SetConfigPath sets the "config_path" field.

func (*RepoUpdateOne) SetCreatedAt

func (ruo *RepoUpdateOne) SetCreatedAt(t time.Time) *RepoUpdateOne

SetCreatedAt sets the "created_at" field.

func (*RepoUpdateOne) SetDescription

func (ruo *RepoUpdateOne) SetDescription(s string) *RepoUpdateOne

SetDescription sets the "description" field.

func (*RepoUpdateOne) SetLatestDeployedAt

func (ruo *RepoUpdateOne) SetLatestDeployedAt(t time.Time) *RepoUpdateOne

SetLatestDeployedAt sets the "latest_deployed_at" field.

func (*RepoUpdateOne) SetName

func (ruo *RepoUpdateOne) SetName(s string) *RepoUpdateOne

SetName sets the "name" field.

func (*RepoUpdateOne) SetNamespace

func (ruo *RepoUpdateOne) SetNamespace(s string) *RepoUpdateOne

SetNamespace sets the "namespace" field.

func (*RepoUpdateOne) SetNillableActive

func (ruo *RepoUpdateOne) SetNillableActive(b *bool) *RepoUpdateOne

SetNillableActive sets the "active" field if the given value is not nil.

func (*RepoUpdateOne) SetNillableConfigPath

func (ruo *RepoUpdateOne) SetNillableConfigPath(s *string) *RepoUpdateOne

SetNillableConfigPath sets the "config_path" field if the given value is not nil.

func (*RepoUpdateOne) SetNillableCreatedAt

func (ruo *RepoUpdateOne) SetNillableCreatedAt(t *time.Time) *RepoUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*RepoUpdateOne) SetNillableLatestDeployedAt

func (ruo *RepoUpdateOne) SetNillableLatestDeployedAt(t *time.Time) *RepoUpdateOne

SetNillableLatestDeployedAt sets the "latest_deployed_at" field if the given value is not nil.

func (*RepoUpdateOne) SetNillableOwnerID

func (ruo *RepoUpdateOne) SetNillableOwnerID(i *int64) *RepoUpdateOne

SetNillableOwnerID sets the "owner_id" field if the given value is not nil.

func (*RepoUpdateOne) SetNillableWebhookID

func (ruo *RepoUpdateOne) SetNillableWebhookID(i *int64) *RepoUpdateOne

SetNillableWebhookID sets the "webhook_id" field if the given value is not nil.

func (*RepoUpdateOne) SetOwner

func (ruo *RepoUpdateOne) SetOwner(u *User) *RepoUpdateOne

SetOwner sets the "owner" edge to the User entity.

func (*RepoUpdateOne) SetOwnerID

func (ruo *RepoUpdateOne) SetOwnerID(i int64) *RepoUpdateOne

SetOwnerID sets the "owner_id" field.

func (*RepoUpdateOne) SetUpdatedAt

func (ruo *RepoUpdateOne) SetUpdatedAt(t time.Time) *RepoUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*RepoUpdateOne) SetWebhookID

func (ruo *RepoUpdateOne) SetWebhookID(i int64) *RepoUpdateOne

SetWebhookID sets the "webhook_id" field.

type Repos

type Repos []*Repo

Repos is a parsable slice of Repo.

type Review

type Review struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Status holds the value of the "status" field.
	Status review.Status `json:"status"`
	// Comment holds the value of the "comment" field.
	Comment string `json:"comment,omitemtpy"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at"`
	// UserID holds the value of the "user_id" field.
	UserID int64 `json:"user_id,omitemtpy"`
	// DeploymentID holds the value of the "deployment_id" field.
	DeploymentID int `json:"deployment_id"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ReviewQuery when eager-loading is set.
	Edges ReviewEdges `json:"edges"`
	// contains filtered or unexported fields
}

Review is the model entity for the Review schema.

func (*Review) QueryDeployment

func (r *Review) QueryDeployment() *DeploymentQuery

QueryDeployment queries the "deployment" edge of the Review entity.

func (*Review) QueryEvent

func (r *Review) QueryEvent() *EventQuery

QueryEvent queries the "event" edge of the Review entity.

func (*Review) QueryUser

func (r *Review) QueryUser() *UserQuery

QueryUser queries the "user" edge of the Review entity.

func (*Review) String

func (r *Review) String() string

String implements the fmt.Stringer.

func (*Review) Unwrap

func (r *Review) Unwrap() *Review

Unwrap unwraps the Review entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*Review) Update

func (r *Review) Update() *ReviewUpdateOne

Update returns a builder for updating this Review. Note that you need to call Review.Unwrap() before calling this method if this Review was returned from a transaction, and the transaction was committed or rolled back.

type ReviewClient

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

ReviewClient is a client for the Review schema.

func NewReviewClient

func NewReviewClient(c config) *ReviewClient

NewReviewClient returns a client for the Review from the given config.

func (*ReviewClient) Create

func (c *ReviewClient) Create() *ReviewCreate

Create returns a create builder for Review.

func (*ReviewClient) CreateBulk

func (c *ReviewClient) CreateBulk(builders ...*ReviewCreate) *ReviewCreateBulk

CreateBulk returns a builder for creating a bulk of Review entities.

func (*ReviewClient) Delete

func (c *ReviewClient) Delete() *ReviewDelete

Delete returns a delete builder for Review.

func (*ReviewClient) DeleteOne

func (c *ReviewClient) DeleteOne(r *Review) *ReviewDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ReviewClient) DeleteOneID

func (c *ReviewClient) DeleteOneID(id int) *ReviewDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*ReviewClient) Get

func (c *ReviewClient) Get(ctx context.Context, id int) (*Review, error)

Get returns a Review entity by its id.

func (*ReviewClient) GetX

func (c *ReviewClient) GetX(ctx context.Context, id int) *Review

GetX is like Get, but panics if an error occurs.

func (*ReviewClient) Hooks

func (c *ReviewClient) Hooks() []Hook

Hooks returns the client hooks.

func (*ReviewClient) Query

func (c *ReviewClient) Query() *ReviewQuery

Query returns a query builder for Review.

func (*ReviewClient) QueryDeployment

func (c *ReviewClient) QueryDeployment(r *Review) *DeploymentQuery

QueryDeployment queries the deployment edge of a Review.

func (*ReviewClient) QueryEvent

func (c *ReviewClient) QueryEvent(r *Review) *EventQuery

QueryEvent queries the event edge of a Review.

func (*ReviewClient) QueryUser

func (c *ReviewClient) QueryUser(r *Review) *UserQuery

QueryUser queries the user edge of a Review.

func (*ReviewClient) Update

func (c *ReviewClient) Update() *ReviewUpdate

Update returns an update builder for Review.

func (*ReviewClient) UpdateOne

func (c *ReviewClient) UpdateOne(r *Review) *ReviewUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ReviewClient) UpdateOneID

func (c *ReviewClient) UpdateOneID(id int) *ReviewUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ReviewClient) Use

func (c *ReviewClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `review.Hooks(f(g(h())))`.

type ReviewCreate

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

ReviewCreate is the builder for creating a Review entity.

func (*ReviewCreate) AddEvent

func (rc *ReviewCreate) AddEvent(e ...*Event) *ReviewCreate

AddEvent adds the "event" edges to the Event entity.

func (*ReviewCreate) AddEventIDs

func (rc *ReviewCreate) AddEventIDs(ids ...int) *ReviewCreate

AddEventIDs adds the "event" edge to the Event entity by IDs.

func (*ReviewCreate) Exec

func (rc *ReviewCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ReviewCreate) ExecX

func (rc *ReviewCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReviewCreate) Mutation

func (rc *ReviewCreate) Mutation() *ReviewMutation

Mutation returns the ReviewMutation object of the builder.

func (*ReviewCreate) Save

func (rc *ReviewCreate) Save(ctx context.Context) (*Review, error)

Save creates the Review in the database.

func (*ReviewCreate) SaveX

func (rc *ReviewCreate) SaveX(ctx context.Context) *Review

SaveX calls Save and panics if Save returns an error.

func (*ReviewCreate) SetComment

func (rc *ReviewCreate) SetComment(s string) *ReviewCreate

SetComment sets the "comment" field.

func (*ReviewCreate) SetCreatedAt

func (rc *ReviewCreate) SetCreatedAt(t time.Time) *ReviewCreate

SetCreatedAt sets the "created_at" field.

func (*ReviewCreate) SetDeployment

func (rc *ReviewCreate) SetDeployment(d *Deployment) *ReviewCreate

SetDeployment sets the "deployment" edge to the Deployment entity.

func (*ReviewCreate) SetDeploymentID

func (rc *ReviewCreate) SetDeploymentID(i int) *ReviewCreate

SetDeploymentID sets the "deployment_id" field.

func (*ReviewCreate) SetNillableComment

func (rc *ReviewCreate) SetNillableComment(s *string) *ReviewCreate

SetNillableComment sets the "comment" field if the given value is not nil.

func (*ReviewCreate) SetNillableCreatedAt

func (rc *ReviewCreate) SetNillableCreatedAt(t *time.Time) *ReviewCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ReviewCreate) SetNillableStatus

func (rc *ReviewCreate) SetNillableStatus(r *review.Status) *ReviewCreate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ReviewCreate) SetNillableUpdatedAt

func (rc *ReviewCreate) SetNillableUpdatedAt(t *time.Time) *ReviewCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*ReviewCreate) SetNillableUserID

func (rc *ReviewCreate) SetNillableUserID(i *int64) *ReviewCreate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*ReviewCreate) SetStatus

func (rc *ReviewCreate) SetStatus(r review.Status) *ReviewCreate

SetStatus sets the "status" field.

func (*ReviewCreate) SetUpdatedAt

func (rc *ReviewCreate) SetUpdatedAt(t time.Time) *ReviewCreate

SetUpdatedAt sets the "updated_at" field.

func (*ReviewCreate) SetUser

func (rc *ReviewCreate) SetUser(u *User) *ReviewCreate

SetUser sets the "user" edge to the User entity.

func (*ReviewCreate) SetUserID

func (rc *ReviewCreate) SetUserID(i int64) *ReviewCreate

SetUserID sets the "user_id" field.

type ReviewCreateBulk

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

ReviewCreateBulk is the builder for creating many Review entities in bulk.

func (*ReviewCreateBulk) Exec

func (rcb *ReviewCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ReviewCreateBulk) ExecX

func (rcb *ReviewCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReviewCreateBulk) Save

func (rcb *ReviewCreateBulk) Save(ctx context.Context) ([]*Review, error)

Save creates the Review entities in the database.

func (*ReviewCreateBulk) SaveX

func (rcb *ReviewCreateBulk) SaveX(ctx context.Context) []*Review

SaveX is like Save, but panics if an error occurs.

type ReviewDelete

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

ReviewDelete is the builder for deleting a Review entity.

func (*ReviewDelete) Exec

func (rd *ReviewDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*ReviewDelete) ExecX

func (rd *ReviewDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*ReviewDelete) Where

func (rd *ReviewDelete) Where(ps ...predicate.Review) *ReviewDelete

Where appends a list predicates to the ReviewDelete builder.

type ReviewDeleteOne

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

ReviewDeleteOne is the builder for deleting a single Review entity.

func (*ReviewDeleteOne) Exec

func (rdo *ReviewDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ReviewDeleteOne) ExecX

func (rdo *ReviewDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type ReviewEdges

type ReviewEdges struct {
	// User holds the value of the user edge.
	User *User `json:"user,omitempty"`
	// Deployment holds the value of the deployment edge.
	Deployment *Deployment `json:"deployment,omitempty"`
	// Event holds the value of the event edge.
	Event []*Event `json:"event,omitempty"`
	// contains filtered or unexported fields
}

ReviewEdges holds the relations/edges for other nodes in the graph.

func (ReviewEdges) DeploymentOrErr

func (e ReviewEdges) DeploymentOrErr() (*Deployment, error)

DeploymentOrErr returns the Deployment value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (ReviewEdges) EventOrErr

func (e ReviewEdges) EventOrErr() ([]*Event, error)

EventOrErr returns the Event value or an error if the edge was not loaded in eager-loading.

func (ReviewEdges) UserOrErr

func (e ReviewEdges) UserOrErr() (*User, error)

UserOrErr returns the User value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

type ReviewGroupBy

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

ReviewGroupBy is the group-by builder for Review entities.

func (*ReviewGroupBy) Aggregate

func (rgb *ReviewGroupBy) Aggregate(fns ...AggregateFunc) *ReviewGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*ReviewGroupBy) Bool

func (rgb *ReviewGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ReviewGroupBy) BoolX

func (rgb *ReviewGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ReviewGroupBy) Bools

func (rgb *ReviewGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*ReviewGroupBy) BoolsX

func (rgb *ReviewGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ReviewGroupBy) Float64

func (rgb *ReviewGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ReviewGroupBy) Float64X

func (rgb *ReviewGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ReviewGroupBy) Float64s

func (rgb *ReviewGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*ReviewGroupBy) Float64sX

func (rgb *ReviewGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ReviewGroupBy) Int

func (rgb *ReviewGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ReviewGroupBy) IntX

func (rgb *ReviewGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ReviewGroupBy) Ints

func (rgb *ReviewGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*ReviewGroupBy) IntsX

func (rgb *ReviewGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ReviewGroupBy) Scan

func (rgb *ReviewGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*ReviewGroupBy) ScanX

func (rgb *ReviewGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ReviewGroupBy) String

func (rgb *ReviewGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*ReviewGroupBy) StringX

func (rgb *ReviewGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ReviewGroupBy) Strings

func (rgb *ReviewGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*ReviewGroupBy) StringsX

func (rgb *ReviewGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ReviewMutation

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

ReviewMutation represents an operation that mutates the Review nodes in the graph.

func (*ReviewMutation) AddEventIDs

func (m *ReviewMutation) AddEventIDs(ids ...int)

AddEventIDs adds the "event" edge to the Event entity by ids.

func (*ReviewMutation) AddField

func (m *ReviewMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ReviewMutation) AddedEdges

func (m *ReviewMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*ReviewMutation) AddedField

func (m *ReviewMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ReviewMutation) AddedFields

func (m *ReviewMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*ReviewMutation) AddedIDs

func (m *ReviewMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*ReviewMutation) ClearComment

func (m *ReviewMutation) ClearComment()

ClearComment clears the value of the "comment" field.

func (*ReviewMutation) ClearDeployment

func (m *ReviewMutation) ClearDeployment()

ClearDeployment clears the "deployment" edge to the Deployment entity.

func (*ReviewMutation) ClearEdge

func (m *ReviewMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*ReviewMutation) ClearEvent

func (m *ReviewMutation) ClearEvent()

ClearEvent clears the "event" edge to the Event entity.

func (*ReviewMutation) ClearField

func (m *ReviewMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*ReviewMutation) ClearUser

func (m *ReviewMutation) ClearUser()

ClearUser clears the "user" edge to the User entity.

func (*ReviewMutation) ClearUserID

func (m *ReviewMutation) ClearUserID()

ClearUserID clears the value of the "user_id" field.

func (*ReviewMutation) ClearedEdges

func (m *ReviewMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*ReviewMutation) ClearedFields

func (m *ReviewMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (ReviewMutation) Client

func (m ReviewMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*ReviewMutation) Comment

func (m *ReviewMutation) Comment() (r string, exists bool)

Comment returns the value of the "comment" field in the mutation.

func (*ReviewMutation) CommentCleared

func (m *ReviewMutation) CommentCleared() bool

CommentCleared returns if the "comment" field was cleared in this mutation.

func (*ReviewMutation) CreatedAt

func (m *ReviewMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*ReviewMutation) DeploymentCleared

func (m *ReviewMutation) DeploymentCleared() bool

DeploymentCleared reports if the "deployment" edge to the Deployment entity was cleared.

func (*ReviewMutation) DeploymentID

func (m *ReviewMutation) DeploymentID() (r int, exists bool)

DeploymentID returns the value of the "deployment_id" field in the mutation.

func (*ReviewMutation) DeploymentIDs

func (m *ReviewMutation) DeploymentIDs() (ids []int)

DeploymentIDs returns the "deployment" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use DeploymentID instead. It exists only for internal usage by the builders.

func (*ReviewMutation) EdgeCleared

func (m *ReviewMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*ReviewMutation) EventCleared

func (m *ReviewMutation) EventCleared() bool

EventCleared reports if the "event" edge to the Event entity was cleared.

func (*ReviewMutation) EventIDs

func (m *ReviewMutation) EventIDs() (ids []int)

EventIDs returns the "event" edge IDs in the mutation.

func (*ReviewMutation) Field

func (m *ReviewMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*ReviewMutation) FieldCleared

func (m *ReviewMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*ReviewMutation) Fields

func (m *ReviewMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*ReviewMutation) ID

func (m *ReviewMutation) ID() (id int, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*ReviewMutation) IDs

func (m *ReviewMutation) IDs(ctx context.Context) ([]int, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*ReviewMutation) OldComment

func (m *ReviewMutation) OldComment(ctx context.Context) (v string, err error)

OldComment returns the old "comment" field's value of the Review entity. If the Review object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ReviewMutation) OldCreatedAt

func (m *ReviewMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the Review entity. If the Review object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ReviewMutation) OldDeploymentID

func (m *ReviewMutation) OldDeploymentID(ctx context.Context) (v int, err error)

OldDeploymentID returns the old "deployment_id" field's value of the Review entity. If the Review object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ReviewMutation) OldField

func (m *ReviewMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*ReviewMutation) OldStatus

func (m *ReviewMutation) OldStatus(ctx context.Context) (v review.Status, err error)

OldStatus returns the old "status" field's value of the Review entity. If the Review object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ReviewMutation) OldUpdatedAt

func (m *ReviewMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the Review entity. If the Review object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ReviewMutation) OldUserID

func (m *ReviewMutation) OldUserID(ctx context.Context) (v int64, err error)

OldUserID returns the old "user_id" field's value of the Review entity. If the Review object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*ReviewMutation) Op

func (m *ReviewMutation) Op() Op

Op returns the operation name.

func (*ReviewMutation) RemoveEventIDs

func (m *ReviewMutation) RemoveEventIDs(ids ...int)

RemoveEventIDs removes the "event" edge to the Event entity by IDs.

func (*ReviewMutation) RemovedEdges

func (m *ReviewMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*ReviewMutation) RemovedEventIDs

func (m *ReviewMutation) RemovedEventIDs() (ids []int)

RemovedEvent returns the removed IDs of the "event" edge to the Event entity.

func (*ReviewMutation) RemovedIDs

func (m *ReviewMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*ReviewMutation) ResetComment

func (m *ReviewMutation) ResetComment()

ResetComment resets all changes to the "comment" field.

func (*ReviewMutation) ResetCreatedAt

func (m *ReviewMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*ReviewMutation) ResetDeployment

func (m *ReviewMutation) ResetDeployment()

ResetDeployment resets all changes to the "deployment" edge.

func (*ReviewMutation) ResetDeploymentID

func (m *ReviewMutation) ResetDeploymentID()

ResetDeploymentID resets all changes to the "deployment_id" field.

func (*ReviewMutation) ResetEdge

func (m *ReviewMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*ReviewMutation) ResetEvent

func (m *ReviewMutation) ResetEvent()

ResetEvent resets all changes to the "event" edge.

func (*ReviewMutation) ResetField

func (m *ReviewMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*ReviewMutation) ResetStatus

func (m *ReviewMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*ReviewMutation) ResetUpdatedAt

func (m *ReviewMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*ReviewMutation) ResetUser

func (m *ReviewMutation) ResetUser()

ResetUser resets all changes to the "user" edge.

func (*ReviewMutation) ResetUserID

func (m *ReviewMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*ReviewMutation) SetComment

func (m *ReviewMutation) SetComment(s string)

SetComment sets the "comment" field.

func (*ReviewMutation) SetCreatedAt

func (m *ReviewMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*ReviewMutation) SetDeploymentID

func (m *ReviewMutation) SetDeploymentID(i int)

SetDeploymentID sets the "deployment_id" field.

func (*ReviewMutation) SetField

func (m *ReviewMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*ReviewMutation) SetStatus

func (m *ReviewMutation) SetStatus(r review.Status)

SetStatus sets the "status" field.

func (*ReviewMutation) SetUpdatedAt

func (m *ReviewMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*ReviewMutation) SetUserID

func (m *ReviewMutation) SetUserID(i int64)

SetUserID sets the "user_id" field.

func (*ReviewMutation) Status

func (m *ReviewMutation) Status() (r review.Status, exists bool)

Status returns the value of the "status" field in the mutation.

func (ReviewMutation) Tx

func (m ReviewMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*ReviewMutation) Type

func (m *ReviewMutation) Type() string

Type returns the node type of this mutation (Review).

func (*ReviewMutation) UpdatedAt

func (m *ReviewMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*ReviewMutation) UserCleared

func (m *ReviewMutation) UserCleared() bool

UserCleared reports if the "user" edge to the User entity was cleared.

func (*ReviewMutation) UserID

func (m *ReviewMutation) UserID() (r int64, exists bool)

UserID returns the value of the "user_id" field in the mutation.

func (*ReviewMutation) UserIDCleared

func (m *ReviewMutation) UserIDCleared() bool

UserIDCleared returns if the "user_id" field was cleared in this mutation.

func (*ReviewMutation) UserIDs

func (m *ReviewMutation) UserIDs() (ids []int64)

UserIDs returns the "user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use UserID instead. It exists only for internal usage by the builders.

func (*ReviewMutation) Where

func (m *ReviewMutation) Where(ps ...predicate.Review)

Where appends a list predicates to the ReviewMutation builder.

type ReviewQuery

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

ReviewQuery is the builder for querying Review entities.

func (*ReviewQuery) All

func (rq *ReviewQuery) All(ctx context.Context) ([]*Review, error)

All executes the query and returns a list of Reviews.

func (*ReviewQuery) AllX

func (rq *ReviewQuery) AllX(ctx context.Context) []*Review

AllX is like All, but panics if an error occurs.

func (*ReviewQuery) Clone

func (rq *ReviewQuery) Clone() *ReviewQuery

Clone returns a duplicate of the ReviewQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*ReviewQuery) Count

func (rq *ReviewQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ReviewQuery) CountX

func (rq *ReviewQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*ReviewQuery) Exist

func (rq *ReviewQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*ReviewQuery) ExistX

func (rq *ReviewQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*ReviewQuery) First

func (rq *ReviewQuery) First(ctx context.Context) (*Review, error)

First returns the first Review entity from the query. Returns a *NotFoundError when no Review was found.

func (*ReviewQuery) FirstID

func (rq *ReviewQuery) FirstID(ctx context.Context) (id int, err error)

FirstID returns the first Review ID from the query. Returns a *NotFoundError when no Review ID was found.

func (*ReviewQuery) FirstIDX

func (rq *ReviewQuery) FirstIDX(ctx context.Context) int

FirstIDX is like FirstID, but panics if an error occurs.

func (*ReviewQuery) FirstX

func (rq *ReviewQuery) FirstX(ctx context.Context) *Review

FirstX is like First, but panics if an error occurs.

func (*ReviewQuery) ForShare

func (rq *ReviewQuery) ForShare(opts ...sql.LockOption) *ReviewQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*ReviewQuery) ForUpdate

func (rq *ReviewQuery) ForUpdate(opts ...sql.LockOption) *ReviewQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*ReviewQuery) GroupBy

func (rq *ReviewQuery) GroupBy(field string, fields ...string) *ReviewGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Status review.Status `json:"status"`
	Count int `json:"count,omitempty"`
}

client.Review.Query().
	GroupBy(review.FieldStatus).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ReviewQuery) IDs

func (rq *ReviewQuery) IDs(ctx context.Context) ([]int, error)

IDs executes the query and returns a list of Review IDs.

func (*ReviewQuery) IDsX

func (rq *ReviewQuery) IDsX(ctx context.Context) []int

IDsX is like IDs, but panics if an error occurs.

func (*ReviewQuery) Limit

func (rq *ReviewQuery) Limit(limit int) *ReviewQuery

Limit adds a limit step to the query.

func (*ReviewQuery) Offset

func (rq *ReviewQuery) Offset(offset int) *ReviewQuery

Offset adds an offset step to the query.

func (*ReviewQuery) Only

func (rq *ReviewQuery) Only(ctx context.Context) (*Review, error)

Only returns a single Review entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one Review entity is found. Returns a *NotFoundError when no Review entities are found.

func (*ReviewQuery) OnlyID

func (rq *ReviewQuery) OnlyID(ctx context.Context) (id int, err error)

OnlyID is like Only, but returns the only Review ID in the query. Returns a *NotSingularError when more than one Review ID is found. Returns a *NotFoundError when no entities are found.

func (*ReviewQuery) OnlyIDX

func (rq *ReviewQuery) OnlyIDX(ctx context.Context) int

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*ReviewQuery) OnlyX

func (rq *ReviewQuery) OnlyX(ctx context.Context) *Review

OnlyX is like Only, but panics if an error occurs.

func (*ReviewQuery) Order

func (rq *ReviewQuery) Order(o ...OrderFunc) *ReviewQuery

Order adds an order step to the query.

func (*ReviewQuery) QueryDeployment

func (rq *ReviewQuery) QueryDeployment() *DeploymentQuery

QueryDeployment chains the current query on the "deployment" edge.

func (*ReviewQuery) QueryEvent

func (rq *ReviewQuery) QueryEvent() *EventQuery

QueryEvent chains the current query on the "event" edge.

func (*ReviewQuery) QueryUser

func (rq *ReviewQuery) QueryUser() *UserQuery

QueryUser chains the current query on the "user" edge.

func (*ReviewQuery) Select

func (rq *ReviewQuery) Select(fields ...string) *ReviewSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Status review.Status `json:"status"`
}

client.Review.Query().
	Select(review.FieldStatus).
	Scan(ctx, &v)

func (*ReviewQuery) Unique

func (rq *ReviewQuery) Unique(unique bool) *ReviewQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*ReviewQuery) Where

func (rq *ReviewQuery) Where(ps ...predicate.Review) *ReviewQuery

Where adds a new predicate for the ReviewQuery builder.

func (*ReviewQuery) WithDeployment

func (rq *ReviewQuery) WithDeployment(opts ...func(*DeploymentQuery)) *ReviewQuery

WithDeployment tells the query-builder to eager-load the nodes that are connected to the "deployment" edge. The optional arguments are used to configure the query builder of the edge.

func (*ReviewQuery) WithEvent

func (rq *ReviewQuery) WithEvent(opts ...func(*EventQuery)) *ReviewQuery

WithEvent tells the query-builder to eager-load the nodes that are connected to the "event" edge. The optional arguments are used to configure the query builder of the edge.

func (*ReviewQuery) WithUser

func (rq *ReviewQuery) WithUser(opts ...func(*UserQuery)) *ReviewQuery

WithUser tells the query-builder to eager-load the nodes that are connected to the "user" edge. The optional arguments are used to configure the query builder of the edge.

type ReviewSelect

type ReviewSelect struct {
	*ReviewQuery
	// contains filtered or unexported fields
}

ReviewSelect is the builder for selecting fields of Review entities.

func (*ReviewSelect) Bool

func (rs *ReviewSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*ReviewSelect) BoolX

func (rs *ReviewSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*ReviewSelect) Bools

func (rs *ReviewSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*ReviewSelect) BoolsX

func (rs *ReviewSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*ReviewSelect) Float64

func (rs *ReviewSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*ReviewSelect) Float64X

func (rs *ReviewSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*ReviewSelect) Float64s

func (rs *ReviewSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*ReviewSelect) Float64sX

func (rs *ReviewSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*ReviewSelect) Int

func (rs *ReviewSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*ReviewSelect) IntX

func (rs *ReviewSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*ReviewSelect) Ints

func (rs *ReviewSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*ReviewSelect) IntsX

func (rs *ReviewSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*ReviewSelect) Scan

func (rs *ReviewSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*ReviewSelect) ScanX

func (rs *ReviewSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*ReviewSelect) String

func (rs *ReviewSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*ReviewSelect) StringX

func (rs *ReviewSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*ReviewSelect) Strings

func (rs *ReviewSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*ReviewSelect) StringsX

func (rs *ReviewSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type ReviewUpdate

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

ReviewUpdate is the builder for updating Review entities.

func (*ReviewUpdate) AddEvent

func (ru *ReviewUpdate) AddEvent(e ...*Event) *ReviewUpdate

AddEvent adds the "event" edges to the Event entity.

func (*ReviewUpdate) AddEventIDs

func (ru *ReviewUpdate) AddEventIDs(ids ...int) *ReviewUpdate

AddEventIDs adds the "event" edge to the Event entity by IDs.

func (*ReviewUpdate) ClearComment

func (ru *ReviewUpdate) ClearComment() *ReviewUpdate

ClearComment clears the value of the "comment" field.

func (*ReviewUpdate) ClearDeployment

func (ru *ReviewUpdate) ClearDeployment() *ReviewUpdate

ClearDeployment clears the "deployment" edge to the Deployment entity.

func (*ReviewUpdate) ClearEvent

func (ru *ReviewUpdate) ClearEvent() *ReviewUpdate

ClearEvent clears all "event" edges to the Event entity.

func (*ReviewUpdate) ClearUser

func (ru *ReviewUpdate) ClearUser() *ReviewUpdate

ClearUser clears the "user" edge to the User entity.

func (*ReviewUpdate) ClearUserID

func (ru *ReviewUpdate) ClearUserID() *ReviewUpdate

ClearUserID clears the value of the "user_id" field.

func (*ReviewUpdate) Exec

func (ru *ReviewUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ReviewUpdate) ExecX

func (ru *ReviewUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReviewUpdate) Mutation

func (ru *ReviewUpdate) Mutation() *ReviewMutation

Mutation returns the ReviewMutation object of the builder.

func (*ReviewUpdate) RemoveEvent

func (ru *ReviewUpdate) RemoveEvent(e ...*Event) *ReviewUpdate

RemoveEvent removes "event" edges to Event entities.

func (*ReviewUpdate) RemoveEventIDs

func (ru *ReviewUpdate) RemoveEventIDs(ids ...int) *ReviewUpdate

RemoveEventIDs removes the "event" edge to Event entities by IDs.

func (*ReviewUpdate) Save

func (ru *ReviewUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*ReviewUpdate) SaveX

func (ru *ReviewUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*ReviewUpdate) SetComment

func (ru *ReviewUpdate) SetComment(s string) *ReviewUpdate

SetComment sets the "comment" field.

func (*ReviewUpdate) SetCreatedAt

func (ru *ReviewUpdate) SetCreatedAt(t time.Time) *ReviewUpdate

SetCreatedAt sets the "created_at" field.

func (*ReviewUpdate) SetDeployment

func (ru *ReviewUpdate) SetDeployment(d *Deployment) *ReviewUpdate

SetDeployment sets the "deployment" edge to the Deployment entity.

func (*ReviewUpdate) SetDeploymentID

func (ru *ReviewUpdate) SetDeploymentID(i int) *ReviewUpdate

SetDeploymentID sets the "deployment_id" field.

func (*ReviewUpdate) SetNillableComment

func (ru *ReviewUpdate) SetNillableComment(s *string) *ReviewUpdate

SetNillableComment sets the "comment" field if the given value is not nil.

func (*ReviewUpdate) SetNillableCreatedAt

func (ru *ReviewUpdate) SetNillableCreatedAt(t *time.Time) *ReviewUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ReviewUpdate) SetNillableStatus

func (ru *ReviewUpdate) SetNillableStatus(r *review.Status) *ReviewUpdate

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ReviewUpdate) SetNillableUserID

func (ru *ReviewUpdate) SetNillableUserID(i *int64) *ReviewUpdate

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*ReviewUpdate) SetStatus

func (ru *ReviewUpdate) SetStatus(r review.Status) *ReviewUpdate

SetStatus sets the "status" field.

func (*ReviewUpdate) SetUpdatedAt

func (ru *ReviewUpdate) SetUpdatedAt(t time.Time) *ReviewUpdate

SetUpdatedAt sets the "updated_at" field.

func (*ReviewUpdate) SetUser

func (ru *ReviewUpdate) SetUser(u *User) *ReviewUpdate

SetUser sets the "user" edge to the User entity.

func (*ReviewUpdate) SetUserID

func (ru *ReviewUpdate) SetUserID(i int64) *ReviewUpdate

SetUserID sets the "user_id" field.

func (*ReviewUpdate) Where

func (ru *ReviewUpdate) Where(ps ...predicate.Review) *ReviewUpdate

Where appends a list predicates to the ReviewUpdate builder.

type ReviewUpdateOne

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

ReviewUpdateOne is the builder for updating a single Review entity.

func (*ReviewUpdateOne) AddEvent

func (ruo *ReviewUpdateOne) AddEvent(e ...*Event) *ReviewUpdateOne

AddEvent adds the "event" edges to the Event entity.

func (*ReviewUpdateOne) AddEventIDs

func (ruo *ReviewUpdateOne) AddEventIDs(ids ...int) *ReviewUpdateOne

AddEventIDs adds the "event" edge to the Event entity by IDs.

func (*ReviewUpdateOne) ClearComment

func (ruo *ReviewUpdateOne) ClearComment() *ReviewUpdateOne

ClearComment clears the value of the "comment" field.

func (*ReviewUpdateOne) ClearDeployment

func (ruo *ReviewUpdateOne) ClearDeployment() *ReviewUpdateOne

ClearDeployment clears the "deployment" edge to the Deployment entity.

func (*ReviewUpdateOne) ClearEvent

func (ruo *ReviewUpdateOne) ClearEvent() *ReviewUpdateOne

ClearEvent clears all "event" edges to the Event entity.

func (*ReviewUpdateOne) ClearUser

func (ruo *ReviewUpdateOne) ClearUser() *ReviewUpdateOne

ClearUser clears the "user" edge to the User entity.

func (*ReviewUpdateOne) ClearUserID

func (ruo *ReviewUpdateOne) ClearUserID() *ReviewUpdateOne

ClearUserID clears the value of the "user_id" field.

func (*ReviewUpdateOne) Exec

func (ruo *ReviewUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ReviewUpdateOne) ExecX

func (ruo *ReviewUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*ReviewUpdateOne) Mutation

func (ruo *ReviewUpdateOne) Mutation() *ReviewMutation

Mutation returns the ReviewMutation object of the builder.

func (*ReviewUpdateOne) RemoveEvent

func (ruo *ReviewUpdateOne) RemoveEvent(e ...*Event) *ReviewUpdateOne

RemoveEvent removes "event" edges to Event entities.

func (*ReviewUpdateOne) RemoveEventIDs

func (ruo *ReviewUpdateOne) RemoveEventIDs(ids ...int) *ReviewUpdateOne

RemoveEventIDs removes the "event" edge to Event entities by IDs.

func (*ReviewUpdateOne) Save

func (ruo *ReviewUpdateOne) Save(ctx context.Context) (*Review, error)

Save executes the query and returns the updated Review entity.

func (*ReviewUpdateOne) SaveX

func (ruo *ReviewUpdateOne) SaveX(ctx context.Context) *Review

SaveX is like Save, but panics if an error occurs.

func (*ReviewUpdateOne) Select

func (ruo *ReviewUpdateOne) Select(field string, fields ...string) *ReviewUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*ReviewUpdateOne) SetComment

func (ruo *ReviewUpdateOne) SetComment(s string) *ReviewUpdateOne

SetComment sets the "comment" field.

func (*ReviewUpdateOne) SetCreatedAt

func (ruo *ReviewUpdateOne) SetCreatedAt(t time.Time) *ReviewUpdateOne

SetCreatedAt sets the "created_at" field.

func (*ReviewUpdateOne) SetDeployment

func (ruo *ReviewUpdateOne) SetDeployment(d *Deployment) *ReviewUpdateOne

SetDeployment sets the "deployment" edge to the Deployment entity.

func (*ReviewUpdateOne) SetDeploymentID

func (ruo *ReviewUpdateOne) SetDeploymentID(i int) *ReviewUpdateOne

SetDeploymentID sets the "deployment_id" field.

func (*ReviewUpdateOne) SetNillableComment

func (ruo *ReviewUpdateOne) SetNillableComment(s *string) *ReviewUpdateOne

SetNillableComment sets the "comment" field if the given value is not nil.

func (*ReviewUpdateOne) SetNillableCreatedAt

func (ruo *ReviewUpdateOne) SetNillableCreatedAt(t *time.Time) *ReviewUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*ReviewUpdateOne) SetNillableStatus

func (ruo *ReviewUpdateOne) SetNillableStatus(r *review.Status) *ReviewUpdateOne

SetNillableStatus sets the "status" field if the given value is not nil.

func (*ReviewUpdateOne) SetNillableUserID

func (ruo *ReviewUpdateOne) SetNillableUserID(i *int64) *ReviewUpdateOne

SetNillableUserID sets the "user_id" field if the given value is not nil.

func (*ReviewUpdateOne) SetStatus

func (ruo *ReviewUpdateOne) SetStatus(r review.Status) *ReviewUpdateOne

SetStatus sets the "status" field.

func (*ReviewUpdateOne) SetUpdatedAt

func (ruo *ReviewUpdateOne) SetUpdatedAt(t time.Time) *ReviewUpdateOne

SetUpdatedAt sets the "updated_at" field.

func (*ReviewUpdateOne) SetUser

func (ruo *ReviewUpdateOne) SetUser(u *User) *ReviewUpdateOne

SetUser sets the "user" edge to the User entity.

func (*ReviewUpdateOne) SetUserID

func (ruo *ReviewUpdateOne) SetUserID(i int64) *ReviewUpdateOne

SetUserID sets the "user_id" field.

type Reviews

type Reviews []*Review

Reviews is a parsable slice of Review.

type RollbackFunc

type RollbackFunc func(context.Context, *Tx) error

The RollbackFunc type is an adapter to allow the use of ordinary function as a Rollbacker. If f is a function with the appropriate signature, RollbackFunc(f) is a Rollbacker that calls f.

func (RollbackFunc) Rollback

func (f RollbackFunc) Rollback(ctx context.Context, tx *Tx) error

Rollback calls f(ctx, m).

type RollbackHook

type RollbackHook func(Rollbacker) Rollbacker

RollbackHook defines the "rollback middleware". A function that gets a Rollbacker and returns a Rollbacker. For example:

hook := func(next ent.Rollbacker) ent.Rollbacker {
	return ent.RollbackFunc(func(ctx context.Context, tx *ent.Tx) error {
		// Do some stuff before.
		if err := next.Rollback(ctx, tx); err != nil {
			return err
		}
		// Do some stuff after.
		return nil
	})
}

type Rollbacker

type Rollbacker interface {
	Rollback(context.Context, *Tx) error
}

Rollbacker is the interface that wraps the Rollback method.

type Tx

type Tx struct {

	// ChatUser is the client for interacting with the ChatUser builders.
	ChatUser *ChatUserClient
	// Deployment is the client for interacting with the Deployment builders.
	Deployment *DeploymentClient
	// DeploymentStatistics is the client for interacting with the DeploymentStatistics builders.
	DeploymentStatistics *DeploymentStatisticsClient
	// DeploymentStatus is the client for interacting with the DeploymentStatus builders.
	DeploymentStatus *DeploymentStatusClient
	// Event is the client for interacting with the Event builders.
	Event *EventClient
	// Lock is the client for interacting with the Lock builders.
	Lock *LockClient
	// NotificationRecord is the client for interacting with the NotificationRecord builders.
	NotificationRecord *NotificationRecordClient
	// Perm is the client for interacting with the Perm builders.
	Perm *PermClient
	// Repo is the client for interacting with the Repo builders.
	Repo *RepoClient
	// Review is the client for interacting with the Review builders.
	Review *ReviewClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// contains filtered or unexported fields
}

Tx is a transactional client that is created by calling Client.Tx().

func TxFromContext

func TxFromContext(ctx context.Context) *Tx

TxFromContext returns a Tx stored inside a context, or nil if there isn't one.

func (*Tx) Client

func (tx *Tx) Client() *Client

Client returns a Client that binds to current transaction.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit commits the transaction.

func (*Tx) GetDriverDialect

func (tx *Tx) GetDriverDialect() string

func (*Tx) OnCommit

func (tx *Tx) OnCommit(f CommitHook)

OnCommit adds a hook to call on commit.

func (*Tx) OnRollback

func (tx *Tx) OnRollback(f RollbackHook)

OnRollback adds a hook to call on rollback.

func (*Tx) Rollback

func (tx *Tx) Rollback() error

Rollback rollbacks the transaction.

type User

type User struct {

	// ID of the ent.
	ID int64 `json:"id,omitempty"`
	// Login holds the value of the "login" field.
	Login string `json:"login"`
	// Avatar holds the value of the "avatar" field.
	Avatar string `json:"avatar"`
	// Admin holds the value of the "admin" field.
	Admin bool `json:"admin"`
	// Token holds the value of the "token" field.
	Token string `json:"-"`
	// Refresh holds the value of the "refresh" field.
	Refresh string `json:"-"`
	// Expiry holds the value of the "expiry" field.
	Expiry time.Time `json:"expiry"`
	// Hash holds the value of the "hash" field.
	Hash string `json:"-"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt time.Time `json:"created_at"`
	// UpdatedAt holds the value of the "updated_at" field.
	UpdatedAt time.Time `json:"updated_at"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the UserQuery when eager-loading is set.
	Edges UserEdges `json:"edges"`
	// contains filtered or unexported fields
}

User is the model entity for the User schema.

func (*User) QueryChatUser

func (u *User) QueryChatUser() *ChatUserQuery

QueryChatUser queries the "chat_user" edge of the User entity.

func (*User) QueryDeployments

func (u *User) QueryDeployments() *DeploymentQuery

QueryDeployments queries the "deployments" edge of the User entity.

func (*User) QueryLocks

func (u *User) QueryLocks() *LockQuery

QueryLocks queries the "locks" edge of the User entity.

func (*User) QueryPerms

func (u *User) QueryPerms() *PermQuery

QueryPerms queries the "perms" edge of the User entity.

func (*User) QueryRepos

func (u *User) QueryRepos() *RepoQuery

QueryRepos queries the "repos" edge of the User entity.

func (*User) QueryReviews

func (u *User) QueryReviews() *ReviewQuery

QueryReviews queries the "reviews" edge of the User entity.

func (*User) String

func (u *User) String() string

String implements the fmt.Stringer.

func (*User) Unwrap

func (u *User) Unwrap() *User

Unwrap unwraps the User entity that was returned from a transaction after it was closed, so that all future queries will be executed through the driver which created the transaction.

func (*User) Update

func (u *User) Update() *UserUpdateOne

Update returns a builder for updating this User. Note that you need to call User.Unwrap() before calling this method if this User was returned from a transaction, and the transaction was committed or rolled back.

type UserClient

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

UserClient is a client for the User schema.

func NewUserClient

func NewUserClient(c config) *UserClient

NewUserClient returns a client for the User from the given config.

func (*UserClient) Create

func (c *UserClient) Create() *UserCreate

Create returns a create builder for User.

func (*UserClient) CreateBulk

func (c *UserClient) CreateBulk(builders ...*UserCreate) *UserCreateBulk

CreateBulk returns a builder for creating a bulk of User entities.

func (*UserClient) Delete

func (c *UserClient) Delete() *UserDelete

Delete returns a delete builder for User.

func (*UserClient) DeleteOne

func (c *UserClient) DeleteOne(u *User) *UserDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*UserClient) DeleteOneID

func (c *UserClient) DeleteOneID(id int64) *UserDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id int64) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id int64) *User

GetX is like Get, but panics if an error occurs.

func (*UserClient) Hooks

func (c *UserClient) Hooks() []Hook

Hooks returns the client hooks.

func (*UserClient) Query

func (c *UserClient) Query() *UserQuery

Query returns a query builder for User.

func (*UserClient) QueryChatUser

func (c *UserClient) QueryChatUser(u *User) *ChatUserQuery

QueryChatUser queries the chat_user edge of a User.

func (*UserClient) QueryDeployments

func (c *UserClient) QueryDeployments(u *User) *DeploymentQuery

QueryDeployments queries the deployments edge of a User.

func (*UserClient) QueryLocks

func (c *UserClient) QueryLocks(u *User) *LockQuery

QueryLocks queries the locks edge of a User.

func (*UserClient) QueryPerms

func (c *UserClient) QueryPerms(u *User) *PermQuery

QueryPerms queries the perms edge of a User.

func (*UserClient) QueryRepos

func (c *UserClient) QueryRepos(u *User) *RepoQuery

QueryRepos queries the repos edge of a User.

func (*UserClient) QueryReviews

func (c *UserClient) QueryReviews(u *User) *ReviewQuery

QueryReviews queries the reviews edge of a User.

func (*UserClient) Update

func (c *UserClient) Update() *UserUpdate

Update returns an update builder for User.

func (*UserClient) UpdateOne

func (c *UserClient) UpdateOne(u *User) *UserUpdateOne

UpdateOne returns an update builder for the given entity.

func (*UserClient) UpdateOneID

func (c *UserClient) UpdateOneID(id int64) *UserUpdateOne

UpdateOneID returns an update builder for the given id.

func (*UserClient) Use

func (c *UserClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `user.Hooks(f(g(h())))`.

type UserCreate

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

UserCreate is the builder for creating a User entity.

func (*UserCreate) AddDeploymentIDs

func (uc *UserCreate) AddDeploymentIDs(ids ...int) *UserCreate

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by IDs.

func (*UserCreate) AddDeployments

func (uc *UserCreate) AddDeployments(d ...*Deployment) *UserCreate

AddDeployments adds the "deployments" edges to the Deployment entity.

func (*UserCreate) AddLockIDs

func (uc *UserCreate) AddLockIDs(ids ...int) *UserCreate

AddLockIDs adds the "locks" edge to the Lock entity by IDs.

func (*UserCreate) AddLocks

func (uc *UserCreate) AddLocks(l ...*Lock) *UserCreate

AddLocks adds the "locks" edges to the Lock entity.

func (*UserCreate) AddPermIDs

func (uc *UserCreate) AddPermIDs(ids ...int) *UserCreate

AddPermIDs adds the "perms" edge to the Perm entity by IDs.

func (*UserCreate) AddPerms

func (uc *UserCreate) AddPerms(p ...*Perm) *UserCreate

AddPerms adds the "perms" edges to the Perm entity.

func (*UserCreate) AddRepoIDs

func (uc *UserCreate) AddRepoIDs(ids ...int64) *UserCreate

AddRepoIDs adds the "repos" edge to the Repo entity by IDs.

func (*UserCreate) AddRepos

func (uc *UserCreate) AddRepos(r ...*Repo) *UserCreate

AddRepos adds the "repos" edges to the Repo entity.

func (*UserCreate) AddReviewIDs

func (uc *UserCreate) AddReviewIDs(ids ...int) *UserCreate

AddReviewIDs adds the "reviews" edge to the Review entity by IDs.

func (*UserCreate) AddReviews

func (uc *UserCreate) AddReviews(r ...*Review) *UserCreate

AddReviews adds the "reviews" edges to the Review entity.

func (*UserCreate) Exec

func (uc *UserCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreate) ExecX

func (uc *UserCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreate) Mutation

func (uc *UserCreate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserCreate) Save

func (uc *UserCreate) Save(ctx context.Context) (*User, error)

Save creates the User in the database.

func (*UserCreate) SaveX

func (uc *UserCreate) SaveX(ctx context.Context) *User

SaveX calls Save and panics if Save returns an error.

func (*UserCreate) SetAdmin

func (uc *UserCreate) SetAdmin(b bool) *UserCreate

SetAdmin sets the "admin" field.

func (*UserCreate) SetAvatar

func (uc *UserCreate) SetAvatar(s string) *UserCreate

SetAvatar sets the "avatar" field.

func (*UserCreate) SetChatUser

func (uc *UserCreate) SetChatUser(c *ChatUser) *UserCreate

SetChatUser sets the "chat_user" edge to the ChatUser entity.

func (*UserCreate) SetChatUserID

func (uc *UserCreate) SetChatUserID(id string) *UserCreate

SetChatUserID sets the "chat_user" edge to the ChatUser entity by ID.

func (*UserCreate) SetCreatedAt

func (uc *UserCreate) SetCreatedAt(t time.Time) *UserCreate

SetCreatedAt sets the "created_at" field.

func (*UserCreate) SetExpiry

func (uc *UserCreate) SetExpiry(t time.Time) *UserCreate

SetExpiry sets the "expiry" field.

func (*UserCreate) SetHash

func (uc *UserCreate) SetHash(s string) *UserCreate

SetHash sets the "hash" field.

func (*UserCreate) SetID

func (uc *UserCreate) SetID(i int64) *UserCreate

SetID sets the "id" field.

func (*UserCreate) SetLogin

func (uc *UserCreate) SetLogin(s string) *UserCreate

SetLogin sets the "login" field.

func (*UserCreate) SetNillableAdmin

func (uc *UserCreate) SetNillableAdmin(b *bool) *UserCreate

SetNillableAdmin sets the "admin" field if the given value is not nil.

func (*UserCreate) SetNillableChatUserID

func (uc *UserCreate) SetNillableChatUserID(id *string) *UserCreate

SetNillableChatUserID sets the "chat_user" edge to the ChatUser entity by ID if the given value is not nil.

func (*UserCreate) SetNillableCreatedAt

func (uc *UserCreate) SetNillableCreatedAt(t *time.Time) *UserCreate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserCreate) SetNillableHash

func (uc *UserCreate) SetNillableHash(s *string) *UserCreate

SetNillableHash sets the "hash" field if the given value is not nil.

func (*UserCreate) SetNillableUpdatedAt

func (uc *UserCreate) SetNillableUpdatedAt(t *time.Time) *UserCreate

SetNillableUpdatedAt sets the "updated_at" field if the given value is not nil.

func (*UserCreate) SetRefresh

func (uc *UserCreate) SetRefresh(s string) *UserCreate

SetRefresh sets the "refresh" field.

func (*UserCreate) SetToken

func (uc *UserCreate) SetToken(s string) *UserCreate

SetToken sets the "token" field.

func (*UserCreate) SetUpdatedAt

func (uc *UserCreate) SetUpdatedAt(t time.Time) *UserCreate

SetUpdatedAt sets the "updated_at" field.

type UserCreateBulk

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

UserCreateBulk is the builder for creating many User entities in bulk.

func (*UserCreateBulk) Exec

func (ucb *UserCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserCreateBulk) ExecX

func (ucb *UserCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserCreateBulk) Save

func (ucb *UserCreateBulk) Save(ctx context.Context) ([]*User, error)

Save creates the User entities in the database.

func (*UserCreateBulk) SaveX

func (ucb *UserCreateBulk) SaveX(ctx context.Context) []*User

SaveX is like Save, but panics if an error occurs.

type UserDelete

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

UserDelete is the builder for deleting a User entity.

func (*UserDelete) Exec

func (ud *UserDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*UserDelete) ExecX

func (ud *UserDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*UserDelete) Where

func (ud *UserDelete) Where(ps ...predicate.User) *UserDelete

Where appends a list predicates to the UserDelete builder.

type UserDeleteOne

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

UserDeleteOne is the builder for deleting a single User entity.

func (*UserDeleteOne) Exec

func (udo *UserDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*UserDeleteOne) ExecX

func (udo *UserDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type UserEdges

type UserEdges struct {
	// ChatUser holds the value of the chat_user edge.
	ChatUser *ChatUser `json:"chat_user,omitempty"`
	// Perms holds the value of the perms edge.
	Perms []*Perm `json:"perms,omitempty"`
	// Deployments holds the value of the deployments edge.
	Deployments []*Deployment `json:"deployments,omitempty"`
	// Reviews holds the value of the reviews edge.
	Reviews []*Review `json:"reviews,omitempty"`
	// Locks holds the value of the locks edge.
	Locks []*Lock `json:"locks,omitempty"`
	// Repos holds the value of the repos edge.
	Repos []*Repo `json:"repos,omitempty"`
	// contains filtered or unexported fields
}

UserEdges holds the relations/edges for other nodes in the graph.

func (UserEdges) ChatUserOrErr

func (e UserEdges) ChatUserOrErr() (*ChatUser, error)

ChatUserOrErr returns the ChatUser value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (UserEdges) DeploymentsOrErr

func (e UserEdges) DeploymentsOrErr() ([]*Deployment, error)

DeploymentsOrErr returns the Deployments value or an error if the edge was not loaded in eager-loading.

func (UserEdges) LocksOrErr

func (e UserEdges) LocksOrErr() ([]*Lock, error)

LocksOrErr returns the Locks value or an error if the edge was not loaded in eager-loading.

func (UserEdges) PermsOrErr

func (e UserEdges) PermsOrErr() ([]*Perm, error)

PermsOrErr returns the Perms value or an error if the edge was not loaded in eager-loading.

func (UserEdges) ReposOrErr

func (e UserEdges) ReposOrErr() ([]*Repo, error)

ReposOrErr returns the Repos value or an error if the edge was not loaded in eager-loading.

func (UserEdges) ReviewsOrErr

func (e UserEdges) ReviewsOrErr() ([]*Review, error)

ReviewsOrErr returns the Reviews value or an error if the edge was not loaded in eager-loading.

type UserGroupBy

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

UserGroupBy is the group-by builder for User entities.

func (*UserGroupBy) Aggregate

func (ugb *UserGroupBy) Aggregate(fns ...AggregateFunc) *UserGroupBy

Aggregate adds the given aggregation functions to the group-by query.

func (*UserGroupBy) Bool

func (ugb *UserGroupBy) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a group-by query. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) BoolX

func (ugb *UserGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserGroupBy) Bools

func (ugb *UserGroupBy) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from group-by. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) BoolsX

func (ugb *UserGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserGroupBy) Float64

func (ugb *UserGroupBy) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a group-by query. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) Float64X

func (ugb *UserGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserGroupBy) Float64s

func (ugb *UserGroupBy) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from group-by. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) Float64sX

func (ugb *UserGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserGroupBy) Int

func (ugb *UserGroupBy) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a group-by query. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) IntX

func (ugb *UserGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserGroupBy) Ints

func (ugb *UserGroupBy) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from group-by. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) IntsX

func (ugb *UserGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserGroupBy) Scan

func (ugb *UserGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*UserGroupBy) ScanX

func (ugb *UserGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*UserGroupBy) String

func (ugb *UserGroupBy) String(ctx context.Context) (_ string, err error)

String returns a single string from a group-by query. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) StringX

func (ugb *UserGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserGroupBy) Strings

func (ugb *UserGroupBy) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from group-by. It is only allowed when executing a group-by query with one field.

func (*UserGroupBy) StringsX

func (ugb *UserGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserMutation

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

UserMutation represents an operation that mutates the User nodes in the graph.

func (*UserMutation) AddDeploymentIDs

func (m *UserMutation) AddDeploymentIDs(ids ...int)

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by ids.

func (*UserMutation) AddField

func (m *UserMutation) AddField(name string, value ent.Value) error

AddField adds the value to the field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) AddLockIDs

func (m *UserMutation) AddLockIDs(ids ...int)

AddLockIDs adds the "locks" edge to the Lock entity by ids.

func (*UserMutation) AddPermIDs

func (m *UserMutation) AddPermIDs(ids ...int)

AddPermIDs adds the "perms" edge to the Perm entity by ids.

func (*UserMutation) AddRepoIDs

func (m *UserMutation) AddRepoIDs(ids ...int64)

AddRepoIDs adds the "repos" edge to the Repo entity by ids.

func (*UserMutation) AddReviewIDs

func (m *UserMutation) AddReviewIDs(ids ...int)

AddReviewIDs adds the "reviews" edge to the Review entity by ids.

func (*UserMutation) AddedEdges

func (m *UserMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*UserMutation) AddedField

func (m *UserMutation) AddedField(name string) (ent.Value, bool)

AddedField returns the numeric value that was incremented/decremented on a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) AddedFields

func (m *UserMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*UserMutation) AddedIDs

func (m *UserMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*UserMutation) Admin

func (m *UserMutation) Admin() (r bool, exists bool)

Admin returns the value of the "admin" field in the mutation.

func (*UserMutation) Avatar

func (m *UserMutation) Avatar() (r string, exists bool)

Avatar returns the value of the "avatar" field in the mutation.

func (*UserMutation) ChatUserCleared

func (m *UserMutation) ChatUserCleared() bool

ChatUserCleared reports if the "chat_user" edge to the ChatUser entity was cleared.

func (*UserMutation) ChatUserID

func (m *UserMutation) ChatUserID() (id string, exists bool)

ChatUserID returns the "chat_user" edge ID in the mutation.

func (*UserMutation) ChatUserIDs

func (m *UserMutation) ChatUserIDs() (ids []string)

ChatUserIDs returns the "chat_user" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use ChatUserID instead. It exists only for internal usage by the builders.

func (*UserMutation) ClearChatUser

func (m *UserMutation) ClearChatUser()

ClearChatUser clears the "chat_user" edge to the ChatUser entity.

func (*UserMutation) ClearDeployments

func (m *UserMutation) ClearDeployments()

ClearDeployments clears the "deployments" edge to the Deployment entity.

func (*UserMutation) ClearEdge

func (m *UserMutation) ClearEdge(name string) error

ClearEdge clears the value of the edge with the given name. It returns an error if that edge is not defined in the schema.

func (*UserMutation) ClearField

func (m *UserMutation) ClearField(name string) error

ClearField clears the value of the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ClearLocks

func (m *UserMutation) ClearLocks()

ClearLocks clears the "locks" edge to the Lock entity.

func (*UserMutation) ClearPerms

func (m *UserMutation) ClearPerms()

ClearPerms clears the "perms" edge to the Perm entity.

func (*UserMutation) ClearRepos

func (m *UserMutation) ClearRepos()

ClearRepos clears the "repos" edge to the Repo entity.

func (*UserMutation) ClearReviews

func (m *UserMutation) ClearReviews()

ClearReviews clears the "reviews" edge to the Review entity.

func (*UserMutation) ClearedEdges

func (m *UserMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*UserMutation) ClearedFields

func (m *UserMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (UserMutation) Client

func (m UserMutation) Client() *Client

Client returns a new `ent.Client` from the mutation. If the mutation was executed in a transaction (ent.Tx), a transactional client is returned.

func (*UserMutation) CreatedAt

func (m *UserMutation) CreatedAt() (r time.Time, exists bool)

CreatedAt returns the value of the "created_at" field in the mutation.

func (*UserMutation) DeploymentsCleared

func (m *UserMutation) DeploymentsCleared() bool

DeploymentsCleared reports if the "deployments" edge to the Deployment entity was cleared.

func (*UserMutation) DeploymentsIDs

func (m *UserMutation) DeploymentsIDs() (ids []int)

DeploymentsIDs returns the "deployments" edge IDs in the mutation.

func (*UserMutation) EdgeCleared

func (m *UserMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*UserMutation) Expiry

func (m *UserMutation) Expiry() (r time.Time, exists bool)

Expiry returns the value of the "expiry" field in the mutation.

func (*UserMutation) Field

func (m *UserMutation) Field(name string) (ent.Value, bool)

Field returns the value of a field with the given name. The second boolean return value indicates that this field was not set, or was not defined in the schema.

func (*UserMutation) FieldCleared

func (m *UserMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*UserMutation) Fields

func (m *UserMutation) Fields() []string

Fields returns all fields that were changed during this mutation. Note that in order to get all numeric fields that were incremented/decremented, call AddedFields().

func (*UserMutation) Hash

func (m *UserMutation) Hash() (r string, exists bool)

Hash returns the value of the "hash" field in the mutation.

func (*UserMutation) ID

func (m *UserMutation) ID() (id int64, exists bool)

ID returns the ID value in the mutation. Note that the ID is only available if it was provided to the builder or after it was returned from the database.

func (*UserMutation) IDs

func (m *UserMutation) IDs(ctx context.Context) ([]int64, error)

IDs queries the database and returns the entity ids that match the mutation's predicate. That means, if the mutation is applied within a transaction with an isolation level such as sql.LevelSerializable, the returned ids match the ids of the rows that will be updated or updated by the mutation.

func (*UserMutation) LocksCleared

func (m *UserMutation) LocksCleared() bool

LocksCleared reports if the "locks" edge to the Lock entity was cleared.

func (*UserMutation) LocksIDs

func (m *UserMutation) LocksIDs() (ids []int)

LocksIDs returns the "locks" edge IDs in the mutation.

func (*UserMutation) Login

func (m *UserMutation) Login() (r string, exists bool)

Login returns the value of the "login" field in the mutation.

func (*UserMutation) OldAdmin

func (m *UserMutation) OldAdmin(ctx context.Context) (v bool, err error)

OldAdmin returns the old "admin" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldAvatar

func (m *UserMutation) OldAvatar(ctx context.Context) (v string, err error)

OldAvatar returns the old "avatar" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldCreatedAt

func (m *UserMutation) OldCreatedAt(ctx context.Context) (v time.Time, err error)

OldCreatedAt returns the old "created_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldExpiry

func (m *UserMutation) OldExpiry(ctx context.Context) (v time.Time, err error)

OldExpiry returns the old "expiry" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldField

func (m *UserMutation) OldField(ctx context.Context, name string) (ent.Value, error)

OldField returns the old value of the field from the database. An error is returned if the mutation operation is not UpdateOne, or the query to the database failed.

func (*UserMutation) OldHash

func (m *UserMutation) OldHash(ctx context.Context) (v string, err error)

OldHash returns the old "hash" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldLogin

func (m *UserMutation) OldLogin(ctx context.Context) (v string, err error)

OldLogin returns the old "login" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldRefresh

func (m *UserMutation) OldRefresh(ctx context.Context) (v string, err error)

OldRefresh returns the old "refresh" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldToken

func (m *UserMutation) OldToken(ctx context.Context) (v string, err error)

OldToken returns the old "token" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) OldUpdatedAt

func (m *UserMutation) OldUpdatedAt(ctx context.Context) (v time.Time, err error)

OldUpdatedAt returns the old "updated_at" field's value of the User entity. If the User object wasn't provided to the builder, the object is fetched from the database. An error is returned if the mutation operation is not UpdateOne, or the database query fails.

func (*UserMutation) Op

func (m *UserMutation) Op() Op

Op returns the operation name.

func (*UserMutation) PermsCleared

func (m *UserMutation) PermsCleared() bool

PermsCleared reports if the "perms" edge to the Perm entity was cleared.

func (*UserMutation) PermsIDs

func (m *UserMutation) PermsIDs() (ids []int)

PermsIDs returns the "perms" edge IDs in the mutation.

func (*UserMutation) Refresh

func (m *UserMutation) Refresh() (r string, exists bool)

Refresh returns the value of the "refresh" field in the mutation.

func (*UserMutation) RemoveDeploymentIDs

func (m *UserMutation) RemoveDeploymentIDs(ids ...int)

RemoveDeploymentIDs removes the "deployments" edge to the Deployment entity by IDs.

func (*UserMutation) RemoveLockIDs

func (m *UserMutation) RemoveLockIDs(ids ...int)

RemoveLockIDs removes the "locks" edge to the Lock entity by IDs.

func (*UserMutation) RemovePermIDs

func (m *UserMutation) RemovePermIDs(ids ...int)

RemovePermIDs removes the "perms" edge to the Perm entity by IDs.

func (*UserMutation) RemoveRepoIDs

func (m *UserMutation) RemoveRepoIDs(ids ...int64)

RemoveRepoIDs removes the "repos" edge to the Repo entity by IDs.

func (*UserMutation) RemoveReviewIDs

func (m *UserMutation) RemoveReviewIDs(ids ...int)

RemoveReviewIDs removes the "reviews" edge to the Review entity by IDs.

func (*UserMutation) RemovedDeploymentsIDs

func (m *UserMutation) RemovedDeploymentsIDs() (ids []int)

RemovedDeployments returns the removed IDs of the "deployments" edge to the Deployment entity.

func (*UserMutation) RemovedEdges

func (m *UserMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*UserMutation) RemovedIDs

func (m *UserMutation) RemovedIDs(name string) []ent.Value

RemovedIDs returns all IDs (to other nodes) that were removed for the edge with the given name in this mutation.

func (*UserMutation) RemovedLocksIDs

func (m *UserMutation) RemovedLocksIDs() (ids []int)

RemovedLocks returns the removed IDs of the "locks" edge to the Lock entity.

func (*UserMutation) RemovedPermsIDs

func (m *UserMutation) RemovedPermsIDs() (ids []int)

RemovedPerms returns the removed IDs of the "perms" edge to the Perm entity.

func (*UserMutation) RemovedReposIDs

func (m *UserMutation) RemovedReposIDs() (ids []int64)

RemovedRepos returns the removed IDs of the "repos" edge to the Repo entity.

func (*UserMutation) RemovedReviewsIDs

func (m *UserMutation) RemovedReviewsIDs() (ids []int)

RemovedReviews returns the removed IDs of the "reviews" edge to the Review entity.

func (*UserMutation) ReposCleared

func (m *UserMutation) ReposCleared() bool

ReposCleared reports if the "repos" edge to the Repo entity was cleared.

func (*UserMutation) ReposIDs

func (m *UserMutation) ReposIDs() (ids []int64)

ReposIDs returns the "repos" edge IDs in the mutation.

func (*UserMutation) ResetAdmin

func (m *UserMutation) ResetAdmin()

ResetAdmin resets all changes to the "admin" field.

func (*UserMutation) ResetAvatar

func (m *UserMutation) ResetAvatar()

ResetAvatar resets all changes to the "avatar" field.

func (*UserMutation) ResetChatUser

func (m *UserMutation) ResetChatUser()

ResetChatUser resets all changes to the "chat_user" edge.

func (*UserMutation) ResetCreatedAt

func (m *UserMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*UserMutation) ResetDeployments

func (m *UserMutation) ResetDeployments()

ResetDeployments resets all changes to the "deployments" edge.

func (*UserMutation) ResetEdge

func (m *UserMutation) ResetEdge(name string) error

ResetEdge resets all changes to the edge with the given name in this mutation. It returns an error if the edge is not defined in the schema.

func (*UserMutation) ResetExpiry

func (m *UserMutation) ResetExpiry()

ResetExpiry resets all changes to the "expiry" field.

func (*UserMutation) ResetField

func (m *UserMutation) ResetField(name string) error

ResetField resets all changes in the mutation for the field with the given name. It returns an error if the field is not defined in the schema.

func (*UserMutation) ResetHash

func (m *UserMutation) ResetHash()

ResetHash resets all changes to the "hash" field.

func (*UserMutation) ResetLocks

func (m *UserMutation) ResetLocks()

ResetLocks resets all changes to the "locks" edge.

func (*UserMutation) ResetLogin

func (m *UserMutation) ResetLogin()

ResetLogin resets all changes to the "login" field.

func (*UserMutation) ResetPerms

func (m *UserMutation) ResetPerms()

ResetPerms resets all changes to the "perms" edge.

func (*UserMutation) ResetRefresh

func (m *UserMutation) ResetRefresh()

ResetRefresh resets all changes to the "refresh" field.

func (*UserMutation) ResetRepos

func (m *UserMutation) ResetRepos()

ResetRepos resets all changes to the "repos" edge.

func (*UserMutation) ResetReviews

func (m *UserMutation) ResetReviews()

ResetReviews resets all changes to the "reviews" edge.

func (*UserMutation) ResetToken

func (m *UserMutation) ResetToken()

ResetToken resets all changes to the "token" field.

func (*UserMutation) ResetUpdatedAt

func (m *UserMutation) ResetUpdatedAt()

ResetUpdatedAt resets all changes to the "updated_at" field.

func (*UserMutation) ReviewsCleared

func (m *UserMutation) ReviewsCleared() bool

ReviewsCleared reports if the "reviews" edge to the Review entity was cleared.

func (*UserMutation) ReviewsIDs

func (m *UserMutation) ReviewsIDs() (ids []int)

ReviewsIDs returns the "reviews" edge IDs in the mutation.

func (*UserMutation) SetAdmin

func (m *UserMutation) SetAdmin(b bool)

SetAdmin sets the "admin" field.

func (*UserMutation) SetAvatar

func (m *UserMutation) SetAvatar(s string)

SetAvatar sets the "avatar" field.

func (*UserMutation) SetChatUserID

func (m *UserMutation) SetChatUserID(id string)

SetChatUserID sets the "chat_user" edge to the ChatUser entity by id.

func (*UserMutation) SetCreatedAt

func (m *UserMutation) SetCreatedAt(t time.Time)

SetCreatedAt sets the "created_at" field.

func (*UserMutation) SetExpiry

func (m *UserMutation) SetExpiry(t time.Time)

SetExpiry sets the "expiry" field.

func (*UserMutation) SetField

func (m *UserMutation) SetField(name string, value ent.Value) error

SetField sets the value of a field with the given name. It returns an error if the field is not defined in the schema, or if the type mismatched the field type.

func (*UserMutation) SetHash

func (m *UserMutation) SetHash(s string)

SetHash sets the "hash" field.

func (*UserMutation) SetID

func (m *UserMutation) SetID(id int64)

SetID sets the value of the id field. Note that this operation is only accepted on creation of User entities.

func (*UserMutation) SetLogin

func (m *UserMutation) SetLogin(s string)

SetLogin sets the "login" field.

func (*UserMutation) SetRefresh

func (m *UserMutation) SetRefresh(s string)

SetRefresh sets the "refresh" field.

func (*UserMutation) SetToken

func (m *UserMutation) SetToken(s string)

SetToken sets the "token" field.

func (*UserMutation) SetUpdatedAt

func (m *UserMutation) SetUpdatedAt(t time.Time)

SetUpdatedAt sets the "updated_at" field.

func (*UserMutation) Token

func (m *UserMutation) Token() (r string, exists bool)

Token returns the value of the "token" field in the mutation.

func (UserMutation) Tx

func (m UserMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*UserMutation) Type

func (m *UserMutation) Type() string

Type returns the node type of this mutation (User).

func (*UserMutation) UpdatedAt

func (m *UserMutation) UpdatedAt() (r time.Time, exists bool)

UpdatedAt returns the value of the "updated_at" field in the mutation.

func (*UserMutation) Where

func (m *UserMutation) Where(ps ...predicate.User)

Where appends a list predicates to the UserMutation builder.

type UserQuery

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

UserQuery is the builder for querying User entities.

func (*UserQuery) All

func (uq *UserQuery) All(ctx context.Context) ([]*User, error)

All executes the query and returns a list of Users.

func (*UserQuery) AllX

func (uq *UserQuery) AllX(ctx context.Context) []*User

AllX is like All, but panics if an error occurs.

func (*UserQuery) Clone

func (uq *UserQuery) Clone() *UserQuery

Clone returns a duplicate of the UserQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*UserQuery) Count

func (uq *UserQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*UserQuery) CountX

func (uq *UserQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*UserQuery) Exist

func (uq *UserQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*UserQuery) ExistX

func (uq *UserQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*UserQuery) First

func (uq *UserQuery) First(ctx context.Context) (*User, error)

First returns the first User entity from the query. Returns a *NotFoundError when no User was found.

func (*UserQuery) FirstID

func (uq *UserQuery) FirstID(ctx context.Context) (id int64, err error)

FirstID returns the first User ID from the query. Returns a *NotFoundError when no User ID was found.

func (*UserQuery) FirstIDX

func (uq *UserQuery) FirstIDX(ctx context.Context) int64

FirstIDX is like FirstID, but panics if an error occurs.

func (*UserQuery) FirstX

func (uq *UserQuery) FirstX(ctx context.Context) *User

FirstX is like First, but panics if an error occurs.

func (*UserQuery) ForShare

func (uq *UserQuery) ForShare(opts ...sql.LockOption) *UserQuery

ForShare behaves similarly to ForUpdate, except that it acquires a shared mode lock on any rows that are read. Other sessions can read the rows, but cannot modify them until your transaction commits.

func (*UserQuery) ForUpdate

func (uq *UserQuery) ForUpdate(opts ...sql.LockOption) *UserQuery

ForUpdate locks the selected rows against concurrent updates, and prevent them from being updated, deleted or "selected ... for update" by other sessions, until the transaction is either committed or rolled-back.

func (*UserQuery) GroupBy

func (uq *UserQuery) GroupBy(field string, fields ...string) *UserGroupBy

GroupBy is used to group vertices by one or more fields/columns. It is often used with aggregate functions, like: count, max, mean, min, sum.

Example:

var v []struct {
	Login string `json:"login"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldLogin).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) ([]int64, error)

IDs executes the query and returns a list of User IDs.

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []int64

IDsX is like IDs, but panics if an error occurs.

func (*UserQuery) Limit

func (uq *UserQuery) Limit(limit int) *UserQuery

Limit adds a limit step to the query.

func (*UserQuery) Offset

func (uq *UserQuery) Offset(offset int) *UserQuery

Offset adds an offset step to the query.

func (*UserQuery) Only

func (uq *UserQuery) Only(ctx context.Context) (*User, error)

Only returns a single User entity found by the query, ensuring it only returns one. Returns a *NotSingularError when more than one User entity is found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id int64, err error)

OnlyID is like Only, but returns the only User ID in the query. Returns a *NotSingularError when more than one User ID is found. Returns a *NotFoundError when no entities are found.

func (*UserQuery) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) int64

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*UserQuery) OnlyX

func (uq *UserQuery) OnlyX(ctx context.Context) *User

OnlyX is like Only, but panics if an error occurs.

func (*UserQuery) Order

func (uq *UserQuery) Order(o ...OrderFunc) *UserQuery

Order adds an order step to the query.

func (*UserQuery) QueryChatUser

func (uq *UserQuery) QueryChatUser() *ChatUserQuery

QueryChatUser chains the current query on the "chat_user" edge.

func (*UserQuery) QueryDeployments

func (uq *UserQuery) QueryDeployments() *DeploymentQuery

QueryDeployments chains the current query on the "deployments" edge.

func (*UserQuery) QueryLocks

func (uq *UserQuery) QueryLocks() *LockQuery

QueryLocks chains the current query on the "locks" edge.

func (*UserQuery) QueryPerms

func (uq *UserQuery) QueryPerms() *PermQuery

QueryPerms chains the current query on the "perms" edge.

func (*UserQuery) QueryRepos

func (uq *UserQuery) QueryRepos() *RepoQuery

QueryRepos chains the current query on the "repos" edge.

func (*UserQuery) QueryReviews

func (uq *UserQuery) QueryReviews() *ReviewQuery

QueryReviews chains the current query on the "reviews" edge.

func (*UserQuery) Select

func (uq *UserQuery) Select(fields ...string) *UserSelect

Select allows the selection one or more fields/columns for the given query, instead of selecting all fields in the entity.

Example:

var v []struct {
	Login string `json:"login"`
}

client.User.Query().
	Select(user.FieldLogin).
	Scan(ctx, &v)

func (*UserQuery) Unique

func (uq *UserQuery) Unique(unique bool) *UserQuery

Unique configures the query builder to filter duplicate records on query. By default, unique is set to true, and can be disabled using this method.

func (*UserQuery) Where

func (uq *UserQuery) Where(ps ...predicate.User) *UserQuery

Where adds a new predicate for the UserQuery builder.

func (*UserQuery) WithChatUser

func (uq *UserQuery) WithChatUser(opts ...func(*ChatUserQuery)) *UserQuery

WithChatUser tells the query-builder to eager-load the nodes that are connected to the "chat_user" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithDeployments

func (uq *UserQuery) WithDeployments(opts ...func(*DeploymentQuery)) *UserQuery

WithDeployments tells the query-builder to eager-load the nodes that are connected to the "deployments" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithLocks

func (uq *UserQuery) WithLocks(opts ...func(*LockQuery)) *UserQuery

WithLocks tells the query-builder to eager-load the nodes that are connected to the "locks" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithPerms

func (uq *UserQuery) WithPerms(opts ...func(*PermQuery)) *UserQuery

WithPerms tells the query-builder to eager-load the nodes that are connected to the "perms" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithRepos

func (uq *UserQuery) WithRepos(opts ...func(*RepoQuery)) *UserQuery

WithRepos tells the query-builder to eager-load the nodes that are connected to the "repos" edge. The optional arguments are used to configure the query builder of the edge.

func (*UserQuery) WithReviews

func (uq *UserQuery) WithReviews(opts ...func(*ReviewQuery)) *UserQuery

WithReviews tells the query-builder to eager-load the nodes that are connected to the "reviews" edge. The optional arguments are used to configure the query builder of the edge.

type UserSelect

type UserSelect struct {
	*UserQuery
	// contains filtered or unexported fields
}

UserSelect is the builder for selecting fields of User entities.

func (*UserSelect) Bool

func (us *UserSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolX

func (us *UserSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*UserSelect) Bools

func (us *UserSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*UserSelect) BoolsX

func (us *UserSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*UserSelect) Float64

func (us *UserSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64X

func (us *UserSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*UserSelect) Float64s

func (us *UserSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*UserSelect) Float64sX

func (us *UserSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*UserSelect) Int

func (us *UserSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntX

func (us *UserSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*UserSelect) Ints

func (us *UserSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*UserSelect) IntsX

func (us *UserSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*UserSelect) Scan

func (us *UserSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*UserSelect) ScanX

func (us *UserSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*UserSelect) String

func (us *UserSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringX

func (us *UserSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*UserSelect) Strings

func (us *UserSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*UserSelect) StringsX

func (us *UserSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type UserUpdate

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

UserUpdate is the builder for updating User entities.

func (*UserUpdate) AddDeploymentIDs

func (uu *UserUpdate) AddDeploymentIDs(ids ...int) *UserUpdate

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by IDs.

func (*UserUpdate) AddDeployments

func (uu *UserUpdate) AddDeployments(d ...*Deployment) *UserUpdate

AddDeployments adds the "deployments" edges to the Deployment entity.

func (*UserUpdate) AddLockIDs

func (uu *UserUpdate) AddLockIDs(ids ...int) *UserUpdate

AddLockIDs adds the "locks" edge to the Lock entity by IDs.

func (*UserUpdate) AddLocks

func (uu *UserUpdate) AddLocks(l ...*Lock) *UserUpdate

AddLocks adds the "locks" edges to the Lock entity.

func (*UserUpdate) AddPermIDs

func (uu *UserUpdate) AddPermIDs(ids ...int) *UserUpdate

AddPermIDs adds the "perms" edge to the Perm entity by IDs.

func (*UserUpdate) AddPerms

func (uu *UserUpdate) AddPerms(p ...*Perm) *UserUpdate

AddPerms adds the "perms" edges to the Perm entity.

func (*UserUpdate) AddRepoIDs

func (uu *UserUpdate) AddRepoIDs(ids ...int64) *UserUpdate

AddRepoIDs adds the "repos" edge to the Repo entity by IDs.

func (*UserUpdate) AddRepos

func (uu *UserUpdate) AddRepos(r ...*Repo) *UserUpdate

AddRepos adds the "repos" edges to the Repo entity.

func (*UserUpdate) AddReviewIDs

func (uu *UserUpdate) AddReviewIDs(ids ...int) *UserUpdate

AddReviewIDs adds the "reviews" edge to the Review entity by IDs.

func (*UserUpdate) AddReviews

func (uu *UserUpdate) AddReviews(r ...*Review) *UserUpdate

AddReviews adds the "reviews" edges to the Review entity.

func (*UserUpdate) ClearChatUser

func (uu *UserUpdate) ClearChatUser() *UserUpdate

ClearChatUser clears the "chat_user" edge to the ChatUser entity.

func (*UserUpdate) ClearDeployments

func (uu *UserUpdate) ClearDeployments() *UserUpdate

ClearDeployments clears all "deployments" edges to the Deployment entity.

func (*UserUpdate) ClearLocks

func (uu *UserUpdate) ClearLocks() *UserUpdate

ClearLocks clears all "locks" edges to the Lock entity.

func (*UserUpdate) ClearPerms

func (uu *UserUpdate) ClearPerms() *UserUpdate

ClearPerms clears all "perms" edges to the Perm entity.

func (*UserUpdate) ClearRepos

func (uu *UserUpdate) ClearRepos() *UserUpdate

ClearRepos clears all "repos" edges to the Repo entity.

func (*UserUpdate) ClearReviews

func (uu *UserUpdate) ClearReviews() *UserUpdate

ClearReviews clears all "reviews" edges to the Review entity.

func (*UserUpdate) Exec

func (uu *UserUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpdate) ExecX

func (uu *UserUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdate) Mutation

func (uu *UserUpdate) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdate) RemoveDeploymentIDs

func (uu *UserUpdate) RemoveDeploymentIDs(ids ...int) *UserUpdate

RemoveDeploymentIDs removes the "deployments" edge to Deployment entities by IDs.

func (*UserUpdate) RemoveDeployments

func (uu *UserUpdate) RemoveDeployments(d ...*Deployment) *UserUpdate

RemoveDeployments removes "deployments" edges to Deployment entities.

func (*UserUpdate) RemoveLockIDs

func (uu *UserUpdate) RemoveLockIDs(ids ...int) *UserUpdate

RemoveLockIDs removes the "locks" edge to Lock entities by IDs.

func (*UserUpdate) RemoveLocks

func (uu *UserUpdate) RemoveLocks(l ...*Lock) *UserUpdate

RemoveLocks removes "locks" edges to Lock entities.

func (*UserUpdate) RemovePermIDs

func (uu *UserUpdate) RemovePermIDs(ids ...int) *UserUpdate

RemovePermIDs removes the "perms" edge to Perm entities by IDs.

func (*UserUpdate) RemovePerms

func (uu *UserUpdate) RemovePerms(p ...*Perm) *UserUpdate

RemovePerms removes "perms" edges to Perm entities.

func (*UserUpdate) RemoveRepoIDs

func (uu *UserUpdate) RemoveRepoIDs(ids ...int64) *UserUpdate

RemoveRepoIDs removes the "repos" edge to Repo entities by IDs.

func (*UserUpdate) RemoveRepos

func (uu *UserUpdate) RemoveRepos(r ...*Repo) *UserUpdate

RemoveRepos removes "repos" edges to Repo entities.

func (*UserUpdate) RemoveReviewIDs

func (uu *UserUpdate) RemoveReviewIDs(ids ...int) *UserUpdate

RemoveReviewIDs removes the "reviews" edge to Review entities by IDs.

func (*UserUpdate) RemoveReviews

func (uu *UserUpdate) RemoveReviews(r ...*Review) *UserUpdate

RemoveReviews removes "reviews" edges to Review entities.

func (*UserUpdate) Save

func (uu *UserUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*UserUpdate) SaveX

func (uu *UserUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*UserUpdate) SetAdmin

func (uu *UserUpdate) SetAdmin(b bool) *UserUpdate

SetAdmin sets the "admin" field.

func (*UserUpdate) SetAvatar

func (uu *UserUpdate) SetAvatar(s string) *UserUpdate

SetAvatar sets the "avatar" field.

func (*UserUpdate) SetChatUser

func (uu *UserUpdate) SetChatUser(c *ChatUser) *UserUpdate

SetChatUser sets the "chat_user" edge to the ChatUser entity.

func (*UserUpdate) SetChatUserID

func (uu *UserUpdate) SetChatUserID(id string) *UserUpdate

SetChatUserID sets the "chat_user" edge to the ChatUser entity by ID.

func (*UserUpdate) SetCreatedAt

func (uu *UserUpdate) SetCreatedAt(t time.Time) *UserUpdate

SetCreatedAt sets the "created_at" field.

func (*UserUpdate) SetExpiry

func (uu *UserUpdate) SetExpiry(t time.Time) *UserUpdate

SetExpiry sets the "expiry" field.

func (*UserUpdate) SetLogin

func (uu *UserUpdate) SetLogin(s string) *UserUpdate

SetLogin sets the "login" field.

func (*UserUpdate) SetNillableAdmin

func (uu *UserUpdate) SetNillableAdmin(b *bool) *UserUpdate

SetNillableAdmin sets the "admin" field if the given value is not nil.

func (*UserUpdate) SetNillableChatUserID

func (uu *UserUpdate) SetNillableChatUserID(id *string) *UserUpdate

SetNillableChatUserID sets the "chat_user" edge to the ChatUser entity by ID if the given value is not nil.

func (*UserUpdate) SetNillableCreatedAt

func (uu *UserUpdate) SetNillableCreatedAt(t *time.Time) *UserUpdate

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserUpdate) SetRefresh

func (uu *UserUpdate) SetRefresh(s string) *UserUpdate

SetRefresh sets the "refresh" field.

func (*UserUpdate) SetToken

func (uu *UserUpdate) SetToken(s string) *UserUpdate

SetToken sets the "token" field.

func (*UserUpdate) SetUpdatedAt

func (uu *UserUpdate) SetUpdatedAt(t time.Time) *UserUpdate

SetUpdatedAt sets the "updated_at" field.

func (*UserUpdate) Where

func (uu *UserUpdate) Where(ps ...predicate.User) *UserUpdate

Where appends a list predicates to the UserUpdate builder.

type UserUpdateOne

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

UserUpdateOne is the builder for updating a single User entity.

func (*UserUpdateOne) AddDeploymentIDs

func (uuo *UserUpdateOne) AddDeploymentIDs(ids ...int) *UserUpdateOne

AddDeploymentIDs adds the "deployments" edge to the Deployment entity by IDs.

func (*UserUpdateOne) AddDeployments

func (uuo *UserUpdateOne) AddDeployments(d ...*Deployment) *UserUpdateOne

AddDeployments adds the "deployments" edges to the Deployment entity.

func (*UserUpdateOne) AddLockIDs

func (uuo *UserUpdateOne) AddLockIDs(ids ...int) *UserUpdateOne

AddLockIDs adds the "locks" edge to the Lock entity by IDs.

func (*UserUpdateOne) AddLocks

func (uuo *UserUpdateOne) AddLocks(l ...*Lock) *UserUpdateOne

AddLocks adds the "locks" edges to the Lock entity.

func (*UserUpdateOne) AddPermIDs

func (uuo *UserUpdateOne) AddPermIDs(ids ...int) *UserUpdateOne

AddPermIDs adds the "perms" edge to the Perm entity by IDs.

func (*UserUpdateOne) AddPerms

func (uuo *UserUpdateOne) AddPerms(p ...*Perm) *UserUpdateOne

AddPerms adds the "perms" edges to the Perm entity.

func (*UserUpdateOne) AddRepoIDs

func (uuo *UserUpdateOne) AddRepoIDs(ids ...int64) *UserUpdateOne

AddRepoIDs adds the "repos" edge to the Repo entity by IDs.

func (*UserUpdateOne) AddRepos

func (uuo *UserUpdateOne) AddRepos(r ...*Repo) *UserUpdateOne

AddRepos adds the "repos" edges to the Repo entity.

func (*UserUpdateOne) AddReviewIDs

func (uuo *UserUpdateOne) AddReviewIDs(ids ...int) *UserUpdateOne

AddReviewIDs adds the "reviews" edge to the Review entity by IDs.

func (*UserUpdateOne) AddReviews

func (uuo *UserUpdateOne) AddReviews(r ...*Review) *UserUpdateOne

AddReviews adds the "reviews" edges to the Review entity.

func (*UserUpdateOne) ClearChatUser

func (uuo *UserUpdateOne) ClearChatUser() *UserUpdateOne

ClearChatUser clears the "chat_user" edge to the ChatUser entity.

func (*UserUpdateOne) ClearDeployments

func (uuo *UserUpdateOne) ClearDeployments() *UserUpdateOne

ClearDeployments clears all "deployments" edges to the Deployment entity.

func (*UserUpdateOne) ClearLocks

func (uuo *UserUpdateOne) ClearLocks() *UserUpdateOne

ClearLocks clears all "locks" edges to the Lock entity.

func (*UserUpdateOne) ClearPerms

func (uuo *UserUpdateOne) ClearPerms() *UserUpdateOne

ClearPerms clears all "perms" edges to the Perm entity.

func (*UserUpdateOne) ClearRepos

func (uuo *UserUpdateOne) ClearRepos() *UserUpdateOne

ClearRepos clears all "repos" edges to the Repo entity.

func (*UserUpdateOne) ClearReviews

func (uuo *UserUpdateOne) ClearReviews() *UserUpdateOne

ClearReviews clears all "reviews" edges to the Review entity.

func (*UserUpdateOne) Exec

func (uuo *UserUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*UserUpdateOne) ExecX

func (uuo *UserUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*UserUpdateOne) Mutation

func (uuo *UserUpdateOne) Mutation() *UserMutation

Mutation returns the UserMutation object of the builder.

func (*UserUpdateOne) RemoveDeploymentIDs

func (uuo *UserUpdateOne) RemoveDeploymentIDs(ids ...int) *UserUpdateOne

RemoveDeploymentIDs removes the "deployments" edge to Deployment entities by IDs.

func (*UserUpdateOne) RemoveDeployments

func (uuo *UserUpdateOne) RemoveDeployments(d ...*Deployment) *UserUpdateOne

RemoveDeployments removes "deployments" edges to Deployment entities.

func (*UserUpdateOne) RemoveLockIDs

func (uuo *UserUpdateOne) RemoveLockIDs(ids ...int) *UserUpdateOne

RemoveLockIDs removes the "locks" edge to Lock entities by IDs.

func (*UserUpdateOne) RemoveLocks

func (uuo *UserUpdateOne) RemoveLocks(l ...*Lock) *UserUpdateOne

RemoveLocks removes "locks" edges to Lock entities.

func (*UserUpdateOne) RemovePermIDs

func (uuo *UserUpdateOne) RemovePermIDs(ids ...int) *UserUpdateOne

RemovePermIDs removes the "perms" edge to Perm entities by IDs.

func (*UserUpdateOne) RemovePerms

func (uuo *UserUpdateOne) RemovePerms(p ...*Perm) *UserUpdateOne

RemovePerms removes "perms" edges to Perm entities.

func (*UserUpdateOne) RemoveRepoIDs

func (uuo *UserUpdateOne) RemoveRepoIDs(ids ...int64) *UserUpdateOne

RemoveRepoIDs removes the "repos" edge to Repo entities by IDs.

func (*UserUpdateOne) RemoveRepos

func (uuo *UserUpdateOne) RemoveRepos(r ...*Repo) *UserUpdateOne

RemoveRepos removes "repos" edges to Repo entities.

func (*UserUpdateOne) RemoveReviewIDs

func (uuo *UserUpdateOne) RemoveReviewIDs(ids ...int) *UserUpdateOne

RemoveReviewIDs removes the "reviews" edge to Review entities by IDs.

func (*UserUpdateOne) RemoveReviews

func (uuo *UserUpdateOne) RemoveReviews(r ...*Review) *UserUpdateOne

RemoveReviews removes "reviews" edges to Review entities.

func (*UserUpdateOne) Save

func (uuo *UserUpdateOne) Save(ctx context.Context) (*User, error)

Save executes the query and returns the updated User entity.

func (*UserUpdateOne) SaveX

func (uuo *UserUpdateOne) SaveX(ctx context.Context) *User

SaveX is like Save, but panics if an error occurs.

func (*UserUpdateOne) Select

func (uuo *UserUpdateOne) Select(field string, fields ...string) *UserUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*UserUpdateOne) SetAdmin

func (uuo *UserUpdateOne) SetAdmin(b bool) *UserUpdateOne

SetAdmin sets the "admin" field.

func (*UserUpdateOne) SetAvatar

func (uuo *UserUpdateOne) SetAvatar(s string) *UserUpdateOne

SetAvatar sets the "avatar" field.

func (*UserUpdateOne) SetChatUser

func (uuo *UserUpdateOne) SetChatUser(c *ChatUser) *UserUpdateOne

SetChatUser sets the "chat_user" edge to the ChatUser entity.

func (*UserUpdateOne) SetChatUserID

func (uuo *UserUpdateOne) SetChatUserID(id string) *UserUpdateOne

SetChatUserID sets the "chat_user" edge to the ChatUser entity by ID.

func (*UserUpdateOne) SetCreatedAt

func (uuo *UserUpdateOne) SetCreatedAt(t time.Time) *UserUpdateOne

SetCreatedAt sets the "created_at" field.

func (*UserUpdateOne) SetExpiry

func (uuo *UserUpdateOne) SetExpiry(t time.Time) *UserUpdateOne

SetExpiry sets the "expiry" field.

func (*UserUpdateOne) SetLogin

func (uuo *UserUpdateOne) SetLogin(s string) *UserUpdateOne

SetLogin sets the "login" field.

func (*UserUpdateOne) SetNillableAdmin

func (uuo *UserUpdateOne) SetNillableAdmin(b *bool) *UserUpdateOne

SetNillableAdmin sets the "admin" field if the given value is not nil.

func (*UserUpdateOne) SetNillableChatUserID

func (uuo *UserUpdateOne) SetNillableChatUserID(id *string) *UserUpdateOne

SetNillableChatUserID sets the "chat_user" edge to the ChatUser entity by ID if the given value is not nil.

func (*UserUpdateOne) SetNillableCreatedAt

func (uuo *UserUpdateOne) SetNillableCreatedAt(t *time.Time) *UserUpdateOne

SetNillableCreatedAt sets the "created_at" field if the given value is not nil.

func (*UserUpdateOne) SetRefresh

func (uuo *UserUpdateOne) SetRefresh(s string) *UserUpdateOne

SetRefresh sets the "refresh" field.

func (*UserUpdateOne) SetToken

func (uuo *UserUpdateOne) SetToken(s string) *UserUpdateOne

SetToken sets the "token" field.

func (*UserUpdateOne) SetUpdatedAt

func (uuo *UserUpdateOne) SetUpdatedAt(t time.Time) *UserUpdateOne

SetUpdatedAt sets the "updated_at" field.

type Users

type Users []*User

Users is a parsable slice of User.

type ValidationError

type ValidationError struct {
	Name string // Field or edge name.
	// contains filtered or unexported fields
}

ValidationError returns when validating a field or edge fails.

func (*ValidationError) Error

func (e *ValidationError) Error() string

Error implements the error interface.

func (*ValidationError) Unwrap

func (e *ValidationError) Unwrap() error

Unwrap implements the errors.Wrapper interface.

type Value

type Value = ent.Value

ent aliases to avoid import conflicts in user's code.

Jump to

Keyboard shortcuts

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