ent

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2021 License: MIT Imports: 28 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.
	TypeAuthStateCache  = "AuthStateCache"
	TypePackageRecord   = "PackageRecord"
	TypeRepository      = "Repository"
	TypeScan            = "Scan"
	TypeSession         = "Session"
	TypeSeverity        = "Severity"
	TypeUser            = "User"
	TypeVulnStatus      = "VulnStatus"
	TypeVulnStatusIndex = "VulnStatusIndex"
	TypeVulnerability   = "Vulnerability"
)

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 AuthStateCache

type AuthStateCache struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// ExpiresAt holds the value of the "expires_at" field.
	ExpiresAt int64 `json:"expires_at,omitempty"`
	// contains filtered or unexported fields
}

AuthStateCache is the model entity for the AuthStateCache schema.

func (*AuthStateCache) String

func (asc *AuthStateCache) String() string

String implements the fmt.Stringer.

func (*AuthStateCache) Unwrap

func (asc *AuthStateCache) Unwrap() *AuthStateCache

Unwrap unwraps the AuthStateCache 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 (*AuthStateCache) Update

func (asc *AuthStateCache) Update() *AuthStateCacheUpdateOne

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

type AuthStateCacheClient

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

AuthStateCacheClient is a client for the AuthStateCache schema.

func NewAuthStateCacheClient

func NewAuthStateCacheClient(c config) *AuthStateCacheClient

NewAuthStateCacheClient returns a client for the AuthStateCache from the given config.

func (*AuthStateCacheClient) Create

Create returns a create builder for AuthStateCache.

func (*AuthStateCacheClient) CreateBulk

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

func (*AuthStateCacheClient) Delete

Delete returns a delete builder for AuthStateCache.

func (*AuthStateCacheClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*AuthStateCacheClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*AuthStateCacheClient) Get

Get returns a AuthStateCache entity by its id.

func (*AuthStateCacheClient) GetX

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

func (*AuthStateCacheClient) Hooks

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

Hooks returns the client hooks.

func (*AuthStateCacheClient) Query

Query returns a query builder for AuthStateCache.

func (*AuthStateCacheClient) Update

Update returns an update builder for AuthStateCache.

func (*AuthStateCacheClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*AuthStateCacheClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*AuthStateCacheClient) Use

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

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

type AuthStateCacheCreate

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

AuthStateCacheCreate is the builder for creating a AuthStateCache entity.

func (*AuthStateCacheCreate) Exec

func (ascc *AuthStateCacheCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthStateCacheCreate) ExecX

func (ascc *AuthStateCacheCreate) ExecX(ctx context.Context)

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

func (*AuthStateCacheCreate) Mutation

func (ascc *AuthStateCacheCreate) Mutation() *AuthStateCacheMutation

Mutation returns the AuthStateCacheMutation object of the builder.

func (*AuthStateCacheCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AuthStateCache.Create().
	SetExpiresAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AuthStateCacheUpsert) {
		SetExpiresAt(v+v).
	}).
	Exec(ctx)

func (*AuthStateCacheCreate) OnConflictColumns

func (ascc *AuthStateCacheCreate) OnConflictColumns(columns ...string) *AuthStateCacheUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AuthStateCache.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*AuthStateCacheCreate) Save

Save creates the AuthStateCache in the database.

func (*AuthStateCacheCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*AuthStateCacheCreate) SetExpiresAt

func (ascc *AuthStateCacheCreate) SetExpiresAt(i int64) *AuthStateCacheCreate

SetExpiresAt sets the "expires_at" field.

func (*AuthStateCacheCreate) SetID

SetID sets the "id" field.

type AuthStateCacheCreateBulk

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

AuthStateCacheCreateBulk is the builder for creating many AuthStateCache entities in bulk.

func (*AuthStateCacheCreateBulk) Exec

func (asccb *AuthStateCacheCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthStateCacheCreateBulk) ExecX

func (asccb *AuthStateCacheCreateBulk) ExecX(ctx context.Context)

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

func (*AuthStateCacheCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.AuthStateCache.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.AuthStateCacheUpsert) {
		SetExpiresAt(v+v).
	}).
	Exec(ctx)

func (*AuthStateCacheCreateBulk) OnConflictColumns

func (asccb *AuthStateCacheCreateBulk) OnConflictColumns(columns ...string) *AuthStateCacheUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.AuthStateCache.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*AuthStateCacheCreateBulk) Save

Save creates the AuthStateCache entities in the database.

func (*AuthStateCacheCreateBulk) SaveX

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

type AuthStateCacheDelete

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

AuthStateCacheDelete is the builder for deleting a AuthStateCache entity.

func (*AuthStateCacheDelete) Exec

func (ascd *AuthStateCacheDelete) Exec(ctx context.Context) (int, error)

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

func (*AuthStateCacheDelete) ExecX

func (ascd *AuthStateCacheDelete) ExecX(ctx context.Context) int

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

func (*AuthStateCacheDelete) Where

Where appends a list predicates to the AuthStateCacheDelete builder.

type AuthStateCacheDeleteOne

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

AuthStateCacheDeleteOne is the builder for deleting a single AuthStateCache entity.

func (*AuthStateCacheDeleteOne) Exec

func (ascdo *AuthStateCacheDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*AuthStateCacheDeleteOne) ExecX

func (ascdo *AuthStateCacheDeleteOne) ExecX(ctx context.Context)

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

type AuthStateCacheGroupBy

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

AuthStateCacheGroupBy is the group-by builder for AuthStateCache entities.

func (*AuthStateCacheGroupBy) Aggregate

func (ascgb *AuthStateCacheGroupBy) Aggregate(fns ...AggregateFunc) *AuthStateCacheGroupBy

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

func (*AuthStateCacheGroupBy) Bool

func (ascgb *AuthStateCacheGroupBy) 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 (*AuthStateCacheGroupBy) BoolX

func (ascgb *AuthStateCacheGroupBy) BoolX(ctx context.Context) bool

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

func (*AuthStateCacheGroupBy) Bools

func (ascgb *AuthStateCacheGroupBy) 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 (*AuthStateCacheGroupBy) BoolsX

func (ascgb *AuthStateCacheGroupBy) BoolsX(ctx context.Context) []bool

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

func (*AuthStateCacheGroupBy) Float64

func (ascgb *AuthStateCacheGroupBy) 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 (*AuthStateCacheGroupBy) Float64X

func (ascgb *AuthStateCacheGroupBy) Float64X(ctx context.Context) float64

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

func (*AuthStateCacheGroupBy) Float64s

func (ascgb *AuthStateCacheGroupBy) 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 (*AuthStateCacheGroupBy) Float64sX

func (ascgb *AuthStateCacheGroupBy) Float64sX(ctx context.Context) []float64

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

func (*AuthStateCacheGroupBy) Int

func (ascgb *AuthStateCacheGroupBy) 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 (*AuthStateCacheGroupBy) IntX

func (ascgb *AuthStateCacheGroupBy) IntX(ctx context.Context) int

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

func (*AuthStateCacheGroupBy) Ints

func (ascgb *AuthStateCacheGroupBy) 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 (*AuthStateCacheGroupBy) IntsX

func (ascgb *AuthStateCacheGroupBy) IntsX(ctx context.Context) []int

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

func (*AuthStateCacheGroupBy) Scan

func (ascgb *AuthStateCacheGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*AuthStateCacheGroupBy) ScanX

func (ascgb *AuthStateCacheGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*AuthStateCacheGroupBy) String

func (ascgb *AuthStateCacheGroupBy) 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 (*AuthStateCacheGroupBy) StringX

func (ascgb *AuthStateCacheGroupBy) StringX(ctx context.Context) string

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

func (*AuthStateCacheGroupBy) Strings

func (ascgb *AuthStateCacheGroupBy) 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 (*AuthStateCacheGroupBy) StringsX

func (ascgb *AuthStateCacheGroupBy) StringsX(ctx context.Context) []string

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

type AuthStateCacheMutation

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

AuthStateCacheMutation represents an operation that mutates the AuthStateCache nodes in the graph.

func (*AuthStateCacheMutation) AddExpiresAt

func (m *AuthStateCacheMutation) AddExpiresAt(i int64)

AddExpiresAt adds i to the "expires_at" field.

func (*AuthStateCacheMutation) AddField

func (m *AuthStateCacheMutation) 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 (*AuthStateCacheMutation) AddedEdges

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

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

func (*AuthStateCacheMutation) AddedExpiresAt

func (m *AuthStateCacheMutation) AddedExpiresAt() (r int64, exists bool)

AddedExpiresAt returns the value that was added to the "expires_at" field in this mutation.

func (*AuthStateCacheMutation) AddedField

func (m *AuthStateCacheMutation) 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 (*AuthStateCacheMutation) AddedFields

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

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

func (*AuthStateCacheMutation) AddedIDs

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

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

func (*AuthStateCacheMutation) ClearEdge

func (m *AuthStateCacheMutation) 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 (*AuthStateCacheMutation) ClearField

func (m *AuthStateCacheMutation) 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 (*AuthStateCacheMutation) ClearedEdges

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

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

func (*AuthStateCacheMutation) ClearedFields

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

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

func (AuthStateCacheMutation) Client

func (m AuthStateCacheMutation) 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 (*AuthStateCacheMutation) EdgeCleared

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

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

func (*AuthStateCacheMutation) ExpiresAt

func (m *AuthStateCacheMutation) ExpiresAt() (r int64, exists bool)

ExpiresAt returns the value of the "expires_at" field in the mutation.

func (*AuthStateCacheMutation) Field

func (m *AuthStateCacheMutation) 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 (*AuthStateCacheMutation) FieldCleared

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

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

func (*AuthStateCacheMutation) Fields

func (m *AuthStateCacheMutation) 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 (*AuthStateCacheMutation) ID

func (m *AuthStateCacheMutation) 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 (*AuthStateCacheMutation) OldExpiresAt

func (m *AuthStateCacheMutation) OldExpiresAt(ctx context.Context) (v int64, err error)

OldExpiresAt returns the old "expires_at" field's value of the AuthStateCache entity. If the AuthStateCache 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 (*AuthStateCacheMutation) OldField

func (m *AuthStateCacheMutation) 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 (*AuthStateCacheMutation) Op

func (m *AuthStateCacheMutation) Op() Op

Op returns the operation name.

func (*AuthStateCacheMutation) RemovedEdges

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

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

func (*AuthStateCacheMutation) RemovedIDs

func (m *AuthStateCacheMutation) 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 (*AuthStateCacheMutation) ResetEdge

func (m *AuthStateCacheMutation) 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 (*AuthStateCacheMutation) ResetExpiresAt

func (m *AuthStateCacheMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expires_at" field.

func (*AuthStateCacheMutation) ResetField

func (m *AuthStateCacheMutation) 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 (*AuthStateCacheMutation) SetExpiresAt

func (m *AuthStateCacheMutation) SetExpiresAt(i int64)

SetExpiresAt sets the "expires_at" field.

func (*AuthStateCacheMutation) SetField

func (m *AuthStateCacheMutation) 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 (*AuthStateCacheMutation) SetID

func (m *AuthStateCacheMutation) SetID(id string)

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

func (AuthStateCacheMutation) Tx

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

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

func (*AuthStateCacheMutation) Type

func (m *AuthStateCacheMutation) Type() string

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

func (*AuthStateCacheMutation) Where

Where appends a list predicates to the AuthStateCacheMutation builder.

type AuthStateCacheQuery

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

AuthStateCacheQuery is the builder for querying AuthStateCache entities.

func (*AuthStateCacheQuery) All

All executes the query and returns a list of AuthStateCaches.

func (*AuthStateCacheQuery) AllX

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

func (*AuthStateCacheQuery) Clone

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

func (*AuthStateCacheQuery) Count

func (ascq *AuthStateCacheQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*AuthStateCacheQuery) CountX

func (ascq *AuthStateCacheQuery) CountX(ctx context.Context) int

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

func (*AuthStateCacheQuery) Exist

func (ascq *AuthStateCacheQuery) Exist(ctx context.Context) (bool, error)

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

func (*AuthStateCacheQuery) ExistX

func (ascq *AuthStateCacheQuery) ExistX(ctx context.Context) bool

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

func (*AuthStateCacheQuery) First

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

func (*AuthStateCacheQuery) FirstID

func (ascq *AuthStateCacheQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*AuthStateCacheQuery) FirstIDX

func (ascq *AuthStateCacheQuery) FirstIDX(ctx context.Context) string

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

func (*AuthStateCacheQuery) FirstX

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

func (*AuthStateCacheQuery) GroupBy

func (ascq *AuthStateCacheQuery) GroupBy(field string, fields ...string) *AuthStateCacheGroupBy

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 {
	ExpiresAt int64 `json:"expires_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.AuthStateCache.Query().
	GroupBy(authstatecache.FieldExpiresAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*AuthStateCacheQuery) IDs

func (ascq *AuthStateCacheQuery) IDs(ctx context.Context) ([]string, error)

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

func (*AuthStateCacheQuery) IDsX

func (ascq *AuthStateCacheQuery) IDsX(ctx context.Context) []string

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

func (*AuthStateCacheQuery) Limit

func (ascq *AuthStateCacheQuery) Limit(limit int) *AuthStateCacheQuery

Limit adds a limit step to the query.

func (*AuthStateCacheQuery) Offset

func (ascq *AuthStateCacheQuery) Offset(offset int) *AuthStateCacheQuery

Offset adds an offset step to the query.

func (*AuthStateCacheQuery) Only

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

func (*AuthStateCacheQuery) OnlyID

func (ascq *AuthStateCacheQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*AuthStateCacheQuery) OnlyIDX

func (ascq *AuthStateCacheQuery) OnlyIDX(ctx context.Context) string

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

func (*AuthStateCacheQuery) OnlyX

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

func (*AuthStateCacheQuery) Order

Order adds an order step to the query.

func (*AuthStateCacheQuery) Select

func (ascq *AuthStateCacheQuery) Select(fields ...string) *AuthStateCacheSelect

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 {
	ExpiresAt int64 `json:"expires_at,omitempty"`
}

client.AuthStateCache.Query().
	Select(authstatecache.FieldExpiresAt).
	Scan(ctx, &v)

func (*AuthStateCacheQuery) Unique

func (ascq *AuthStateCacheQuery) Unique(unique bool) *AuthStateCacheQuery

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 (*AuthStateCacheQuery) Where

Where adds a new predicate for the AuthStateCacheQuery builder.

type AuthStateCacheSelect

type AuthStateCacheSelect struct {
	*AuthStateCacheQuery
	// contains filtered or unexported fields
}

AuthStateCacheSelect is the builder for selecting fields of AuthStateCache entities.

func (*AuthStateCacheSelect) Bool

func (ascs *AuthStateCacheSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*AuthStateCacheSelect) BoolX

func (ascs *AuthStateCacheSelect) BoolX(ctx context.Context) bool

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

func (*AuthStateCacheSelect) Bools

func (ascs *AuthStateCacheSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*AuthStateCacheSelect) BoolsX

func (ascs *AuthStateCacheSelect) BoolsX(ctx context.Context) []bool

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

func (*AuthStateCacheSelect) Float64

func (ascs *AuthStateCacheSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*AuthStateCacheSelect) Float64X

func (ascs *AuthStateCacheSelect) Float64X(ctx context.Context) float64

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

func (*AuthStateCacheSelect) Float64s

func (ascs *AuthStateCacheSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*AuthStateCacheSelect) Float64sX

func (ascs *AuthStateCacheSelect) Float64sX(ctx context.Context) []float64

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

func (*AuthStateCacheSelect) Int

func (ascs *AuthStateCacheSelect) Int(ctx context.Context) (_ int, err error)

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

func (*AuthStateCacheSelect) IntX

func (ascs *AuthStateCacheSelect) IntX(ctx context.Context) int

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

func (*AuthStateCacheSelect) Ints

func (ascs *AuthStateCacheSelect) Ints(ctx context.Context) ([]int, error)

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

func (*AuthStateCacheSelect) IntsX

func (ascs *AuthStateCacheSelect) IntsX(ctx context.Context) []int

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

func (*AuthStateCacheSelect) Scan

func (ascs *AuthStateCacheSelect) Scan(ctx context.Context, v interface{}) error

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

func (*AuthStateCacheSelect) ScanX

func (ascs *AuthStateCacheSelect) ScanX(ctx context.Context, v interface{})

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

func (*AuthStateCacheSelect) String

func (ascs *AuthStateCacheSelect) String(ctx context.Context) (_ string, err error)

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

func (*AuthStateCacheSelect) StringX

func (ascs *AuthStateCacheSelect) StringX(ctx context.Context) string

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

func (*AuthStateCacheSelect) Strings

func (ascs *AuthStateCacheSelect) Strings(ctx context.Context) ([]string, error)

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

func (*AuthStateCacheSelect) StringsX

func (ascs *AuthStateCacheSelect) StringsX(ctx context.Context) []string

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

type AuthStateCacheUpdate

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

AuthStateCacheUpdate is the builder for updating AuthStateCache entities.

func (*AuthStateCacheUpdate) AddExpiresAt

func (ascu *AuthStateCacheUpdate) AddExpiresAt(i int64) *AuthStateCacheUpdate

AddExpiresAt adds i to the "expires_at" field.

func (*AuthStateCacheUpdate) Exec

func (ascu *AuthStateCacheUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*AuthStateCacheUpdate) ExecX

func (ascu *AuthStateCacheUpdate) ExecX(ctx context.Context)

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

func (*AuthStateCacheUpdate) Mutation

func (ascu *AuthStateCacheUpdate) Mutation() *AuthStateCacheMutation

Mutation returns the AuthStateCacheMutation object of the builder.

func (*AuthStateCacheUpdate) Save

func (ascu *AuthStateCacheUpdate) Save(ctx context.Context) (int, error)

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

func (*AuthStateCacheUpdate) SaveX

func (ascu *AuthStateCacheUpdate) SaveX(ctx context.Context) int

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

func (*AuthStateCacheUpdate) SetExpiresAt

func (ascu *AuthStateCacheUpdate) SetExpiresAt(i int64) *AuthStateCacheUpdate

SetExpiresAt sets the "expires_at" field.

func (*AuthStateCacheUpdate) Where

Where appends a list predicates to the AuthStateCacheUpdate builder.

type AuthStateCacheUpdateOne

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

AuthStateCacheUpdateOne is the builder for updating a single AuthStateCache entity.

func (*AuthStateCacheUpdateOne) AddExpiresAt

func (ascuo *AuthStateCacheUpdateOne) AddExpiresAt(i int64) *AuthStateCacheUpdateOne

AddExpiresAt adds i to the "expires_at" field.

func (*AuthStateCacheUpdateOne) Exec

func (ascuo *AuthStateCacheUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*AuthStateCacheUpdateOne) ExecX

func (ascuo *AuthStateCacheUpdateOne) ExecX(ctx context.Context)

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

func (*AuthStateCacheUpdateOne) Mutation

Mutation returns the AuthStateCacheMutation object of the builder.

func (*AuthStateCacheUpdateOne) Save

Save executes the query and returns the updated AuthStateCache entity.

func (*AuthStateCacheUpdateOne) SaveX

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

func (*AuthStateCacheUpdateOne) Select

func (ascuo *AuthStateCacheUpdateOne) Select(field string, fields ...string) *AuthStateCacheUpdateOne

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

func (*AuthStateCacheUpdateOne) SetExpiresAt

func (ascuo *AuthStateCacheUpdateOne) SetExpiresAt(i int64) *AuthStateCacheUpdateOne

SetExpiresAt sets the "expires_at" field.

type AuthStateCacheUpsert

type AuthStateCacheUpsert struct {
	*sql.UpdateSet
}

AuthStateCacheUpsert is the "OnConflict" setter.

func (*AuthStateCacheUpsert) SetExpiresAt

func (u *AuthStateCacheUpsert) SetExpiresAt(v int64) *AuthStateCacheUpsert

SetExpiresAt sets the "expires_at" field.

func (*AuthStateCacheUpsert) UpdateExpiresAt

func (u *AuthStateCacheUpsert) UpdateExpiresAt() *AuthStateCacheUpsert

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

type AuthStateCacheUpsertBulk

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

AuthStateCacheUpsertBulk is the builder for "upsert"-ing a bulk of AuthStateCache nodes.

func (*AuthStateCacheUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AuthStateCacheUpsertBulk) Exec

Exec executes the query.

func (*AuthStateCacheUpsertBulk) ExecX

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

func (*AuthStateCacheUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AuthStateCache.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*AuthStateCacheUpsertBulk) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*AuthStateCacheUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the AuthStateCacheCreateBulk.OnConflict documentation for more info.

func (*AuthStateCacheUpsertBulk) UpdateExpiresAt

func (u *AuthStateCacheUpsertBulk) UpdateExpiresAt() *AuthStateCacheUpsertBulk

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*AuthStateCacheUpsertBulk) UpdateNewValues

func (u *AuthStateCacheUpsertBulk) UpdateNewValues() *AuthStateCacheUpsertBulk

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.AuthStateCache.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

type AuthStateCacheUpsertOne

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

AuthStateCacheUpsertOne is the builder for "upsert"-ing

one AuthStateCache node.

func (*AuthStateCacheUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*AuthStateCacheUpsertOne) Exec

Exec executes the query.

func (*AuthStateCacheUpsertOne) ExecX

func (u *AuthStateCacheUpsertOne) ExecX(ctx context.Context)

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

func (*AuthStateCacheUpsertOne) ID

func (u *AuthStateCacheUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*AuthStateCacheUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*AuthStateCacheUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.AuthStateCache.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*AuthStateCacheUpsertOne) SetExpiresAt

SetExpiresAt sets the "expires_at" field.

func (*AuthStateCacheUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the AuthStateCacheCreate.OnConflict documentation for more info.

func (*AuthStateCacheUpsertOne) UpdateExpiresAt

func (u *AuthStateCacheUpsertOne) UpdateExpiresAt() *AuthStateCacheUpsertOne

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*AuthStateCacheUpsertOne) UpdateNewValues

func (u *AuthStateCacheUpsertOne) UpdateNewValues() *AuthStateCacheUpsertOne

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.AuthStateCache.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

type AuthStateCaches

type AuthStateCaches []*AuthStateCache

AuthStateCaches is a parsable slice of AuthStateCache.

type Client

type Client struct {

	// Schema is the client for creating, migrating and dropping schema.
	Schema *migrate.Schema
	// AuthStateCache is the client for interacting with the AuthStateCache builders.
	AuthStateCache *AuthStateCacheClient
	// PackageRecord is the client for interacting with the PackageRecord builders.
	PackageRecord *PackageRecordClient
	// Repository is the client for interacting with the Repository builders.
	Repository *RepositoryClient
	// Scan is the client for interacting with the Scan builders.
	Scan *ScanClient
	// Session is the client for interacting with the Session builders.
	Session *SessionClient
	// Severity is the client for interacting with the Severity builders.
	Severity *SeverityClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// VulnStatus is the client for interacting with the VulnStatus builders.
	VulnStatus *VulnStatusClient
	// VulnStatusIndex is the client for interacting with the VulnStatusIndex builders.
	VulnStatusIndex *VulnStatusIndexClient
	// Vulnerability is the client for interacting with the Vulnerability builders.
	Vulnerability *VulnerabilityClient
	// 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().
	AuthStateCache.
	Query().
	Count(ctx)

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(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 Committer 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 Hook

type Hook = ent.Hook

ent aliases to avoid import conflicts in user's code.

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 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 PackageRecord

type PackageRecord struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Type holds the value of the "type" field.
	Type string `json:"type,omitempty"`
	// Source holds the value of the "source" field.
	Source string `json:"source,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// Version holds the value of the "version" field.
	Version string `json:"version,omitempty"`
	// VulnIds holds the value of the "vuln_ids" field.
	VulnIds []string `json:"vuln_ids,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the PackageRecordQuery when eager-loading is set.
	Edges PackageRecordEdges `json:"edges"`
	// contains filtered or unexported fields
}

PackageRecord is the model entity for the PackageRecord schema.

func (*PackageRecord) QueryScan

func (pr *PackageRecord) QueryScan() *ScanQuery

QueryScan queries the "scan" edge of the PackageRecord entity.

func (*PackageRecord) QueryVulnerabilities

func (pr *PackageRecord) QueryVulnerabilities() *VulnerabilityQuery

QueryVulnerabilities queries the "vulnerabilities" edge of the PackageRecord entity.

func (*PackageRecord) String

func (pr *PackageRecord) String() string

String implements the fmt.Stringer.

func (*PackageRecord) Unwrap

func (pr *PackageRecord) Unwrap() *PackageRecord

Unwrap unwraps the PackageRecord 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 (*PackageRecord) Update

func (pr *PackageRecord) Update() *PackageRecordUpdateOne

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

type PackageRecordClient

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

PackageRecordClient is a client for the PackageRecord schema.

func NewPackageRecordClient

func NewPackageRecordClient(c config) *PackageRecordClient

NewPackageRecordClient returns a client for the PackageRecord from the given config.

func (*PackageRecordClient) Create

Create returns a create builder for PackageRecord.

func (*PackageRecordClient) CreateBulk

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

func (*PackageRecordClient) Delete

Delete returns a delete builder for PackageRecord.

func (*PackageRecordClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*PackageRecordClient) DeleteOneID

func (c *PackageRecordClient) DeleteOneID(id int) *PackageRecordDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*PackageRecordClient) Get

Get returns a PackageRecord entity by its id.

func (*PackageRecordClient) GetX

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

func (*PackageRecordClient) Hooks

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

Hooks returns the client hooks.

func (*PackageRecordClient) Query

Query returns a query builder for PackageRecord.

func (*PackageRecordClient) QueryScan

func (c *PackageRecordClient) QueryScan(pr *PackageRecord) *ScanQuery

QueryScan queries the scan edge of a PackageRecord.

func (*PackageRecordClient) QueryVulnerabilities

func (c *PackageRecordClient) QueryVulnerabilities(pr *PackageRecord) *VulnerabilityQuery

QueryVulnerabilities queries the vulnerabilities edge of a PackageRecord.

func (*PackageRecordClient) Update

Update returns an update builder for PackageRecord.

func (*PackageRecordClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*PackageRecordClient) UpdateOneID

func (c *PackageRecordClient) UpdateOneID(id int) *PackageRecordUpdateOne

UpdateOneID returns an update builder for the given id.

func (*PackageRecordClient) Use

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

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

type PackageRecordCreate

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

PackageRecordCreate is the builder for creating a PackageRecord entity.

func (*PackageRecordCreate) AddScan

func (prc *PackageRecordCreate) AddScan(s ...*Scan) *PackageRecordCreate

AddScan adds the "scan" edges to the Scan entity.

func (*PackageRecordCreate) AddScanIDs

func (prc *PackageRecordCreate) AddScanIDs(ids ...string) *PackageRecordCreate

AddScanIDs adds the "scan" edge to the Scan entity by IDs.

func (*PackageRecordCreate) AddVulnerabilities

func (prc *PackageRecordCreate) AddVulnerabilities(v ...*Vulnerability) *PackageRecordCreate

AddVulnerabilities adds the "vulnerabilities" edges to the Vulnerability entity.

func (*PackageRecordCreate) AddVulnerabilityIDs

func (prc *PackageRecordCreate) AddVulnerabilityIDs(ids ...string) *PackageRecordCreate

AddVulnerabilityIDs adds the "vulnerabilities" edge to the Vulnerability entity by IDs.

func (*PackageRecordCreate) Exec

func (prc *PackageRecordCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*PackageRecordCreate) ExecX

func (prc *PackageRecordCreate) ExecX(ctx context.Context)

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

func (*PackageRecordCreate) Mutation

func (prc *PackageRecordCreate) Mutation() *PackageRecordMutation

Mutation returns the PackageRecordMutation object of the builder.

func (*PackageRecordCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PackageRecord.Create().
	SetType(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PackageRecordUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*PackageRecordCreate) OnConflictColumns

func (prc *PackageRecordCreate) OnConflictColumns(columns ...string) *PackageRecordUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PackageRecord.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*PackageRecordCreate) Save

Save creates the PackageRecord in the database.

func (*PackageRecordCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*PackageRecordCreate) SetName

SetName sets the "name" field.

func (*PackageRecordCreate) SetSource

func (prc *PackageRecordCreate) SetSource(s string) *PackageRecordCreate

SetSource sets the "source" field.

func (*PackageRecordCreate) SetType

SetType sets the "type" field.

func (*PackageRecordCreate) SetVersion

func (prc *PackageRecordCreate) SetVersion(s string) *PackageRecordCreate

SetVersion sets the "version" field.

func (*PackageRecordCreate) SetVulnIds

func (prc *PackageRecordCreate) SetVulnIds(s []string) *PackageRecordCreate

SetVulnIds sets the "vuln_ids" field.

type PackageRecordCreateBulk

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

PackageRecordCreateBulk is the builder for creating many PackageRecord entities in bulk.

func (*PackageRecordCreateBulk) Exec

func (prcb *PackageRecordCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*PackageRecordCreateBulk) ExecX

func (prcb *PackageRecordCreateBulk) ExecX(ctx context.Context)

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

func (*PackageRecordCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.PackageRecord.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.PackageRecordUpsert) {
		SetType(v+v).
	}).
	Exec(ctx)

func (*PackageRecordCreateBulk) OnConflictColumns

func (prcb *PackageRecordCreateBulk) OnConflictColumns(columns ...string) *PackageRecordUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.PackageRecord.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*PackageRecordCreateBulk) Save

Save creates the PackageRecord entities in the database.

func (*PackageRecordCreateBulk) SaveX

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

type PackageRecordDelete

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

PackageRecordDelete is the builder for deleting a PackageRecord entity.

func (*PackageRecordDelete) Exec

func (prd *PackageRecordDelete) Exec(ctx context.Context) (int, error)

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

func (*PackageRecordDelete) ExecX

func (prd *PackageRecordDelete) ExecX(ctx context.Context) int

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

func (*PackageRecordDelete) Where

Where appends a list predicates to the PackageRecordDelete builder.

type PackageRecordDeleteOne

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

PackageRecordDeleteOne is the builder for deleting a single PackageRecord entity.

func (*PackageRecordDeleteOne) Exec

func (prdo *PackageRecordDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*PackageRecordDeleteOne) ExecX

func (prdo *PackageRecordDeleteOne) ExecX(ctx context.Context)

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

type PackageRecordEdges

type PackageRecordEdges struct {
	// Scan holds the value of the scan edge.
	Scan []*Scan `json:"scan,omitempty"`
	// Vulnerabilities holds the value of the vulnerabilities edge.
	Vulnerabilities []*Vulnerability `json:"vulnerabilities,omitempty"`
	// contains filtered or unexported fields
}

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

func (PackageRecordEdges) ScanOrErr

func (e PackageRecordEdges) ScanOrErr() ([]*Scan, error)

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

func (PackageRecordEdges) VulnerabilitiesOrErr

func (e PackageRecordEdges) VulnerabilitiesOrErr() ([]*Vulnerability, error)

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

type PackageRecordGroupBy

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

PackageRecordGroupBy is the group-by builder for PackageRecord entities.

func (*PackageRecordGroupBy) Aggregate

func (prgb *PackageRecordGroupBy) Aggregate(fns ...AggregateFunc) *PackageRecordGroupBy

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

func (*PackageRecordGroupBy) Bool

func (prgb *PackageRecordGroupBy) 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 (*PackageRecordGroupBy) BoolX

func (prgb *PackageRecordGroupBy) BoolX(ctx context.Context) bool

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

func (*PackageRecordGroupBy) Bools

func (prgb *PackageRecordGroupBy) 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 (*PackageRecordGroupBy) BoolsX

func (prgb *PackageRecordGroupBy) BoolsX(ctx context.Context) []bool

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

func (*PackageRecordGroupBy) Float64

func (prgb *PackageRecordGroupBy) 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 (*PackageRecordGroupBy) Float64X

func (prgb *PackageRecordGroupBy) Float64X(ctx context.Context) float64

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

func (*PackageRecordGroupBy) Float64s

func (prgb *PackageRecordGroupBy) 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 (*PackageRecordGroupBy) Float64sX

func (prgb *PackageRecordGroupBy) Float64sX(ctx context.Context) []float64

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

func (*PackageRecordGroupBy) Int

func (prgb *PackageRecordGroupBy) 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 (*PackageRecordGroupBy) IntX

func (prgb *PackageRecordGroupBy) IntX(ctx context.Context) int

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

func (*PackageRecordGroupBy) Ints

func (prgb *PackageRecordGroupBy) 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 (*PackageRecordGroupBy) IntsX

func (prgb *PackageRecordGroupBy) IntsX(ctx context.Context) []int

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

func (*PackageRecordGroupBy) Scan

func (prgb *PackageRecordGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*PackageRecordGroupBy) ScanX

func (prgb *PackageRecordGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*PackageRecordGroupBy) String

func (prgb *PackageRecordGroupBy) 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 (*PackageRecordGroupBy) StringX

func (prgb *PackageRecordGroupBy) StringX(ctx context.Context) string

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

func (*PackageRecordGroupBy) Strings

func (prgb *PackageRecordGroupBy) 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 (*PackageRecordGroupBy) StringsX

func (prgb *PackageRecordGroupBy) StringsX(ctx context.Context) []string

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

type PackageRecordMutation

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

PackageRecordMutation represents an operation that mutates the PackageRecord nodes in the graph.

func (*PackageRecordMutation) AddField

func (m *PackageRecordMutation) 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 (*PackageRecordMutation) AddScanIDs

func (m *PackageRecordMutation) AddScanIDs(ids ...string)

AddScanIDs adds the "scan" edge to the Scan entity by ids.

func (*PackageRecordMutation) AddVulnerabilityIDs

func (m *PackageRecordMutation) AddVulnerabilityIDs(ids ...string)

AddVulnerabilityIDs adds the "vulnerabilities" edge to the Vulnerability entity by ids.

func (*PackageRecordMutation) AddedEdges

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

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

func (*PackageRecordMutation) AddedField

func (m *PackageRecordMutation) 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 (*PackageRecordMutation) AddedFields

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

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

func (*PackageRecordMutation) AddedIDs

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

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

func (*PackageRecordMutation) ClearEdge

func (m *PackageRecordMutation) 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 (*PackageRecordMutation) ClearField

func (m *PackageRecordMutation) 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 (*PackageRecordMutation) ClearScan

func (m *PackageRecordMutation) ClearScan()

ClearScan clears the "scan" edge to the Scan entity.

func (*PackageRecordMutation) ClearVulnerabilities

func (m *PackageRecordMutation) ClearVulnerabilities()

ClearVulnerabilities clears the "vulnerabilities" edge to the Vulnerability entity.

func (*PackageRecordMutation) ClearedEdges

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

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

func (*PackageRecordMutation) ClearedFields

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

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

func (PackageRecordMutation) Client

func (m PackageRecordMutation) 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 (*PackageRecordMutation) EdgeCleared

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

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

func (*PackageRecordMutation) Field

func (m *PackageRecordMutation) 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 (*PackageRecordMutation) FieldCleared

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

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

func (*PackageRecordMutation) Fields

func (m *PackageRecordMutation) 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 (*PackageRecordMutation) GetType

func (m *PackageRecordMutation) GetType() (r string, exists bool)

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

func (*PackageRecordMutation) ID

func (m *PackageRecordMutation) 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 (*PackageRecordMutation) Name

func (m *PackageRecordMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*PackageRecordMutation) OldField

func (m *PackageRecordMutation) 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 (*PackageRecordMutation) OldName

func (m *PackageRecordMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the PackageRecord entity. If the PackageRecord 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 (*PackageRecordMutation) OldSource

func (m *PackageRecordMutation) OldSource(ctx context.Context) (v string, err error)

OldSource returns the old "source" field's value of the PackageRecord entity. If the PackageRecord 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 (*PackageRecordMutation) OldType

func (m *PackageRecordMutation) OldType(ctx context.Context) (v string, err error)

OldType returns the old "type" field's value of the PackageRecord entity. If the PackageRecord 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 (*PackageRecordMutation) OldVersion

func (m *PackageRecordMutation) OldVersion(ctx context.Context) (v string, err error)

OldVersion returns the old "version" field's value of the PackageRecord entity. If the PackageRecord 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 (*PackageRecordMutation) OldVulnIds

func (m *PackageRecordMutation) OldVulnIds(ctx context.Context) (v []string, err error)

OldVulnIds returns the old "vuln_ids" field's value of the PackageRecord entity. If the PackageRecord 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 (*PackageRecordMutation) Op

func (m *PackageRecordMutation) Op() Op

Op returns the operation name.

func (*PackageRecordMutation) RemoveScanIDs

func (m *PackageRecordMutation) RemoveScanIDs(ids ...string)

RemoveScanIDs removes the "scan" edge to the Scan entity by IDs.

func (*PackageRecordMutation) RemoveVulnerabilityIDs

func (m *PackageRecordMutation) RemoveVulnerabilityIDs(ids ...string)

RemoveVulnerabilityIDs removes the "vulnerabilities" edge to the Vulnerability entity by IDs.

func (*PackageRecordMutation) RemovedEdges

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

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

func (*PackageRecordMutation) RemovedIDs

func (m *PackageRecordMutation) 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 (*PackageRecordMutation) RemovedScanIDs

func (m *PackageRecordMutation) RemovedScanIDs() (ids []string)

RemovedScan returns the removed IDs of the "scan" edge to the Scan entity.

func (*PackageRecordMutation) RemovedVulnerabilitiesIDs

func (m *PackageRecordMutation) RemovedVulnerabilitiesIDs() (ids []string)

RemovedVulnerabilities returns the removed IDs of the "vulnerabilities" edge to the Vulnerability entity.

func (*PackageRecordMutation) ResetEdge

func (m *PackageRecordMutation) 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 (*PackageRecordMutation) ResetField

func (m *PackageRecordMutation) 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 (*PackageRecordMutation) ResetName

func (m *PackageRecordMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*PackageRecordMutation) ResetScan

func (m *PackageRecordMutation) ResetScan()

ResetScan resets all changes to the "scan" edge.

func (*PackageRecordMutation) ResetSource

func (m *PackageRecordMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*PackageRecordMutation) ResetType

func (m *PackageRecordMutation) ResetType()

ResetType resets all changes to the "type" field.

func (*PackageRecordMutation) ResetVersion

func (m *PackageRecordMutation) ResetVersion()

ResetVersion resets all changes to the "version" field.

func (*PackageRecordMutation) ResetVulnIds

func (m *PackageRecordMutation) ResetVulnIds()

ResetVulnIds resets all changes to the "vuln_ids" field.

func (*PackageRecordMutation) ResetVulnerabilities

func (m *PackageRecordMutation) ResetVulnerabilities()

ResetVulnerabilities resets all changes to the "vulnerabilities" edge.

func (*PackageRecordMutation) ScanCleared

func (m *PackageRecordMutation) ScanCleared() bool

ScanCleared reports if the "scan" edge to the Scan entity was cleared.

func (*PackageRecordMutation) ScanIDs

func (m *PackageRecordMutation) ScanIDs() (ids []string)

ScanIDs returns the "scan" edge IDs in the mutation.

func (*PackageRecordMutation) SetField

func (m *PackageRecordMutation) 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 (*PackageRecordMutation) SetName

func (m *PackageRecordMutation) SetName(s string)

SetName sets the "name" field.

func (*PackageRecordMutation) SetSource

func (m *PackageRecordMutation) SetSource(s string)

SetSource sets the "source" field.

func (*PackageRecordMutation) SetType

func (m *PackageRecordMutation) SetType(s string)

SetType sets the "type" field.

func (*PackageRecordMutation) SetVersion

func (m *PackageRecordMutation) SetVersion(s string)

SetVersion sets the "version" field.

func (*PackageRecordMutation) SetVulnIds

func (m *PackageRecordMutation) SetVulnIds(s []string)

SetVulnIds sets the "vuln_ids" field.

func (*PackageRecordMutation) Source

func (m *PackageRecordMutation) Source() (r string, exists bool)

Source returns the value of the "source" field in the mutation.

func (PackageRecordMutation) Tx

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

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

func (*PackageRecordMutation) Type

func (m *PackageRecordMutation) Type() string

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

func (*PackageRecordMutation) Version

func (m *PackageRecordMutation) Version() (r string, exists bool)

Version returns the value of the "version" field in the mutation.

func (*PackageRecordMutation) VulnIds

func (m *PackageRecordMutation) VulnIds() (r []string, exists bool)

VulnIds returns the value of the "vuln_ids" field in the mutation.

func (*PackageRecordMutation) VulnerabilitiesCleared

func (m *PackageRecordMutation) VulnerabilitiesCleared() bool

VulnerabilitiesCleared reports if the "vulnerabilities" edge to the Vulnerability entity was cleared.

func (*PackageRecordMutation) VulnerabilitiesIDs

func (m *PackageRecordMutation) VulnerabilitiesIDs() (ids []string)

VulnerabilitiesIDs returns the "vulnerabilities" edge IDs in the mutation.

func (*PackageRecordMutation) Where

Where appends a list predicates to the PackageRecordMutation builder.

type PackageRecordQuery

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

PackageRecordQuery is the builder for querying PackageRecord entities.

func (*PackageRecordQuery) All

All executes the query and returns a list of PackageRecords.

func (*PackageRecordQuery) AllX

func (prq *PackageRecordQuery) AllX(ctx context.Context) []*PackageRecord

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

func (*PackageRecordQuery) Clone

func (prq *PackageRecordQuery) Clone() *PackageRecordQuery

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

func (*PackageRecordQuery) Count

func (prq *PackageRecordQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*PackageRecordQuery) CountX

func (prq *PackageRecordQuery) CountX(ctx context.Context) int

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

func (*PackageRecordQuery) Exist

func (prq *PackageRecordQuery) Exist(ctx context.Context) (bool, error)

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

func (*PackageRecordQuery) ExistX

func (prq *PackageRecordQuery) ExistX(ctx context.Context) bool

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

func (*PackageRecordQuery) First

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

func (*PackageRecordQuery) FirstID

func (prq *PackageRecordQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*PackageRecordQuery) FirstIDX

func (prq *PackageRecordQuery) FirstIDX(ctx context.Context) int

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

func (*PackageRecordQuery) FirstX

func (prq *PackageRecordQuery) FirstX(ctx context.Context) *PackageRecord

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

func (*PackageRecordQuery) GroupBy

func (prq *PackageRecordQuery) GroupBy(field string, fields ...string) *PackageRecordGroupBy

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 {
	Type string `json:"type,omitempty"`
	Count int `json:"count,omitempty"`
}

client.PackageRecord.Query().
	GroupBy(packagerecord.FieldType).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*PackageRecordQuery) IDs

func (prq *PackageRecordQuery) IDs(ctx context.Context) ([]int, error)

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

func (*PackageRecordQuery) IDsX

func (prq *PackageRecordQuery) IDsX(ctx context.Context) []int

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

func (*PackageRecordQuery) Limit

func (prq *PackageRecordQuery) Limit(limit int) *PackageRecordQuery

Limit adds a limit step to the query.

func (*PackageRecordQuery) Offset

func (prq *PackageRecordQuery) Offset(offset int) *PackageRecordQuery

Offset adds an offset step to the query.

func (*PackageRecordQuery) Only

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

func (*PackageRecordQuery) OnlyID

func (prq *PackageRecordQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*PackageRecordQuery) OnlyIDX

func (prq *PackageRecordQuery) OnlyIDX(ctx context.Context) int

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

func (*PackageRecordQuery) OnlyX

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

func (*PackageRecordQuery) Order

Order adds an order step to the query.

func (*PackageRecordQuery) QueryScan

func (prq *PackageRecordQuery) QueryScan() *ScanQuery

QueryScan chains the current query on the "scan" edge.

func (*PackageRecordQuery) QueryVulnerabilities

func (prq *PackageRecordQuery) QueryVulnerabilities() *VulnerabilityQuery

QueryVulnerabilities chains the current query on the "vulnerabilities" edge.

func (*PackageRecordQuery) Select

func (prq *PackageRecordQuery) Select(fields ...string) *PackageRecordSelect

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 {
	Type string `json:"type,omitempty"`
}

client.PackageRecord.Query().
	Select(packagerecord.FieldType).
	Scan(ctx, &v)

func (*PackageRecordQuery) Unique

func (prq *PackageRecordQuery) Unique(unique bool) *PackageRecordQuery

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 (*PackageRecordQuery) Where

Where adds a new predicate for the PackageRecordQuery builder.

func (*PackageRecordQuery) WithScan

func (prq *PackageRecordQuery) WithScan(opts ...func(*ScanQuery)) *PackageRecordQuery

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

func (*PackageRecordQuery) WithVulnerabilities

func (prq *PackageRecordQuery) WithVulnerabilities(opts ...func(*VulnerabilityQuery)) *PackageRecordQuery

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

type PackageRecordSelect

type PackageRecordSelect struct {
	*PackageRecordQuery
	// contains filtered or unexported fields
}

PackageRecordSelect is the builder for selecting fields of PackageRecord entities.

func (*PackageRecordSelect) Bool

func (prs *PackageRecordSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*PackageRecordSelect) BoolX

func (prs *PackageRecordSelect) BoolX(ctx context.Context) bool

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

func (*PackageRecordSelect) Bools

func (prs *PackageRecordSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*PackageRecordSelect) BoolsX

func (prs *PackageRecordSelect) BoolsX(ctx context.Context) []bool

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

func (*PackageRecordSelect) Float64

func (prs *PackageRecordSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*PackageRecordSelect) Float64X

func (prs *PackageRecordSelect) Float64X(ctx context.Context) float64

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

func (*PackageRecordSelect) Float64s

func (prs *PackageRecordSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*PackageRecordSelect) Float64sX

func (prs *PackageRecordSelect) Float64sX(ctx context.Context) []float64

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

func (*PackageRecordSelect) Int

func (prs *PackageRecordSelect) Int(ctx context.Context) (_ int, err error)

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

func (*PackageRecordSelect) IntX

func (prs *PackageRecordSelect) IntX(ctx context.Context) int

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

func (*PackageRecordSelect) Ints

func (prs *PackageRecordSelect) Ints(ctx context.Context) ([]int, error)

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

func (*PackageRecordSelect) IntsX

func (prs *PackageRecordSelect) IntsX(ctx context.Context) []int

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

func (*PackageRecordSelect) Scan

func (prs *PackageRecordSelect) Scan(ctx context.Context, v interface{}) error

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

func (*PackageRecordSelect) ScanX

func (prs *PackageRecordSelect) ScanX(ctx context.Context, v interface{})

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

func (*PackageRecordSelect) String

func (prs *PackageRecordSelect) String(ctx context.Context) (_ string, err error)

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

func (*PackageRecordSelect) StringX

func (prs *PackageRecordSelect) StringX(ctx context.Context) string

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

func (*PackageRecordSelect) Strings

func (prs *PackageRecordSelect) Strings(ctx context.Context) ([]string, error)

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

func (*PackageRecordSelect) StringsX

func (prs *PackageRecordSelect) StringsX(ctx context.Context) []string

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

type PackageRecordUpdate

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

PackageRecordUpdate is the builder for updating PackageRecord entities.

func (*PackageRecordUpdate) AddScan

func (pru *PackageRecordUpdate) AddScan(s ...*Scan) *PackageRecordUpdate

AddScan adds the "scan" edges to the Scan entity.

func (*PackageRecordUpdate) AddScanIDs

func (pru *PackageRecordUpdate) AddScanIDs(ids ...string) *PackageRecordUpdate

AddScanIDs adds the "scan" edge to the Scan entity by IDs.

func (*PackageRecordUpdate) AddVulnerabilities

func (pru *PackageRecordUpdate) AddVulnerabilities(v ...*Vulnerability) *PackageRecordUpdate

AddVulnerabilities adds the "vulnerabilities" edges to the Vulnerability entity.

func (*PackageRecordUpdate) AddVulnerabilityIDs

func (pru *PackageRecordUpdate) AddVulnerabilityIDs(ids ...string) *PackageRecordUpdate

AddVulnerabilityIDs adds the "vulnerabilities" edge to the Vulnerability entity by IDs.

func (*PackageRecordUpdate) ClearScan

func (pru *PackageRecordUpdate) ClearScan() *PackageRecordUpdate

ClearScan clears all "scan" edges to the Scan entity.

func (*PackageRecordUpdate) ClearVulnerabilities

func (pru *PackageRecordUpdate) ClearVulnerabilities() *PackageRecordUpdate

ClearVulnerabilities clears all "vulnerabilities" edges to the Vulnerability entity.

func (*PackageRecordUpdate) Exec

func (pru *PackageRecordUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*PackageRecordUpdate) ExecX

func (pru *PackageRecordUpdate) ExecX(ctx context.Context)

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

func (*PackageRecordUpdate) Mutation

func (pru *PackageRecordUpdate) Mutation() *PackageRecordMutation

Mutation returns the PackageRecordMutation object of the builder.

func (*PackageRecordUpdate) RemoveScan

func (pru *PackageRecordUpdate) RemoveScan(s ...*Scan) *PackageRecordUpdate

RemoveScan removes "scan" edges to Scan entities.

func (*PackageRecordUpdate) RemoveScanIDs

func (pru *PackageRecordUpdate) RemoveScanIDs(ids ...string) *PackageRecordUpdate

RemoveScanIDs removes the "scan" edge to Scan entities by IDs.

func (*PackageRecordUpdate) RemoveVulnerabilities

func (pru *PackageRecordUpdate) RemoveVulnerabilities(v ...*Vulnerability) *PackageRecordUpdate

RemoveVulnerabilities removes "vulnerabilities" edges to Vulnerability entities.

func (*PackageRecordUpdate) RemoveVulnerabilityIDs

func (pru *PackageRecordUpdate) RemoveVulnerabilityIDs(ids ...string) *PackageRecordUpdate

RemoveVulnerabilityIDs removes the "vulnerabilities" edge to Vulnerability entities by IDs.

func (*PackageRecordUpdate) Save

func (pru *PackageRecordUpdate) Save(ctx context.Context) (int, error)

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

func (*PackageRecordUpdate) SaveX

func (pru *PackageRecordUpdate) SaveX(ctx context.Context) int

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

func (*PackageRecordUpdate) SetVulnIds

func (pru *PackageRecordUpdate) SetVulnIds(s []string) *PackageRecordUpdate

SetVulnIds sets the "vuln_ids" field.

func (*PackageRecordUpdate) Where

Where appends a list predicates to the PackageRecordUpdate builder.

type PackageRecordUpdateOne

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

PackageRecordUpdateOne is the builder for updating a single PackageRecord entity.

func (*PackageRecordUpdateOne) AddScan

func (pruo *PackageRecordUpdateOne) AddScan(s ...*Scan) *PackageRecordUpdateOne

AddScan adds the "scan" edges to the Scan entity.

func (*PackageRecordUpdateOne) AddScanIDs

func (pruo *PackageRecordUpdateOne) AddScanIDs(ids ...string) *PackageRecordUpdateOne

AddScanIDs adds the "scan" edge to the Scan entity by IDs.

func (*PackageRecordUpdateOne) AddVulnerabilities

func (pruo *PackageRecordUpdateOne) AddVulnerabilities(v ...*Vulnerability) *PackageRecordUpdateOne

AddVulnerabilities adds the "vulnerabilities" edges to the Vulnerability entity.

func (*PackageRecordUpdateOne) AddVulnerabilityIDs

func (pruo *PackageRecordUpdateOne) AddVulnerabilityIDs(ids ...string) *PackageRecordUpdateOne

AddVulnerabilityIDs adds the "vulnerabilities" edge to the Vulnerability entity by IDs.

func (*PackageRecordUpdateOne) ClearScan

ClearScan clears all "scan" edges to the Scan entity.

func (*PackageRecordUpdateOne) ClearVulnerabilities

func (pruo *PackageRecordUpdateOne) ClearVulnerabilities() *PackageRecordUpdateOne

ClearVulnerabilities clears all "vulnerabilities" edges to the Vulnerability entity.

func (*PackageRecordUpdateOne) Exec

func (pruo *PackageRecordUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*PackageRecordUpdateOne) ExecX

func (pruo *PackageRecordUpdateOne) ExecX(ctx context.Context)

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

func (*PackageRecordUpdateOne) Mutation

Mutation returns the PackageRecordMutation object of the builder.

func (*PackageRecordUpdateOne) RemoveScan

func (pruo *PackageRecordUpdateOne) RemoveScan(s ...*Scan) *PackageRecordUpdateOne

RemoveScan removes "scan" edges to Scan entities.

func (*PackageRecordUpdateOne) RemoveScanIDs

func (pruo *PackageRecordUpdateOne) RemoveScanIDs(ids ...string) *PackageRecordUpdateOne

RemoveScanIDs removes the "scan" edge to Scan entities by IDs.

func (*PackageRecordUpdateOne) RemoveVulnerabilities

func (pruo *PackageRecordUpdateOne) RemoveVulnerabilities(v ...*Vulnerability) *PackageRecordUpdateOne

RemoveVulnerabilities removes "vulnerabilities" edges to Vulnerability entities.

func (*PackageRecordUpdateOne) RemoveVulnerabilityIDs

func (pruo *PackageRecordUpdateOne) RemoveVulnerabilityIDs(ids ...string) *PackageRecordUpdateOne

RemoveVulnerabilityIDs removes the "vulnerabilities" edge to Vulnerability entities by IDs.

func (*PackageRecordUpdateOne) Save

Save executes the query and returns the updated PackageRecord entity.

func (*PackageRecordUpdateOne) SaveX

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

func (*PackageRecordUpdateOne) Select

func (pruo *PackageRecordUpdateOne) Select(field string, fields ...string) *PackageRecordUpdateOne

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

func (*PackageRecordUpdateOne) SetVulnIds

func (pruo *PackageRecordUpdateOne) SetVulnIds(s []string) *PackageRecordUpdateOne

SetVulnIds sets the "vuln_ids" field.

type PackageRecordUpsert

type PackageRecordUpsert struct {
	*sql.UpdateSet
}

PackageRecordUpsert is the "OnConflict" setter.

func (*PackageRecordUpsert) SetName

SetName sets the "name" field.

func (*PackageRecordUpsert) SetSource

SetSource sets the "source" field.

func (*PackageRecordUpsert) SetType

SetType sets the "type" field.

func (*PackageRecordUpsert) SetVersion

SetVersion sets the "version" field.

func (*PackageRecordUpsert) SetVulnIds

func (u *PackageRecordUpsert) SetVulnIds(v []string) *PackageRecordUpsert

SetVulnIds sets the "vuln_ids" field.

func (*PackageRecordUpsert) UpdateName

func (u *PackageRecordUpsert) UpdateName() *PackageRecordUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*PackageRecordUpsert) UpdateSource

func (u *PackageRecordUpsert) UpdateSource() *PackageRecordUpsert

UpdateSource sets the "source" field to the value that was provided on create.

func (*PackageRecordUpsert) UpdateType

func (u *PackageRecordUpsert) UpdateType() *PackageRecordUpsert

UpdateType sets the "type" field to the value that was provided on create.

func (*PackageRecordUpsert) UpdateVersion

func (u *PackageRecordUpsert) UpdateVersion() *PackageRecordUpsert

UpdateVersion sets the "version" field to the value that was provided on create.

func (*PackageRecordUpsert) UpdateVulnIds

func (u *PackageRecordUpsert) UpdateVulnIds() *PackageRecordUpsert

UpdateVulnIds sets the "vuln_ids" field to the value that was provided on create.

type PackageRecordUpsertBulk

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

PackageRecordUpsertBulk is the builder for "upsert"-ing a bulk of PackageRecord nodes.

func (*PackageRecordUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PackageRecordUpsertBulk) Exec

Exec executes the query.

func (*PackageRecordUpsertBulk) ExecX

func (u *PackageRecordUpsertBulk) ExecX(ctx context.Context)

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

func (*PackageRecordUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PackageRecord.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PackageRecordUpsertBulk) SetName

SetName sets the "name" field.

func (*PackageRecordUpsertBulk) SetSource

SetSource sets the "source" field.

func (*PackageRecordUpsertBulk) SetType

SetType sets the "type" field.

func (*PackageRecordUpsertBulk) SetVersion

SetVersion sets the "version" field.

func (*PackageRecordUpsertBulk) SetVulnIds

SetVulnIds sets the "vuln_ids" field.

func (*PackageRecordUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the PackageRecordCreateBulk.OnConflict documentation for more info.

func (*PackageRecordUpsertBulk) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*PackageRecordUpsertBulk) UpdateNewValues

func (u *PackageRecordUpsertBulk) UpdateNewValues() *PackageRecordUpsertBulk

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.PackageRecord.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

func (*PackageRecordUpsertBulk) UpdateSource

UpdateSource sets the "source" field to the value that was provided on create.

func (*PackageRecordUpsertBulk) UpdateType

UpdateType sets the "type" field to the value that was provided on create.

func (*PackageRecordUpsertBulk) UpdateVersion

UpdateVersion sets the "version" field to the value that was provided on create.

func (*PackageRecordUpsertBulk) UpdateVulnIds

UpdateVulnIds sets the "vuln_ids" field to the value that was provided on create.

type PackageRecordUpsertOne

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

PackageRecordUpsertOne is the builder for "upsert"-ing

one PackageRecord node.

func (*PackageRecordUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*PackageRecordUpsertOne) Exec

Exec executes the query.

func (*PackageRecordUpsertOne) ExecX

func (u *PackageRecordUpsertOne) ExecX(ctx context.Context)

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

func (*PackageRecordUpsertOne) ID

func (u *PackageRecordUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*PackageRecordUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*PackageRecordUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.PackageRecord.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*PackageRecordUpsertOne) SetName

SetName sets the "name" field.

func (*PackageRecordUpsertOne) SetSource

SetSource sets the "source" field.

func (*PackageRecordUpsertOne) SetType

SetType sets the "type" field.

func (*PackageRecordUpsertOne) SetVersion

SetVersion sets the "version" field.

func (*PackageRecordUpsertOne) SetVulnIds

SetVulnIds sets the "vuln_ids" field.

func (*PackageRecordUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the PackageRecordCreate.OnConflict documentation for more info.

func (*PackageRecordUpsertOne) UpdateName

UpdateName sets the "name" field to the value that was provided on create.

func (*PackageRecordUpsertOne) UpdateNewValues

func (u *PackageRecordUpsertOne) UpdateNewValues() *PackageRecordUpsertOne

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.PackageRecord.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

func (*PackageRecordUpsertOne) UpdateSource

UpdateSource sets the "source" field to the value that was provided on create.

func (*PackageRecordUpsertOne) UpdateType

UpdateType sets the "type" field to the value that was provided on create.

func (*PackageRecordUpsertOne) UpdateVersion

func (u *PackageRecordUpsertOne) UpdateVersion() *PackageRecordUpsertOne

UpdateVersion sets the "version" field to the value that was provided on create.

func (*PackageRecordUpsertOne) UpdateVulnIds

func (u *PackageRecordUpsertOne) UpdateVulnIds() *PackageRecordUpsertOne

UpdateVulnIds sets the "vuln_ids" field to the value that was provided on create.

type PackageRecords

type PackageRecords []*PackageRecord

PackageRecords is a parsable slice of PackageRecord.

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 Repositories

type Repositories []*Repository

Repositories is a parsable slice of Repository.

type Repository

type Repository struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Owner holds the value of the "owner" field.
	Owner string `json:"owner,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// InstallID holds the value of the "install_id" field.
	InstallID int64 `json:"install_id,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// AvatarURL holds the value of the "avatar_url" field.
	AvatarURL *string `json:"avatar_url,omitempty"`
	// DefaultBranch holds the value of the "default_branch" field.
	DefaultBranch *string `json:"default_branch,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the RepositoryQuery when eager-loading is set.
	Edges RepositoryEdges `json:"edges"`
	// contains filtered or unexported fields
}

Repository is the model entity for the Repository schema.

func (*Repository) QueryLatest

func (r *Repository) QueryLatest() *ScanQuery

QueryLatest queries the "latest" edge of the Repository entity.

func (*Repository) QueryMain

func (r *Repository) QueryMain() *ScanQuery

QueryMain queries the "main" edge of the Repository entity.

func (*Repository) QueryScan

func (r *Repository) QueryScan() *ScanQuery

QueryScan queries the "scan" edge of the Repository entity.

func (*Repository) QueryStatus

func (r *Repository) QueryStatus() *VulnStatusIndexQuery

QueryStatus queries the "status" edge of the Repository entity.

func (*Repository) String

func (r *Repository) String() string

String implements the fmt.Stringer.

func (*Repository) Unwrap

func (r *Repository) Unwrap() *Repository

Unwrap unwraps the Repository 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 (*Repository) Update

func (r *Repository) Update() *RepositoryUpdateOne

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

type RepositoryClient

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

RepositoryClient is a client for the Repository schema.

func NewRepositoryClient

func NewRepositoryClient(c config) *RepositoryClient

NewRepositoryClient returns a client for the Repository from the given config.

func (*RepositoryClient) Create

func (c *RepositoryClient) Create() *RepositoryCreate

Create returns a create builder for Repository.

func (*RepositoryClient) CreateBulk

func (c *RepositoryClient) CreateBulk(builders ...*RepositoryCreate) *RepositoryCreateBulk

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

func (*RepositoryClient) Delete

func (c *RepositoryClient) Delete() *RepositoryDelete

Delete returns a delete builder for Repository.

func (*RepositoryClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*RepositoryClient) DeleteOneID

func (c *RepositoryClient) DeleteOneID(id int) *RepositoryDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*RepositoryClient) Get

func (c *RepositoryClient) Get(ctx context.Context, id int) (*Repository, error)

Get returns a Repository entity by its id.

func (*RepositoryClient) GetX

func (c *RepositoryClient) GetX(ctx context.Context, id int) *Repository

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

func (*RepositoryClient) Hooks

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

Hooks returns the client hooks.

func (*RepositoryClient) Query

func (c *RepositoryClient) Query() *RepositoryQuery

Query returns a query builder for Repository.

func (*RepositoryClient) QueryLatest

func (c *RepositoryClient) QueryLatest(r *Repository) *ScanQuery

QueryLatest queries the latest edge of a Repository.

func (*RepositoryClient) QueryMain

func (c *RepositoryClient) QueryMain(r *Repository) *ScanQuery

QueryMain queries the main edge of a Repository.

func (*RepositoryClient) QueryScan

func (c *RepositoryClient) QueryScan(r *Repository) *ScanQuery

QueryScan queries the scan edge of a Repository.

func (*RepositoryClient) QueryStatus

func (c *RepositoryClient) QueryStatus(r *Repository) *VulnStatusIndexQuery

QueryStatus queries the status edge of a Repository.

func (*RepositoryClient) Update

func (c *RepositoryClient) Update() *RepositoryUpdate

Update returns an update builder for Repository.

func (*RepositoryClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*RepositoryClient) UpdateOneID

func (c *RepositoryClient) UpdateOneID(id int) *RepositoryUpdateOne

UpdateOneID returns an update builder for the given id.

func (*RepositoryClient) Use

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

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

type RepositoryCreate

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

RepositoryCreate is the builder for creating a Repository entity.

func (*RepositoryCreate) AddMain

func (rc *RepositoryCreate) AddMain(s ...*Scan) *RepositoryCreate

AddMain adds the "main" edges to the Scan entity.

func (*RepositoryCreate) AddMainIDs

func (rc *RepositoryCreate) AddMainIDs(ids ...string) *RepositoryCreate

AddMainIDs adds the "main" edge to the Scan entity by IDs.

func (*RepositoryCreate) AddScan

func (rc *RepositoryCreate) AddScan(s ...*Scan) *RepositoryCreate

AddScan adds the "scan" edges to the Scan entity.

func (*RepositoryCreate) AddScanIDs

func (rc *RepositoryCreate) AddScanIDs(ids ...string) *RepositoryCreate

AddScanIDs adds the "scan" edge to the Scan entity by IDs.

func (*RepositoryCreate) AddStatuIDs

func (rc *RepositoryCreate) AddStatuIDs(ids ...string) *RepositoryCreate

AddStatuIDs adds the "status" edge to the VulnStatusIndex entity by IDs.

func (*RepositoryCreate) AddStatus

func (rc *RepositoryCreate) AddStatus(v ...*VulnStatusIndex) *RepositoryCreate

AddStatus adds the "status" edges to the VulnStatusIndex entity.

func (*RepositoryCreate) Exec

func (rc *RepositoryCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*RepositoryCreate) ExecX

func (rc *RepositoryCreate) ExecX(ctx context.Context)

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

func (*RepositoryCreate) Mutation

func (rc *RepositoryCreate) Mutation() *RepositoryMutation

Mutation returns the RepositoryMutation object of the builder.

func (*RepositoryCreate) OnConflict

func (rc *RepositoryCreate) OnConflict(opts ...sql.ConflictOption) *RepositoryUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Repository.Create().
	SetOwner(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.RepositoryUpsert) {
		SetOwner(v+v).
	}).
	Exec(ctx)

func (*RepositoryCreate) OnConflictColumns

func (rc *RepositoryCreate) OnConflictColumns(columns ...string) *RepositoryUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Repository.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*RepositoryCreate) Save

func (rc *RepositoryCreate) Save(ctx context.Context) (*Repository, error)

Save creates the Repository in the database.

func (*RepositoryCreate) SaveX

func (rc *RepositoryCreate) SaveX(ctx context.Context) *Repository

SaveX calls Save and panics if Save returns an error.

func (*RepositoryCreate) SetAvatarURL

func (rc *RepositoryCreate) SetAvatarURL(s string) *RepositoryCreate

SetAvatarURL sets the "avatar_url" field.

func (*RepositoryCreate) SetDefaultBranch

func (rc *RepositoryCreate) SetDefaultBranch(s string) *RepositoryCreate

SetDefaultBranch sets the "default_branch" field.

func (*RepositoryCreate) SetInstallID

func (rc *RepositoryCreate) SetInstallID(i int64) *RepositoryCreate

SetInstallID sets the "install_id" field.

func (*RepositoryCreate) SetLatest

func (rc *RepositoryCreate) SetLatest(s *Scan) *RepositoryCreate

SetLatest sets the "latest" edge to the Scan entity.

func (*RepositoryCreate) SetLatestID

func (rc *RepositoryCreate) SetLatestID(id string) *RepositoryCreate

SetLatestID sets the "latest" edge to the Scan entity by ID.

func (*RepositoryCreate) SetName

func (rc *RepositoryCreate) SetName(s string) *RepositoryCreate

SetName sets the "name" field.

func (*RepositoryCreate) SetNillableAvatarURL

func (rc *RepositoryCreate) SetNillableAvatarURL(s *string) *RepositoryCreate

SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.

func (*RepositoryCreate) SetNillableDefaultBranch

func (rc *RepositoryCreate) SetNillableDefaultBranch(s *string) *RepositoryCreate

SetNillableDefaultBranch sets the "default_branch" field if the given value is not nil.

func (*RepositoryCreate) SetNillableInstallID

func (rc *RepositoryCreate) SetNillableInstallID(i *int64) *RepositoryCreate

SetNillableInstallID sets the "install_id" field if the given value is not nil.

func (*RepositoryCreate) SetNillableLatestID

func (rc *RepositoryCreate) SetNillableLatestID(id *string) *RepositoryCreate

SetNillableLatestID sets the "latest" edge to the Scan entity by ID if the given value is not nil.

func (*RepositoryCreate) SetNillableURL

func (rc *RepositoryCreate) SetNillableURL(s *string) *RepositoryCreate

SetNillableURL sets the "url" field if the given value is not nil.

func (*RepositoryCreate) SetOwner

func (rc *RepositoryCreate) SetOwner(s string) *RepositoryCreate

SetOwner sets the "owner" field.

func (*RepositoryCreate) SetURL

func (rc *RepositoryCreate) SetURL(s string) *RepositoryCreate

SetURL sets the "url" field.

type RepositoryCreateBulk

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

RepositoryCreateBulk is the builder for creating many Repository entities in bulk.

func (*RepositoryCreateBulk) Exec

func (rcb *RepositoryCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*RepositoryCreateBulk) ExecX

func (rcb *RepositoryCreateBulk) ExecX(ctx context.Context)

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

func (*RepositoryCreateBulk) OnConflict

func (rcb *RepositoryCreateBulk) OnConflict(opts ...sql.ConflictOption) *RepositoryUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Repository.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.RepositoryUpsert) {
		SetOwner(v+v).
	}).
	Exec(ctx)

func (*RepositoryCreateBulk) OnConflictColumns

func (rcb *RepositoryCreateBulk) OnConflictColumns(columns ...string) *RepositoryUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Repository.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*RepositoryCreateBulk) Save

func (rcb *RepositoryCreateBulk) Save(ctx context.Context) ([]*Repository, error)

Save creates the Repository entities in the database.

func (*RepositoryCreateBulk) SaveX

func (rcb *RepositoryCreateBulk) SaveX(ctx context.Context) []*Repository

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

type RepositoryDelete

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

RepositoryDelete is the builder for deleting a Repository entity.

func (*RepositoryDelete) Exec

func (rd *RepositoryDelete) Exec(ctx context.Context) (int, error)

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

func (*RepositoryDelete) ExecX

func (rd *RepositoryDelete) ExecX(ctx context.Context) int

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

func (*RepositoryDelete) Where

Where appends a list predicates to the RepositoryDelete builder.

type RepositoryDeleteOne

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

RepositoryDeleteOne is the builder for deleting a single Repository entity.

func (*RepositoryDeleteOne) Exec

func (rdo *RepositoryDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*RepositoryDeleteOne) ExecX

func (rdo *RepositoryDeleteOne) ExecX(ctx context.Context)

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

type RepositoryEdges

type RepositoryEdges struct {
	// Scan holds the value of the scan edge.
	Scan []*Scan `json:"scan,omitempty"`
	// Main holds the value of the main edge.
	Main []*Scan `json:"main,omitempty"`
	// Latest holds the value of the latest edge.
	Latest *Scan `json:"latest,omitempty"`
	// Status holds the value of the status edge.
	Status []*VulnStatusIndex `json:"status,omitempty"`
	// contains filtered or unexported fields
}

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

func (RepositoryEdges) LatestOrErr

func (e RepositoryEdges) LatestOrErr() (*Scan, error)

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

func (RepositoryEdges) MainOrErr

func (e RepositoryEdges) MainOrErr() ([]*Scan, error)

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

func (RepositoryEdges) ScanOrErr

func (e RepositoryEdges) ScanOrErr() ([]*Scan, error)

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

func (RepositoryEdges) StatusOrErr

func (e RepositoryEdges) StatusOrErr() ([]*VulnStatusIndex, error)

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

type RepositoryGroupBy

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

RepositoryGroupBy is the group-by builder for Repository entities.

func (*RepositoryGroupBy) Aggregate

func (rgb *RepositoryGroupBy) Aggregate(fns ...AggregateFunc) *RepositoryGroupBy

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

func (*RepositoryGroupBy) Bool

func (rgb *RepositoryGroupBy) 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 (*RepositoryGroupBy) BoolX

func (rgb *RepositoryGroupBy) BoolX(ctx context.Context) bool

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

func (*RepositoryGroupBy) Bools

func (rgb *RepositoryGroupBy) 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 (*RepositoryGroupBy) BoolsX

func (rgb *RepositoryGroupBy) BoolsX(ctx context.Context) []bool

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

func (*RepositoryGroupBy) Float64

func (rgb *RepositoryGroupBy) 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 (*RepositoryGroupBy) Float64X

func (rgb *RepositoryGroupBy) Float64X(ctx context.Context) float64

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

func (*RepositoryGroupBy) Float64s

func (rgb *RepositoryGroupBy) 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 (*RepositoryGroupBy) Float64sX

func (rgb *RepositoryGroupBy) Float64sX(ctx context.Context) []float64

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

func (*RepositoryGroupBy) Int

func (rgb *RepositoryGroupBy) 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 (*RepositoryGroupBy) IntX

func (rgb *RepositoryGroupBy) IntX(ctx context.Context) int

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

func (*RepositoryGroupBy) Ints

func (rgb *RepositoryGroupBy) 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 (*RepositoryGroupBy) IntsX

func (rgb *RepositoryGroupBy) IntsX(ctx context.Context) []int

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

func (*RepositoryGroupBy) Scan

func (rgb *RepositoryGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*RepositoryGroupBy) ScanX

func (rgb *RepositoryGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*RepositoryGroupBy) String

func (rgb *RepositoryGroupBy) 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 (*RepositoryGroupBy) StringX

func (rgb *RepositoryGroupBy) StringX(ctx context.Context) string

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

func (*RepositoryGroupBy) Strings

func (rgb *RepositoryGroupBy) 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 (*RepositoryGroupBy) StringsX

func (rgb *RepositoryGroupBy) StringsX(ctx context.Context) []string

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

type RepositoryMutation

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

RepositoryMutation represents an operation that mutates the Repository nodes in the graph.

func (*RepositoryMutation) AddField

func (m *RepositoryMutation) 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 (*RepositoryMutation) AddInstallID

func (m *RepositoryMutation) AddInstallID(i int64)

AddInstallID adds i to the "install_id" field.

func (*RepositoryMutation) AddMainIDs

func (m *RepositoryMutation) AddMainIDs(ids ...string)

AddMainIDs adds the "main" edge to the Scan entity by ids.

func (*RepositoryMutation) AddScanIDs

func (m *RepositoryMutation) AddScanIDs(ids ...string)

AddScanIDs adds the "scan" edge to the Scan entity by ids.

func (*RepositoryMutation) AddStatuIDs

func (m *RepositoryMutation) AddStatuIDs(ids ...string)

AddStatuIDs adds the "status" edge to the VulnStatusIndex entity by ids.

func (*RepositoryMutation) AddedEdges

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

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

func (*RepositoryMutation) AddedField

func (m *RepositoryMutation) 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 (*RepositoryMutation) AddedFields

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

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

func (*RepositoryMutation) AddedIDs

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

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

func (*RepositoryMutation) AddedInstallID

func (m *RepositoryMutation) AddedInstallID() (r int64, exists bool)

AddedInstallID returns the value that was added to the "install_id" field in this mutation.

func (*RepositoryMutation) AvatarURL

func (m *RepositoryMutation) AvatarURL() (r string, exists bool)

AvatarURL returns the value of the "avatar_url" field in the mutation.

func (*RepositoryMutation) AvatarURLCleared

func (m *RepositoryMutation) AvatarURLCleared() bool

AvatarURLCleared returns if the "avatar_url" field was cleared in this mutation.

func (*RepositoryMutation) ClearAvatarURL

func (m *RepositoryMutation) ClearAvatarURL()

ClearAvatarURL clears the value of the "avatar_url" field.

func (*RepositoryMutation) ClearDefaultBranch

func (m *RepositoryMutation) ClearDefaultBranch()

ClearDefaultBranch clears the value of the "default_branch" field.

func (*RepositoryMutation) ClearEdge

func (m *RepositoryMutation) 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 (*RepositoryMutation) ClearField

func (m *RepositoryMutation) 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 (*RepositoryMutation) ClearInstallID

func (m *RepositoryMutation) ClearInstallID()

ClearInstallID clears the value of the "install_id" field.

func (*RepositoryMutation) ClearLatest

func (m *RepositoryMutation) ClearLatest()

ClearLatest clears the "latest" edge to the Scan entity.

func (*RepositoryMutation) ClearMain

func (m *RepositoryMutation) ClearMain()

ClearMain clears the "main" edge to the Scan entity.

func (*RepositoryMutation) ClearScan

func (m *RepositoryMutation) ClearScan()

ClearScan clears the "scan" edge to the Scan entity.

func (*RepositoryMutation) ClearStatus

func (m *RepositoryMutation) ClearStatus()

ClearStatus clears the "status" edge to the VulnStatusIndex entity.

func (*RepositoryMutation) ClearURL

func (m *RepositoryMutation) ClearURL()

ClearURL clears the value of the "url" field.

func (*RepositoryMutation) ClearedEdges

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

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

func (*RepositoryMutation) ClearedFields

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

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

func (RepositoryMutation) Client

func (m RepositoryMutation) 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 (*RepositoryMutation) DefaultBranch

func (m *RepositoryMutation) DefaultBranch() (r string, exists bool)

DefaultBranch returns the value of the "default_branch" field in the mutation.

func (*RepositoryMutation) DefaultBranchCleared

func (m *RepositoryMutation) DefaultBranchCleared() bool

DefaultBranchCleared returns if the "default_branch" field was cleared in this mutation.

func (*RepositoryMutation) EdgeCleared

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

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

func (*RepositoryMutation) Field

func (m *RepositoryMutation) 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 (*RepositoryMutation) FieldCleared

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

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

func (*RepositoryMutation) Fields

func (m *RepositoryMutation) 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 (*RepositoryMutation) ID

func (m *RepositoryMutation) 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 (*RepositoryMutation) InstallID

func (m *RepositoryMutation) InstallID() (r int64, exists bool)

InstallID returns the value of the "install_id" field in the mutation.

func (*RepositoryMutation) InstallIDCleared

func (m *RepositoryMutation) InstallIDCleared() bool

InstallIDCleared returns if the "install_id" field was cleared in this mutation.

func (*RepositoryMutation) LatestCleared

func (m *RepositoryMutation) LatestCleared() bool

LatestCleared reports if the "latest" edge to the Scan entity was cleared.

func (*RepositoryMutation) LatestID

func (m *RepositoryMutation) LatestID() (id string, exists bool)

LatestID returns the "latest" edge ID in the mutation.

func (*RepositoryMutation) LatestIDs

func (m *RepositoryMutation) LatestIDs() (ids []string)

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

func (*RepositoryMutation) MainCleared

func (m *RepositoryMutation) MainCleared() bool

MainCleared reports if the "main" edge to the Scan entity was cleared.

func (*RepositoryMutation) MainIDs

func (m *RepositoryMutation) MainIDs() (ids []string)

MainIDs returns the "main" edge IDs in the mutation.

func (*RepositoryMutation) Name

func (m *RepositoryMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*RepositoryMutation) OldAvatarURL

func (m *RepositoryMutation) OldAvatarURL(ctx context.Context) (v *string, err error)

OldAvatarURL returns the old "avatar_url" field's value of the Repository entity. If the Repository 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 (*RepositoryMutation) OldDefaultBranch

func (m *RepositoryMutation) OldDefaultBranch(ctx context.Context) (v *string, err error)

OldDefaultBranch returns the old "default_branch" field's value of the Repository entity. If the Repository 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 (*RepositoryMutation) OldField

func (m *RepositoryMutation) 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 (*RepositoryMutation) OldInstallID

func (m *RepositoryMutation) OldInstallID(ctx context.Context) (v int64, err error)

OldInstallID returns the old "install_id" field's value of the Repository entity. If the Repository 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 (*RepositoryMutation) OldName

func (m *RepositoryMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" field's value of the Repository entity. If the Repository 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 (*RepositoryMutation) OldOwner

func (m *RepositoryMutation) OldOwner(ctx context.Context) (v string, err error)

OldOwner returns the old "owner" field's value of the Repository entity. If the Repository 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 (*RepositoryMutation) OldURL

func (m *RepositoryMutation) OldURL(ctx context.Context) (v string, err error)

OldURL returns the old "url" field's value of the Repository entity. If the Repository 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 (*RepositoryMutation) Op

func (m *RepositoryMutation) Op() Op

Op returns the operation name.

func (*RepositoryMutation) Owner

func (m *RepositoryMutation) Owner() (r string, exists bool)

Owner returns the value of the "owner" field in the mutation.

func (*RepositoryMutation) RemoveMainIDs

func (m *RepositoryMutation) RemoveMainIDs(ids ...string)

RemoveMainIDs removes the "main" edge to the Scan entity by IDs.

func (*RepositoryMutation) RemoveScanIDs

func (m *RepositoryMutation) RemoveScanIDs(ids ...string)

RemoveScanIDs removes the "scan" edge to the Scan entity by IDs.

func (*RepositoryMutation) RemoveStatuIDs

func (m *RepositoryMutation) RemoveStatuIDs(ids ...string)

RemoveStatuIDs removes the "status" edge to the VulnStatusIndex entity by IDs.

func (*RepositoryMutation) RemovedEdges

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

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

func (*RepositoryMutation) RemovedIDs

func (m *RepositoryMutation) 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 (*RepositoryMutation) RemovedMainIDs

func (m *RepositoryMutation) RemovedMainIDs() (ids []string)

RemovedMain returns the removed IDs of the "main" edge to the Scan entity.

func (*RepositoryMutation) RemovedScanIDs

func (m *RepositoryMutation) RemovedScanIDs() (ids []string)

RemovedScan returns the removed IDs of the "scan" edge to the Scan entity.

func (*RepositoryMutation) RemovedStatusIDs

func (m *RepositoryMutation) RemovedStatusIDs() (ids []string)

RemovedStatus returns the removed IDs of the "status" edge to the VulnStatusIndex entity.

func (*RepositoryMutation) ResetAvatarURL

func (m *RepositoryMutation) ResetAvatarURL()

ResetAvatarURL resets all changes to the "avatar_url" field.

func (*RepositoryMutation) ResetDefaultBranch

func (m *RepositoryMutation) ResetDefaultBranch()

ResetDefaultBranch resets all changes to the "default_branch" field.

func (*RepositoryMutation) ResetEdge

func (m *RepositoryMutation) 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 (*RepositoryMutation) ResetField

func (m *RepositoryMutation) 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 (*RepositoryMutation) ResetInstallID

func (m *RepositoryMutation) ResetInstallID()

ResetInstallID resets all changes to the "install_id" field.

func (*RepositoryMutation) ResetLatest

func (m *RepositoryMutation) ResetLatest()

ResetLatest resets all changes to the "latest" edge.

func (*RepositoryMutation) ResetMain

func (m *RepositoryMutation) ResetMain()

ResetMain resets all changes to the "main" edge.

func (*RepositoryMutation) ResetName

func (m *RepositoryMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*RepositoryMutation) ResetOwner

func (m *RepositoryMutation) ResetOwner()

ResetOwner resets all changes to the "owner" field.

func (*RepositoryMutation) ResetScan

func (m *RepositoryMutation) ResetScan()

ResetScan resets all changes to the "scan" edge.

func (*RepositoryMutation) ResetStatus

func (m *RepositoryMutation) ResetStatus()

ResetStatus resets all changes to the "status" edge.

func (*RepositoryMutation) ResetURL

func (m *RepositoryMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*RepositoryMutation) ScanCleared

func (m *RepositoryMutation) ScanCleared() bool

ScanCleared reports if the "scan" edge to the Scan entity was cleared.

func (*RepositoryMutation) ScanIDs

func (m *RepositoryMutation) ScanIDs() (ids []string)

ScanIDs returns the "scan" edge IDs in the mutation.

func (*RepositoryMutation) SetAvatarURL

func (m *RepositoryMutation) SetAvatarURL(s string)

SetAvatarURL sets the "avatar_url" field.

func (*RepositoryMutation) SetDefaultBranch

func (m *RepositoryMutation) SetDefaultBranch(s string)

SetDefaultBranch sets the "default_branch" field.

func (*RepositoryMutation) SetField

func (m *RepositoryMutation) 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 (*RepositoryMutation) SetInstallID

func (m *RepositoryMutation) SetInstallID(i int64)

SetInstallID sets the "install_id" field.

func (*RepositoryMutation) SetLatestID

func (m *RepositoryMutation) SetLatestID(id string)

SetLatestID sets the "latest" edge to the Scan entity by id.

func (*RepositoryMutation) SetName

func (m *RepositoryMutation) SetName(s string)

SetName sets the "name" field.

func (*RepositoryMutation) SetOwner

func (m *RepositoryMutation) SetOwner(s string)

SetOwner sets the "owner" field.

func (*RepositoryMutation) SetURL

func (m *RepositoryMutation) SetURL(s string)

SetURL sets the "url" field.

func (*RepositoryMutation) StatusCleared

func (m *RepositoryMutation) StatusCleared() bool

StatusCleared reports if the "status" edge to the VulnStatusIndex entity was cleared.

func (*RepositoryMutation) StatusIDs

func (m *RepositoryMutation) StatusIDs() (ids []string)

StatusIDs returns the "status" edge IDs in the mutation.

func (RepositoryMutation) Tx

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

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

func (*RepositoryMutation) Type

func (m *RepositoryMutation) Type() string

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

func (*RepositoryMutation) URL

func (m *RepositoryMutation) URL() (r string, exists bool)

URL returns the value of the "url" field in the mutation.

func (*RepositoryMutation) URLCleared

func (m *RepositoryMutation) URLCleared() bool

URLCleared returns if the "url" field was cleared in this mutation.

func (*RepositoryMutation) Where

func (m *RepositoryMutation) Where(ps ...predicate.Repository)

Where appends a list predicates to the RepositoryMutation builder.

type RepositoryQuery

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

RepositoryQuery is the builder for querying Repository entities.

func (*RepositoryQuery) All

func (rq *RepositoryQuery) All(ctx context.Context) ([]*Repository, error)

All executes the query and returns a list of Repositories.

func (*RepositoryQuery) AllX

func (rq *RepositoryQuery) AllX(ctx context.Context) []*Repository

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

func (*RepositoryQuery) Clone

func (rq *RepositoryQuery) Clone() *RepositoryQuery

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

func (*RepositoryQuery) Count

func (rq *RepositoryQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*RepositoryQuery) CountX

func (rq *RepositoryQuery) CountX(ctx context.Context) int

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

func (*RepositoryQuery) Exist

func (rq *RepositoryQuery) Exist(ctx context.Context) (bool, error)

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

func (*RepositoryQuery) ExistX

func (rq *RepositoryQuery) ExistX(ctx context.Context) bool

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

func (*RepositoryQuery) First

func (rq *RepositoryQuery) First(ctx context.Context) (*Repository, error)

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

func (*RepositoryQuery) FirstID

func (rq *RepositoryQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*RepositoryQuery) FirstIDX

func (rq *RepositoryQuery) FirstIDX(ctx context.Context) int

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

func (*RepositoryQuery) FirstX

func (rq *RepositoryQuery) FirstX(ctx context.Context) *Repository

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

func (*RepositoryQuery) GroupBy

func (rq *RepositoryQuery) GroupBy(field string, fields ...string) *RepositoryGroupBy

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 {
	Owner string `json:"owner,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Repository.Query().
	GroupBy(repository.FieldOwner).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*RepositoryQuery) IDs

func (rq *RepositoryQuery) IDs(ctx context.Context) ([]int, error)

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

func (*RepositoryQuery) IDsX

func (rq *RepositoryQuery) IDsX(ctx context.Context) []int

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

func (*RepositoryQuery) Limit

func (rq *RepositoryQuery) Limit(limit int) *RepositoryQuery

Limit adds a limit step to the query.

func (*RepositoryQuery) Offset

func (rq *RepositoryQuery) Offset(offset int) *RepositoryQuery

Offset adds an offset step to the query.

func (*RepositoryQuery) Only

func (rq *RepositoryQuery) Only(ctx context.Context) (*Repository, error)

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

func (*RepositoryQuery) OnlyID

func (rq *RepositoryQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*RepositoryQuery) OnlyIDX

func (rq *RepositoryQuery) OnlyIDX(ctx context.Context) int

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

func (*RepositoryQuery) OnlyX

func (rq *RepositoryQuery) OnlyX(ctx context.Context) *Repository

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

func (*RepositoryQuery) Order

func (rq *RepositoryQuery) Order(o ...OrderFunc) *RepositoryQuery

Order adds an order step to the query.

func (*RepositoryQuery) QueryLatest

func (rq *RepositoryQuery) QueryLatest() *ScanQuery

QueryLatest chains the current query on the "latest" edge.

func (*RepositoryQuery) QueryMain

func (rq *RepositoryQuery) QueryMain() *ScanQuery

QueryMain chains the current query on the "main" edge.

func (*RepositoryQuery) QueryScan

func (rq *RepositoryQuery) QueryScan() *ScanQuery

QueryScan chains the current query on the "scan" edge.

func (*RepositoryQuery) QueryStatus

func (rq *RepositoryQuery) QueryStatus() *VulnStatusIndexQuery

QueryStatus chains the current query on the "status" edge.

func (*RepositoryQuery) Select

func (rq *RepositoryQuery) Select(fields ...string) *RepositorySelect

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 {
	Owner string `json:"owner,omitempty"`
}

client.Repository.Query().
	Select(repository.FieldOwner).
	Scan(ctx, &v)

func (*RepositoryQuery) Unique

func (rq *RepositoryQuery) Unique(unique bool) *RepositoryQuery

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 (*RepositoryQuery) Where

Where adds a new predicate for the RepositoryQuery builder.

func (*RepositoryQuery) WithLatest

func (rq *RepositoryQuery) WithLatest(opts ...func(*ScanQuery)) *RepositoryQuery

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

func (*RepositoryQuery) WithMain

func (rq *RepositoryQuery) WithMain(opts ...func(*ScanQuery)) *RepositoryQuery

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

func (*RepositoryQuery) WithScan

func (rq *RepositoryQuery) WithScan(opts ...func(*ScanQuery)) *RepositoryQuery

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

func (*RepositoryQuery) WithStatus

func (rq *RepositoryQuery) WithStatus(opts ...func(*VulnStatusIndexQuery)) *RepositoryQuery

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

type RepositorySelect

type RepositorySelect struct {
	*RepositoryQuery
	// contains filtered or unexported fields
}

RepositorySelect is the builder for selecting fields of Repository entities.

func (*RepositorySelect) Bool

func (rs *RepositorySelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*RepositorySelect) BoolX

func (rs *RepositorySelect) BoolX(ctx context.Context) bool

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

func (*RepositorySelect) Bools

func (rs *RepositorySelect) Bools(ctx context.Context) ([]bool, error)

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

func (*RepositorySelect) BoolsX

func (rs *RepositorySelect) BoolsX(ctx context.Context) []bool

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

func (*RepositorySelect) Float64

func (rs *RepositorySelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*RepositorySelect) Float64X

func (rs *RepositorySelect) Float64X(ctx context.Context) float64

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

func (*RepositorySelect) Float64s

func (rs *RepositorySelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*RepositorySelect) Float64sX

func (rs *RepositorySelect) Float64sX(ctx context.Context) []float64

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

func (*RepositorySelect) Int

func (rs *RepositorySelect) Int(ctx context.Context) (_ int, err error)

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

func (*RepositorySelect) IntX

func (rs *RepositorySelect) IntX(ctx context.Context) int

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

func (*RepositorySelect) Ints

func (rs *RepositorySelect) Ints(ctx context.Context) ([]int, error)

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

func (*RepositorySelect) IntsX

func (rs *RepositorySelect) IntsX(ctx context.Context) []int

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

func (*RepositorySelect) Scan

func (rs *RepositorySelect) Scan(ctx context.Context, v interface{}) error

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

func (*RepositorySelect) ScanX

func (rs *RepositorySelect) ScanX(ctx context.Context, v interface{})

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

func (*RepositorySelect) String

func (rs *RepositorySelect) String(ctx context.Context) (_ string, err error)

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

func (*RepositorySelect) StringX

func (rs *RepositorySelect) StringX(ctx context.Context) string

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

func (*RepositorySelect) Strings

func (rs *RepositorySelect) Strings(ctx context.Context) ([]string, error)

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

func (*RepositorySelect) StringsX

func (rs *RepositorySelect) StringsX(ctx context.Context) []string

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

type RepositoryUpdate

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

RepositoryUpdate is the builder for updating Repository entities.

func (*RepositoryUpdate) AddInstallID

func (ru *RepositoryUpdate) AddInstallID(i int64) *RepositoryUpdate

AddInstallID adds i to the "install_id" field.

func (*RepositoryUpdate) AddMain

func (ru *RepositoryUpdate) AddMain(s ...*Scan) *RepositoryUpdate

AddMain adds the "main" edges to the Scan entity.

func (*RepositoryUpdate) AddMainIDs

func (ru *RepositoryUpdate) AddMainIDs(ids ...string) *RepositoryUpdate

AddMainIDs adds the "main" edge to the Scan entity by IDs.

func (*RepositoryUpdate) AddScan

func (ru *RepositoryUpdate) AddScan(s ...*Scan) *RepositoryUpdate

AddScan adds the "scan" edges to the Scan entity.

func (*RepositoryUpdate) AddScanIDs

func (ru *RepositoryUpdate) AddScanIDs(ids ...string) *RepositoryUpdate

AddScanIDs adds the "scan" edge to the Scan entity by IDs.

func (*RepositoryUpdate) AddStatuIDs

func (ru *RepositoryUpdate) AddStatuIDs(ids ...string) *RepositoryUpdate

AddStatuIDs adds the "status" edge to the VulnStatusIndex entity by IDs.

func (*RepositoryUpdate) AddStatus

func (ru *RepositoryUpdate) AddStatus(v ...*VulnStatusIndex) *RepositoryUpdate

AddStatus adds the "status" edges to the VulnStatusIndex entity.

func (*RepositoryUpdate) ClearAvatarURL

func (ru *RepositoryUpdate) ClearAvatarURL() *RepositoryUpdate

ClearAvatarURL clears the value of the "avatar_url" field.

func (*RepositoryUpdate) ClearDefaultBranch

func (ru *RepositoryUpdate) ClearDefaultBranch() *RepositoryUpdate

ClearDefaultBranch clears the value of the "default_branch" field.

func (*RepositoryUpdate) ClearInstallID

func (ru *RepositoryUpdate) ClearInstallID() *RepositoryUpdate

ClearInstallID clears the value of the "install_id" field.

func (*RepositoryUpdate) ClearLatest

func (ru *RepositoryUpdate) ClearLatest() *RepositoryUpdate

ClearLatest clears the "latest" edge to the Scan entity.

func (*RepositoryUpdate) ClearMain

func (ru *RepositoryUpdate) ClearMain() *RepositoryUpdate

ClearMain clears all "main" edges to the Scan entity.

func (*RepositoryUpdate) ClearScan

func (ru *RepositoryUpdate) ClearScan() *RepositoryUpdate

ClearScan clears all "scan" edges to the Scan entity.

func (*RepositoryUpdate) ClearStatus

func (ru *RepositoryUpdate) ClearStatus() *RepositoryUpdate

ClearStatus clears all "status" edges to the VulnStatusIndex entity.

func (*RepositoryUpdate) ClearURL

func (ru *RepositoryUpdate) ClearURL() *RepositoryUpdate

ClearURL clears the value of the "url" field.

func (*RepositoryUpdate) Exec

func (ru *RepositoryUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*RepositoryUpdate) ExecX

func (ru *RepositoryUpdate) ExecX(ctx context.Context)

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

func (*RepositoryUpdate) Mutation

func (ru *RepositoryUpdate) Mutation() *RepositoryMutation

Mutation returns the RepositoryMutation object of the builder.

func (*RepositoryUpdate) RemoveMain

func (ru *RepositoryUpdate) RemoveMain(s ...*Scan) *RepositoryUpdate

RemoveMain removes "main" edges to Scan entities.

func (*RepositoryUpdate) RemoveMainIDs

func (ru *RepositoryUpdate) RemoveMainIDs(ids ...string) *RepositoryUpdate

RemoveMainIDs removes the "main" edge to Scan entities by IDs.

func (*RepositoryUpdate) RemoveScan

func (ru *RepositoryUpdate) RemoveScan(s ...*Scan) *RepositoryUpdate

RemoveScan removes "scan" edges to Scan entities.

func (*RepositoryUpdate) RemoveScanIDs

func (ru *RepositoryUpdate) RemoveScanIDs(ids ...string) *RepositoryUpdate

RemoveScanIDs removes the "scan" edge to Scan entities by IDs.

func (*RepositoryUpdate) RemoveStatuIDs

func (ru *RepositoryUpdate) RemoveStatuIDs(ids ...string) *RepositoryUpdate

RemoveStatuIDs removes the "status" edge to VulnStatusIndex entities by IDs.

func (*RepositoryUpdate) RemoveStatus

func (ru *RepositoryUpdate) RemoveStatus(v ...*VulnStatusIndex) *RepositoryUpdate

RemoveStatus removes "status" edges to VulnStatusIndex entities.

func (*RepositoryUpdate) Save

func (ru *RepositoryUpdate) Save(ctx context.Context) (int, error)

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

func (*RepositoryUpdate) SaveX

func (ru *RepositoryUpdate) SaveX(ctx context.Context) int

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

func (*RepositoryUpdate) SetAvatarURL

func (ru *RepositoryUpdate) SetAvatarURL(s string) *RepositoryUpdate

SetAvatarURL sets the "avatar_url" field.

func (*RepositoryUpdate) SetDefaultBranch

func (ru *RepositoryUpdate) SetDefaultBranch(s string) *RepositoryUpdate

SetDefaultBranch sets the "default_branch" field.

func (*RepositoryUpdate) SetInstallID

func (ru *RepositoryUpdate) SetInstallID(i int64) *RepositoryUpdate

SetInstallID sets the "install_id" field.

func (*RepositoryUpdate) SetLatest

func (ru *RepositoryUpdate) SetLatest(s *Scan) *RepositoryUpdate

SetLatest sets the "latest" edge to the Scan entity.

func (*RepositoryUpdate) SetLatestID

func (ru *RepositoryUpdate) SetLatestID(id string) *RepositoryUpdate

SetLatestID sets the "latest" edge to the Scan entity by ID.

func (*RepositoryUpdate) SetName

func (ru *RepositoryUpdate) SetName(s string) *RepositoryUpdate

SetName sets the "name" field.

func (*RepositoryUpdate) SetNillableAvatarURL

func (ru *RepositoryUpdate) SetNillableAvatarURL(s *string) *RepositoryUpdate

SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.

func (*RepositoryUpdate) SetNillableDefaultBranch

func (ru *RepositoryUpdate) SetNillableDefaultBranch(s *string) *RepositoryUpdate

SetNillableDefaultBranch sets the "default_branch" field if the given value is not nil.

func (*RepositoryUpdate) SetNillableInstallID

func (ru *RepositoryUpdate) SetNillableInstallID(i *int64) *RepositoryUpdate

SetNillableInstallID sets the "install_id" field if the given value is not nil.

func (*RepositoryUpdate) SetNillableLatestID

func (ru *RepositoryUpdate) SetNillableLatestID(id *string) *RepositoryUpdate

SetNillableLatestID sets the "latest" edge to the Scan entity by ID if the given value is not nil.

func (*RepositoryUpdate) SetNillableURL

func (ru *RepositoryUpdate) SetNillableURL(s *string) *RepositoryUpdate

SetNillableURL sets the "url" field if the given value is not nil.

func (*RepositoryUpdate) SetOwner

func (ru *RepositoryUpdate) SetOwner(s string) *RepositoryUpdate

SetOwner sets the "owner" field.

func (*RepositoryUpdate) SetURL

func (ru *RepositoryUpdate) SetURL(s string) *RepositoryUpdate

SetURL sets the "url" field.

func (*RepositoryUpdate) Where

Where appends a list predicates to the RepositoryUpdate builder.

type RepositoryUpdateOne

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

RepositoryUpdateOne is the builder for updating a single Repository entity.

func (*RepositoryUpdateOne) AddInstallID

func (ruo *RepositoryUpdateOne) AddInstallID(i int64) *RepositoryUpdateOne

AddInstallID adds i to the "install_id" field.

func (*RepositoryUpdateOne) AddMain

func (ruo *RepositoryUpdateOne) AddMain(s ...*Scan) *RepositoryUpdateOne

AddMain adds the "main" edges to the Scan entity.

func (*RepositoryUpdateOne) AddMainIDs

func (ruo *RepositoryUpdateOne) AddMainIDs(ids ...string) *RepositoryUpdateOne

AddMainIDs adds the "main" edge to the Scan entity by IDs.

func (*RepositoryUpdateOne) AddScan

func (ruo *RepositoryUpdateOne) AddScan(s ...*Scan) *RepositoryUpdateOne

AddScan adds the "scan" edges to the Scan entity.

func (*RepositoryUpdateOne) AddScanIDs

func (ruo *RepositoryUpdateOne) AddScanIDs(ids ...string) *RepositoryUpdateOne

AddScanIDs adds the "scan" edge to the Scan entity by IDs.

func (*RepositoryUpdateOne) AddStatuIDs

func (ruo *RepositoryUpdateOne) AddStatuIDs(ids ...string) *RepositoryUpdateOne

AddStatuIDs adds the "status" edge to the VulnStatusIndex entity by IDs.

func (*RepositoryUpdateOne) AddStatus

AddStatus adds the "status" edges to the VulnStatusIndex entity.

func (*RepositoryUpdateOne) ClearAvatarURL

func (ruo *RepositoryUpdateOne) ClearAvatarURL() *RepositoryUpdateOne

ClearAvatarURL clears the value of the "avatar_url" field.

func (*RepositoryUpdateOne) ClearDefaultBranch

func (ruo *RepositoryUpdateOne) ClearDefaultBranch() *RepositoryUpdateOne

ClearDefaultBranch clears the value of the "default_branch" field.

func (*RepositoryUpdateOne) ClearInstallID

func (ruo *RepositoryUpdateOne) ClearInstallID() *RepositoryUpdateOne

ClearInstallID clears the value of the "install_id" field.

func (*RepositoryUpdateOne) ClearLatest

func (ruo *RepositoryUpdateOne) ClearLatest() *RepositoryUpdateOne

ClearLatest clears the "latest" edge to the Scan entity.

func (*RepositoryUpdateOne) ClearMain

func (ruo *RepositoryUpdateOne) ClearMain() *RepositoryUpdateOne

ClearMain clears all "main" edges to the Scan entity.

func (*RepositoryUpdateOne) ClearScan

func (ruo *RepositoryUpdateOne) ClearScan() *RepositoryUpdateOne

ClearScan clears all "scan" edges to the Scan entity.

func (*RepositoryUpdateOne) ClearStatus

func (ruo *RepositoryUpdateOne) ClearStatus() *RepositoryUpdateOne

ClearStatus clears all "status" edges to the VulnStatusIndex entity.

func (*RepositoryUpdateOne) ClearURL

func (ruo *RepositoryUpdateOne) ClearURL() *RepositoryUpdateOne

ClearURL clears the value of the "url" field.

func (*RepositoryUpdateOne) Exec

func (ruo *RepositoryUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*RepositoryUpdateOne) ExecX

func (ruo *RepositoryUpdateOne) ExecX(ctx context.Context)

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

func (*RepositoryUpdateOne) Mutation

func (ruo *RepositoryUpdateOne) Mutation() *RepositoryMutation

Mutation returns the RepositoryMutation object of the builder.

func (*RepositoryUpdateOne) RemoveMain

func (ruo *RepositoryUpdateOne) RemoveMain(s ...*Scan) *RepositoryUpdateOne

RemoveMain removes "main" edges to Scan entities.

func (*RepositoryUpdateOne) RemoveMainIDs

func (ruo *RepositoryUpdateOne) RemoveMainIDs(ids ...string) *RepositoryUpdateOne

RemoveMainIDs removes the "main" edge to Scan entities by IDs.

func (*RepositoryUpdateOne) RemoveScan

func (ruo *RepositoryUpdateOne) RemoveScan(s ...*Scan) *RepositoryUpdateOne

RemoveScan removes "scan" edges to Scan entities.

func (*RepositoryUpdateOne) RemoveScanIDs

func (ruo *RepositoryUpdateOne) RemoveScanIDs(ids ...string) *RepositoryUpdateOne

RemoveScanIDs removes the "scan" edge to Scan entities by IDs.

func (*RepositoryUpdateOne) RemoveStatuIDs

func (ruo *RepositoryUpdateOne) RemoveStatuIDs(ids ...string) *RepositoryUpdateOne

RemoveStatuIDs removes the "status" edge to VulnStatusIndex entities by IDs.

func (*RepositoryUpdateOne) RemoveStatus

func (ruo *RepositoryUpdateOne) RemoveStatus(v ...*VulnStatusIndex) *RepositoryUpdateOne

RemoveStatus removes "status" edges to VulnStatusIndex entities.

func (*RepositoryUpdateOne) Save

func (ruo *RepositoryUpdateOne) Save(ctx context.Context) (*Repository, error)

Save executes the query and returns the updated Repository entity.

func (*RepositoryUpdateOne) SaveX

func (ruo *RepositoryUpdateOne) SaveX(ctx context.Context) *Repository

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

func (*RepositoryUpdateOne) Select

func (ruo *RepositoryUpdateOne) Select(field string, fields ...string) *RepositoryUpdateOne

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

func (*RepositoryUpdateOne) SetAvatarURL

func (ruo *RepositoryUpdateOne) SetAvatarURL(s string) *RepositoryUpdateOne

SetAvatarURL sets the "avatar_url" field.

func (*RepositoryUpdateOne) SetDefaultBranch

func (ruo *RepositoryUpdateOne) SetDefaultBranch(s string) *RepositoryUpdateOne

SetDefaultBranch sets the "default_branch" field.

func (*RepositoryUpdateOne) SetInstallID

func (ruo *RepositoryUpdateOne) SetInstallID(i int64) *RepositoryUpdateOne

SetInstallID sets the "install_id" field.

func (*RepositoryUpdateOne) SetLatest

func (ruo *RepositoryUpdateOne) SetLatest(s *Scan) *RepositoryUpdateOne

SetLatest sets the "latest" edge to the Scan entity.

func (*RepositoryUpdateOne) SetLatestID

func (ruo *RepositoryUpdateOne) SetLatestID(id string) *RepositoryUpdateOne

SetLatestID sets the "latest" edge to the Scan entity by ID.

func (*RepositoryUpdateOne) SetName

SetName sets the "name" field.

func (*RepositoryUpdateOne) SetNillableAvatarURL

func (ruo *RepositoryUpdateOne) SetNillableAvatarURL(s *string) *RepositoryUpdateOne

SetNillableAvatarURL sets the "avatar_url" field if the given value is not nil.

func (*RepositoryUpdateOne) SetNillableDefaultBranch

func (ruo *RepositoryUpdateOne) SetNillableDefaultBranch(s *string) *RepositoryUpdateOne

SetNillableDefaultBranch sets the "default_branch" field if the given value is not nil.

func (*RepositoryUpdateOne) SetNillableInstallID

func (ruo *RepositoryUpdateOne) SetNillableInstallID(i *int64) *RepositoryUpdateOne

SetNillableInstallID sets the "install_id" field if the given value is not nil.

func (*RepositoryUpdateOne) SetNillableLatestID

func (ruo *RepositoryUpdateOne) SetNillableLatestID(id *string) *RepositoryUpdateOne

SetNillableLatestID sets the "latest" edge to the Scan entity by ID if the given value is not nil.

func (*RepositoryUpdateOne) SetNillableURL

func (ruo *RepositoryUpdateOne) SetNillableURL(s *string) *RepositoryUpdateOne

SetNillableURL sets the "url" field if the given value is not nil.

func (*RepositoryUpdateOne) SetOwner

SetOwner sets the "owner" field.

func (*RepositoryUpdateOne) SetURL

SetURL sets the "url" field.

type RepositoryUpsert

type RepositoryUpsert struct {
	*sql.UpdateSet
}

RepositoryUpsert is the "OnConflict" setter.

func (*RepositoryUpsert) ClearAvatarURL

func (u *RepositoryUpsert) ClearAvatarURL() *RepositoryUpsert

ClearAvatarURL clears the value of the "avatar_url" field.

func (*RepositoryUpsert) ClearDefaultBranch

func (u *RepositoryUpsert) ClearDefaultBranch() *RepositoryUpsert

ClearDefaultBranch clears the value of the "default_branch" field.

func (*RepositoryUpsert) ClearInstallID

func (u *RepositoryUpsert) ClearInstallID() *RepositoryUpsert

ClearInstallID clears the value of the "install_id" field.

func (*RepositoryUpsert) ClearURL

func (u *RepositoryUpsert) ClearURL() *RepositoryUpsert

ClearURL clears the value of the "url" field.

func (*RepositoryUpsert) SetAvatarURL

func (u *RepositoryUpsert) SetAvatarURL(v string) *RepositoryUpsert

SetAvatarURL sets the "avatar_url" field.

func (*RepositoryUpsert) SetDefaultBranch

func (u *RepositoryUpsert) SetDefaultBranch(v string) *RepositoryUpsert

SetDefaultBranch sets the "default_branch" field.

func (*RepositoryUpsert) SetInstallID

func (u *RepositoryUpsert) SetInstallID(v int64) *RepositoryUpsert

SetInstallID sets the "install_id" field.

func (*RepositoryUpsert) SetName

func (u *RepositoryUpsert) SetName(v string) *RepositoryUpsert

SetName sets the "name" field.

func (*RepositoryUpsert) SetOwner

func (u *RepositoryUpsert) SetOwner(v string) *RepositoryUpsert

SetOwner sets the "owner" field.

func (*RepositoryUpsert) SetURL

SetURL sets the "url" field.

func (*RepositoryUpsert) UpdateAvatarURL

func (u *RepositoryUpsert) UpdateAvatarURL() *RepositoryUpsert

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*RepositoryUpsert) UpdateDefaultBranch

func (u *RepositoryUpsert) UpdateDefaultBranch() *RepositoryUpsert

UpdateDefaultBranch sets the "default_branch" field to the value that was provided on create.

func (*RepositoryUpsert) UpdateInstallID

func (u *RepositoryUpsert) UpdateInstallID() *RepositoryUpsert

UpdateInstallID sets the "install_id" field to the value that was provided on create.

func (*RepositoryUpsert) UpdateName

func (u *RepositoryUpsert) UpdateName() *RepositoryUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*RepositoryUpsert) UpdateOwner

func (u *RepositoryUpsert) UpdateOwner() *RepositoryUpsert

UpdateOwner sets the "owner" field to the value that was provided on create.

func (*RepositoryUpsert) UpdateURL

func (u *RepositoryUpsert) UpdateURL() *RepositoryUpsert

UpdateURL sets the "url" field to the value that was provided on create.

type RepositoryUpsertBulk

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

RepositoryUpsertBulk is the builder for "upsert"-ing a bulk of Repository nodes.

func (*RepositoryUpsertBulk) ClearAvatarURL

func (u *RepositoryUpsertBulk) ClearAvatarURL() *RepositoryUpsertBulk

ClearAvatarURL clears the value of the "avatar_url" field.

func (*RepositoryUpsertBulk) ClearDefaultBranch

func (u *RepositoryUpsertBulk) ClearDefaultBranch() *RepositoryUpsertBulk

ClearDefaultBranch clears the value of the "default_branch" field.

func (*RepositoryUpsertBulk) ClearInstallID

func (u *RepositoryUpsertBulk) ClearInstallID() *RepositoryUpsertBulk

ClearInstallID clears the value of the "install_id" field.

func (*RepositoryUpsertBulk) ClearURL

ClearURL clears the value of the "url" field.

func (*RepositoryUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RepositoryUpsertBulk) Exec

Exec executes the query.

func (*RepositoryUpsertBulk) ExecX

func (u *RepositoryUpsertBulk) ExecX(ctx context.Context)

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

func (*RepositoryUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Repository.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*RepositoryUpsertBulk) SetAvatarURL

func (u *RepositoryUpsertBulk) SetAvatarURL(v string) *RepositoryUpsertBulk

SetAvatarURL sets the "avatar_url" field.

func (*RepositoryUpsertBulk) SetDefaultBranch

func (u *RepositoryUpsertBulk) SetDefaultBranch(v string) *RepositoryUpsertBulk

SetDefaultBranch sets the "default_branch" field.

func (*RepositoryUpsertBulk) SetInstallID

func (u *RepositoryUpsertBulk) SetInstallID(v int64) *RepositoryUpsertBulk

SetInstallID sets the "install_id" field.

func (*RepositoryUpsertBulk) SetName

SetName sets the "name" field.

func (*RepositoryUpsertBulk) SetOwner

SetOwner sets the "owner" field.

func (*RepositoryUpsertBulk) SetURL

SetURL sets the "url" field.

func (*RepositoryUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the RepositoryCreateBulk.OnConflict documentation for more info.

func (*RepositoryUpsertBulk) UpdateAvatarURL

func (u *RepositoryUpsertBulk) UpdateAvatarURL() *RepositoryUpsertBulk

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*RepositoryUpsertBulk) UpdateDefaultBranch

func (u *RepositoryUpsertBulk) UpdateDefaultBranch() *RepositoryUpsertBulk

UpdateDefaultBranch sets the "default_branch" field to the value that was provided on create.

func (*RepositoryUpsertBulk) UpdateInstallID

func (u *RepositoryUpsertBulk) UpdateInstallID() *RepositoryUpsertBulk

UpdateInstallID sets the "install_id" field to the value that was provided on create.

func (*RepositoryUpsertBulk) UpdateName

func (u *RepositoryUpsertBulk) UpdateName() *RepositoryUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*RepositoryUpsertBulk) UpdateNewValues

func (u *RepositoryUpsertBulk) UpdateNewValues() *RepositoryUpsertBulk

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.Repository.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

func (*RepositoryUpsertBulk) UpdateOwner

func (u *RepositoryUpsertBulk) UpdateOwner() *RepositoryUpsertBulk

UpdateOwner sets the "owner" field to the value that was provided on create.

func (*RepositoryUpsertBulk) UpdateURL

UpdateURL sets the "url" field to the value that was provided on create.

type RepositoryUpsertOne

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

RepositoryUpsertOne is the builder for "upsert"-ing

one Repository node.

func (*RepositoryUpsertOne) ClearAvatarURL

func (u *RepositoryUpsertOne) ClearAvatarURL() *RepositoryUpsertOne

ClearAvatarURL clears the value of the "avatar_url" field.

func (*RepositoryUpsertOne) ClearDefaultBranch

func (u *RepositoryUpsertOne) ClearDefaultBranch() *RepositoryUpsertOne

ClearDefaultBranch clears the value of the "default_branch" field.

func (*RepositoryUpsertOne) ClearInstallID

func (u *RepositoryUpsertOne) ClearInstallID() *RepositoryUpsertOne

ClearInstallID clears the value of the "install_id" field.

func (*RepositoryUpsertOne) ClearURL

ClearURL clears the value of the "url" field.

func (*RepositoryUpsertOne) DoNothing

func (u *RepositoryUpsertOne) DoNothing() *RepositoryUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*RepositoryUpsertOne) Exec

Exec executes the query.

func (*RepositoryUpsertOne) ExecX

func (u *RepositoryUpsertOne) ExecX(ctx context.Context)

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

func (*RepositoryUpsertOne) ID

func (u *RepositoryUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*RepositoryUpsertOne) IDX

func (u *RepositoryUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*RepositoryUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Repository.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*RepositoryUpsertOne) SetAvatarURL

func (u *RepositoryUpsertOne) SetAvatarURL(v string) *RepositoryUpsertOne

SetAvatarURL sets the "avatar_url" field.

func (*RepositoryUpsertOne) SetDefaultBranch

func (u *RepositoryUpsertOne) SetDefaultBranch(v string) *RepositoryUpsertOne

SetDefaultBranch sets the "default_branch" field.

func (*RepositoryUpsertOne) SetInstallID

func (u *RepositoryUpsertOne) SetInstallID(v int64) *RepositoryUpsertOne

SetInstallID sets the "install_id" field.

func (*RepositoryUpsertOne) SetName

SetName sets the "name" field.

func (*RepositoryUpsertOne) SetOwner

SetOwner sets the "owner" field.

func (*RepositoryUpsertOne) SetURL

SetURL sets the "url" field.

func (*RepositoryUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the RepositoryCreate.OnConflict documentation for more info.

func (*RepositoryUpsertOne) UpdateAvatarURL

func (u *RepositoryUpsertOne) UpdateAvatarURL() *RepositoryUpsertOne

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*RepositoryUpsertOne) UpdateDefaultBranch

func (u *RepositoryUpsertOne) UpdateDefaultBranch() *RepositoryUpsertOne

UpdateDefaultBranch sets the "default_branch" field to the value that was provided on create.

func (*RepositoryUpsertOne) UpdateInstallID

func (u *RepositoryUpsertOne) UpdateInstallID() *RepositoryUpsertOne

UpdateInstallID sets the "install_id" field to the value that was provided on create.

func (*RepositoryUpsertOne) UpdateName

func (u *RepositoryUpsertOne) UpdateName() *RepositoryUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*RepositoryUpsertOne) UpdateNewValues

func (u *RepositoryUpsertOne) UpdateNewValues() *RepositoryUpsertOne

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.Repository.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

func (*RepositoryUpsertOne) UpdateOwner

func (u *RepositoryUpsertOne) UpdateOwner() *RepositoryUpsertOne

UpdateOwner sets the "owner" field to the value that was provided on create.

func (*RepositoryUpsertOne) UpdateURL

func (u *RepositoryUpsertOne) UpdateURL() *RepositoryUpsertOne

UpdateURL sets the "url" field to the value that was provided on create.

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(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 Rollbacker method.

type Scan

type Scan struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Branch holds the value of the "branch" field.
	Branch string `json:"branch,omitempty"`
	// CommitID holds the value of the "commit_id" field.
	CommitID string `json:"commit_id,omitempty"`
	// RequestedAt holds the value of the "requested_at" field.
	RequestedAt int64 `json:"requested_at,omitempty"`
	// ScannedAt holds the value of the "scanned_at" field.
	ScannedAt int64 `json:"scanned_at,omitempty"`
	// CheckID holds the value of the "check_id" field.
	CheckID int64 `json:"check_id,omitempty"`
	// PullRequestTarget holds the value of the "pull_request_target" field.
	PullRequestTarget string `json:"pull_request_target,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the ScanQuery when eager-loading is set.
	Edges ScanEdges `json:"edges"`
	// contains filtered or unexported fields
}

Scan is the model entity for the Scan schema.

func (*Scan) QueryPackages

func (s *Scan) QueryPackages() *PackageRecordQuery

QueryPackages queries the "packages" edge of the Scan entity.

func (*Scan) QueryRepository

func (s *Scan) QueryRepository() *RepositoryQuery

QueryRepository queries the "repository" edge of the Scan entity.

func (*Scan) String

func (s *Scan) String() string

String implements the fmt.Stringer.

func (*Scan) Unwrap

func (s *Scan) Unwrap() *Scan

Unwrap unwraps the Scan 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 (*Scan) Update

func (s *Scan) Update() *ScanUpdateOne

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

type ScanClient

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

ScanClient is a client for the Scan schema.

func NewScanClient

func NewScanClient(c config) *ScanClient

NewScanClient returns a client for the Scan from the given config.

func (*ScanClient) Create

func (c *ScanClient) Create() *ScanCreate

Create returns a create builder for Scan.

func (*ScanClient) CreateBulk

func (c *ScanClient) CreateBulk(builders ...*ScanCreate) *ScanCreateBulk

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

func (*ScanClient) Delete

func (c *ScanClient) Delete() *ScanDelete

Delete returns a delete builder for Scan.

func (*ScanClient) DeleteOne

func (c *ScanClient) DeleteOne(s *Scan) *ScanDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*ScanClient) DeleteOneID

func (c *ScanClient) DeleteOneID(id string) *ScanDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*ScanClient) Get

func (c *ScanClient) Get(ctx context.Context, id string) (*Scan, error)

Get returns a Scan entity by its id.

func (*ScanClient) GetX

func (c *ScanClient) GetX(ctx context.Context, id string) *Scan

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

func (*ScanClient) Hooks

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

Hooks returns the client hooks.

func (*ScanClient) Query

func (c *ScanClient) Query() *ScanQuery

Query returns a query builder for Scan.

func (*ScanClient) QueryPackages

func (c *ScanClient) QueryPackages(s *Scan) *PackageRecordQuery

QueryPackages queries the packages edge of a Scan.

func (*ScanClient) QueryRepository

func (c *ScanClient) QueryRepository(s *Scan) *RepositoryQuery

QueryRepository queries the repository edge of a Scan.

func (*ScanClient) Update

func (c *ScanClient) Update() *ScanUpdate

Update returns an update builder for Scan.

func (*ScanClient) UpdateOne

func (c *ScanClient) UpdateOne(s *Scan) *ScanUpdateOne

UpdateOne returns an update builder for the given entity.

func (*ScanClient) UpdateOneID

func (c *ScanClient) UpdateOneID(id string) *ScanUpdateOne

UpdateOneID returns an update builder for the given id.

func (*ScanClient) Use

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

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

type ScanCreate

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

ScanCreate is the builder for creating a Scan entity.

func (*ScanCreate) AddPackageIDs

func (sc *ScanCreate) AddPackageIDs(ids ...int) *ScanCreate

AddPackageIDs adds the "packages" edge to the PackageRecord entity by IDs.

func (*ScanCreate) AddPackages

func (sc *ScanCreate) AddPackages(p ...*PackageRecord) *ScanCreate

AddPackages adds the "packages" edges to the PackageRecord entity.

func (*ScanCreate) AddRepository

func (sc *ScanCreate) AddRepository(r ...*Repository) *ScanCreate

AddRepository adds the "repository" edges to the Repository entity.

func (*ScanCreate) AddRepositoryIDs

func (sc *ScanCreate) AddRepositoryIDs(ids ...int) *ScanCreate

AddRepositoryIDs adds the "repository" edge to the Repository entity by IDs.

func (*ScanCreate) Exec

func (sc *ScanCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*ScanCreate) ExecX

func (sc *ScanCreate) ExecX(ctx context.Context)

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

func (*ScanCreate) Mutation

func (sc *ScanCreate) Mutation() *ScanMutation

Mutation returns the ScanMutation object of the builder.

func (*ScanCreate) OnConflict

func (sc *ScanCreate) OnConflict(opts ...sql.ConflictOption) *ScanUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Scan.Create().
	SetBranch(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ScanUpsert) {
		SetBranch(v+v).
	}).
	Exec(ctx)

func (*ScanCreate) OnConflictColumns

func (sc *ScanCreate) OnConflictColumns(columns ...string) *ScanUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Scan.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*ScanCreate) Save

func (sc *ScanCreate) Save(ctx context.Context) (*Scan, error)

Save creates the Scan in the database.

func (*ScanCreate) SaveX

func (sc *ScanCreate) SaveX(ctx context.Context) *Scan

SaveX calls Save and panics if Save returns an error.

func (*ScanCreate) SetBranch

func (sc *ScanCreate) SetBranch(s string) *ScanCreate

SetBranch sets the "branch" field.

func (*ScanCreate) SetCheckID

func (sc *ScanCreate) SetCheckID(i int64) *ScanCreate

SetCheckID sets the "check_id" field.

func (*ScanCreate) SetCommitID

func (sc *ScanCreate) SetCommitID(s string) *ScanCreate

SetCommitID sets the "commit_id" field.

func (*ScanCreate) SetID

func (sc *ScanCreate) SetID(s string) *ScanCreate

SetID sets the "id" field.

func (*ScanCreate) SetNillableCheckID

func (sc *ScanCreate) SetNillableCheckID(i *int64) *ScanCreate

SetNillableCheckID sets the "check_id" field if the given value is not nil.

func (*ScanCreate) SetNillablePullRequestTarget

func (sc *ScanCreate) SetNillablePullRequestTarget(s *string) *ScanCreate

SetNillablePullRequestTarget sets the "pull_request_target" field if the given value is not nil.

func (*ScanCreate) SetPullRequestTarget

func (sc *ScanCreate) SetPullRequestTarget(s string) *ScanCreate

SetPullRequestTarget sets the "pull_request_target" field.

func (*ScanCreate) SetRequestedAt

func (sc *ScanCreate) SetRequestedAt(i int64) *ScanCreate

SetRequestedAt sets the "requested_at" field.

func (*ScanCreate) SetScannedAt

func (sc *ScanCreate) SetScannedAt(i int64) *ScanCreate

SetScannedAt sets the "scanned_at" field.

type ScanCreateBulk

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

ScanCreateBulk is the builder for creating many Scan entities in bulk.

func (*ScanCreateBulk) Exec

func (scb *ScanCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ScanCreateBulk) ExecX

func (scb *ScanCreateBulk) ExecX(ctx context.Context)

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

func (*ScanCreateBulk) OnConflict

func (scb *ScanCreateBulk) OnConflict(opts ...sql.ConflictOption) *ScanUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Scan.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.ScanUpsert) {
		SetBranch(v+v).
	}).
	Exec(ctx)

func (*ScanCreateBulk) OnConflictColumns

func (scb *ScanCreateBulk) OnConflictColumns(columns ...string) *ScanUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Scan.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*ScanCreateBulk) Save

func (scb *ScanCreateBulk) Save(ctx context.Context) ([]*Scan, error)

Save creates the Scan entities in the database.

func (*ScanCreateBulk) SaveX

func (scb *ScanCreateBulk) SaveX(ctx context.Context) []*Scan

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

type ScanDelete

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

ScanDelete is the builder for deleting a Scan entity.

func (*ScanDelete) Exec

func (sd *ScanDelete) Exec(ctx context.Context) (int, error)

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

func (*ScanDelete) ExecX

func (sd *ScanDelete) ExecX(ctx context.Context) int

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

func (*ScanDelete) Where

func (sd *ScanDelete) Where(ps ...predicate.Scan) *ScanDelete

Where appends a list predicates to the ScanDelete builder.

type ScanDeleteOne

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

ScanDeleteOne is the builder for deleting a single Scan entity.

func (*ScanDeleteOne) Exec

func (sdo *ScanDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*ScanDeleteOne) ExecX

func (sdo *ScanDeleteOne) ExecX(ctx context.Context)

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

type ScanEdges

type ScanEdges struct {
	// Repository holds the value of the repository edge.
	Repository []*Repository `json:"repository,omitempty"`
	// Packages holds the value of the packages edge.
	Packages []*PackageRecord `json:"packages,omitempty"`
	// contains filtered or unexported fields
}

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

func (ScanEdges) PackagesOrErr

func (e ScanEdges) PackagesOrErr() ([]*PackageRecord, error)

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

func (ScanEdges) RepositoryOrErr

func (e ScanEdges) RepositoryOrErr() ([]*Repository, error)

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

type ScanGroupBy

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

ScanGroupBy is the group-by builder for Scan entities.

func (*ScanGroupBy) Aggregate

func (sgb *ScanGroupBy) Aggregate(fns ...AggregateFunc) *ScanGroupBy

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

func (*ScanGroupBy) Bool

func (sgb *ScanGroupBy) 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 (*ScanGroupBy) BoolX

func (sgb *ScanGroupBy) BoolX(ctx context.Context) bool

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

func (*ScanGroupBy) Bools

func (sgb *ScanGroupBy) 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 (*ScanGroupBy) BoolsX

func (sgb *ScanGroupBy) BoolsX(ctx context.Context) []bool

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

func (*ScanGroupBy) Float64

func (sgb *ScanGroupBy) 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 (*ScanGroupBy) Float64X

func (sgb *ScanGroupBy) Float64X(ctx context.Context) float64

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

func (*ScanGroupBy) Float64s

func (sgb *ScanGroupBy) 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 (*ScanGroupBy) Float64sX

func (sgb *ScanGroupBy) Float64sX(ctx context.Context) []float64

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

func (*ScanGroupBy) Int

func (sgb *ScanGroupBy) 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 (*ScanGroupBy) IntX

func (sgb *ScanGroupBy) IntX(ctx context.Context) int

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

func (*ScanGroupBy) Ints

func (sgb *ScanGroupBy) 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 (*ScanGroupBy) IntsX

func (sgb *ScanGroupBy) IntsX(ctx context.Context) []int

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

func (*ScanGroupBy) Scan

func (sgb *ScanGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*ScanGroupBy) ScanX

func (sgb *ScanGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*ScanGroupBy) String

func (sgb *ScanGroupBy) 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 (*ScanGroupBy) StringX

func (sgb *ScanGroupBy) StringX(ctx context.Context) string

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

func (*ScanGroupBy) Strings

func (sgb *ScanGroupBy) 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 (*ScanGroupBy) StringsX

func (sgb *ScanGroupBy) StringsX(ctx context.Context) []string

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

type ScanMutation

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

ScanMutation represents an operation that mutates the Scan nodes in the graph.

func (*ScanMutation) AddCheckID

func (m *ScanMutation) AddCheckID(i int64)

AddCheckID adds i to the "check_id" field.

func (*ScanMutation) AddField

func (m *ScanMutation) 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 (*ScanMutation) AddPackageIDs

func (m *ScanMutation) AddPackageIDs(ids ...int)

AddPackageIDs adds the "packages" edge to the PackageRecord entity by ids.

func (*ScanMutation) AddRepositoryIDs

func (m *ScanMutation) AddRepositoryIDs(ids ...int)

AddRepositoryIDs adds the "repository" edge to the Repository entity by ids.

func (*ScanMutation) AddRequestedAt

func (m *ScanMutation) AddRequestedAt(i int64)

AddRequestedAt adds i to the "requested_at" field.

func (*ScanMutation) AddScannedAt

func (m *ScanMutation) AddScannedAt(i int64)

AddScannedAt adds i to the "scanned_at" field.

func (*ScanMutation) AddedCheckID

func (m *ScanMutation) AddedCheckID() (r int64, exists bool)

AddedCheckID returns the value that was added to the "check_id" field in this mutation.

func (*ScanMutation) AddedEdges

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

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

func (*ScanMutation) AddedField

func (m *ScanMutation) 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 (*ScanMutation) AddedFields

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

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

func (*ScanMutation) AddedIDs

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

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

func (*ScanMutation) AddedRequestedAt

func (m *ScanMutation) AddedRequestedAt() (r int64, exists bool)

AddedRequestedAt returns the value that was added to the "requested_at" field in this mutation.

func (*ScanMutation) AddedScannedAt

func (m *ScanMutation) AddedScannedAt() (r int64, exists bool)

AddedScannedAt returns the value that was added to the "scanned_at" field in this mutation.

func (*ScanMutation) Branch

func (m *ScanMutation) Branch() (r string, exists bool)

Branch returns the value of the "branch" field in the mutation.

func (*ScanMutation) CheckID

func (m *ScanMutation) CheckID() (r int64, exists bool)

CheckID returns the value of the "check_id" field in the mutation.

func (*ScanMutation) CheckIDCleared

func (m *ScanMutation) CheckIDCleared() bool

CheckIDCleared returns if the "check_id" field was cleared in this mutation.

func (*ScanMutation) ClearCheckID

func (m *ScanMutation) ClearCheckID()

ClearCheckID clears the value of the "check_id" field.

func (*ScanMutation) ClearEdge

func (m *ScanMutation) 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 (*ScanMutation) ClearField

func (m *ScanMutation) 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 (*ScanMutation) ClearPackages

func (m *ScanMutation) ClearPackages()

ClearPackages clears the "packages" edge to the PackageRecord entity.

func (*ScanMutation) ClearPullRequestTarget

func (m *ScanMutation) ClearPullRequestTarget()

ClearPullRequestTarget clears the value of the "pull_request_target" field.

func (*ScanMutation) ClearRepository

func (m *ScanMutation) ClearRepository()

ClearRepository clears the "repository" edge to the Repository entity.

func (*ScanMutation) ClearedEdges

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

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

func (*ScanMutation) ClearedFields

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

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

func (ScanMutation) Client

func (m ScanMutation) 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 (*ScanMutation) CommitID

func (m *ScanMutation) CommitID() (r string, exists bool)

CommitID returns the value of the "commit_id" field in the mutation.

func (*ScanMutation) EdgeCleared

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

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

func (*ScanMutation) Field

func (m *ScanMutation) 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 (*ScanMutation) FieldCleared

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

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

func (*ScanMutation) Fields

func (m *ScanMutation) 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 (*ScanMutation) ID

func (m *ScanMutation) 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 (*ScanMutation) OldBranch

func (m *ScanMutation) OldBranch(ctx context.Context) (v string, err error)

OldBranch returns the old "branch" field's value of the Scan entity. If the Scan 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 (*ScanMutation) OldCheckID

func (m *ScanMutation) OldCheckID(ctx context.Context) (v int64, err error)

OldCheckID returns the old "check_id" field's value of the Scan entity. If the Scan 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 (*ScanMutation) OldCommitID

func (m *ScanMutation) OldCommitID(ctx context.Context) (v string, err error)

OldCommitID returns the old "commit_id" field's value of the Scan entity. If the Scan 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 (*ScanMutation) OldField

func (m *ScanMutation) 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 (*ScanMutation) OldPullRequestTarget

func (m *ScanMutation) OldPullRequestTarget(ctx context.Context) (v string, err error)

OldPullRequestTarget returns the old "pull_request_target" field's value of the Scan entity. If the Scan 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 (*ScanMutation) OldRequestedAt

func (m *ScanMutation) OldRequestedAt(ctx context.Context) (v int64, err error)

OldRequestedAt returns the old "requested_at" field's value of the Scan entity. If the Scan 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 (*ScanMutation) OldScannedAt

func (m *ScanMutation) OldScannedAt(ctx context.Context) (v int64, err error)

OldScannedAt returns the old "scanned_at" field's value of the Scan entity. If the Scan 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 (*ScanMutation) Op

func (m *ScanMutation) Op() Op

Op returns the operation name.

func (*ScanMutation) PackagesCleared

func (m *ScanMutation) PackagesCleared() bool

PackagesCleared reports if the "packages" edge to the PackageRecord entity was cleared.

func (*ScanMutation) PackagesIDs

func (m *ScanMutation) PackagesIDs() (ids []int)

PackagesIDs returns the "packages" edge IDs in the mutation.

func (*ScanMutation) PullRequestTarget

func (m *ScanMutation) PullRequestTarget() (r string, exists bool)

PullRequestTarget returns the value of the "pull_request_target" field in the mutation.

func (*ScanMutation) PullRequestTargetCleared

func (m *ScanMutation) PullRequestTargetCleared() bool

PullRequestTargetCleared returns if the "pull_request_target" field was cleared in this mutation.

func (*ScanMutation) RemovePackageIDs

func (m *ScanMutation) RemovePackageIDs(ids ...int)

RemovePackageIDs removes the "packages" edge to the PackageRecord entity by IDs.

func (*ScanMutation) RemoveRepositoryIDs

func (m *ScanMutation) RemoveRepositoryIDs(ids ...int)

RemoveRepositoryIDs removes the "repository" edge to the Repository entity by IDs.

func (*ScanMutation) RemovedEdges

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

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

func (*ScanMutation) RemovedIDs

func (m *ScanMutation) 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 (*ScanMutation) RemovedPackagesIDs

func (m *ScanMutation) RemovedPackagesIDs() (ids []int)

RemovedPackages returns the removed IDs of the "packages" edge to the PackageRecord entity.

func (*ScanMutation) RemovedRepositoryIDs

func (m *ScanMutation) RemovedRepositoryIDs() (ids []int)

RemovedRepository returns the removed IDs of the "repository" edge to the Repository entity.

func (*ScanMutation) RepositoryCleared

func (m *ScanMutation) RepositoryCleared() bool

RepositoryCleared reports if the "repository" edge to the Repository entity was cleared.

func (*ScanMutation) RepositoryIDs

func (m *ScanMutation) RepositoryIDs() (ids []int)

RepositoryIDs returns the "repository" edge IDs in the mutation.

func (*ScanMutation) RequestedAt

func (m *ScanMutation) RequestedAt() (r int64, exists bool)

RequestedAt returns the value of the "requested_at" field in the mutation.

func (*ScanMutation) ResetBranch

func (m *ScanMutation) ResetBranch()

ResetBranch resets all changes to the "branch" field.

func (*ScanMutation) ResetCheckID

func (m *ScanMutation) ResetCheckID()

ResetCheckID resets all changes to the "check_id" field.

func (*ScanMutation) ResetCommitID

func (m *ScanMutation) ResetCommitID()

ResetCommitID resets all changes to the "commit_id" field.

func (*ScanMutation) ResetEdge

func (m *ScanMutation) 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 (*ScanMutation) ResetField

func (m *ScanMutation) 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 (*ScanMutation) ResetPackages

func (m *ScanMutation) ResetPackages()

ResetPackages resets all changes to the "packages" edge.

func (*ScanMutation) ResetPullRequestTarget

func (m *ScanMutation) ResetPullRequestTarget()

ResetPullRequestTarget resets all changes to the "pull_request_target" field.

func (*ScanMutation) ResetRepository

func (m *ScanMutation) ResetRepository()

ResetRepository resets all changes to the "repository" edge.

func (*ScanMutation) ResetRequestedAt

func (m *ScanMutation) ResetRequestedAt()

ResetRequestedAt resets all changes to the "requested_at" field.

func (*ScanMutation) ResetScannedAt

func (m *ScanMutation) ResetScannedAt()

ResetScannedAt resets all changes to the "scanned_at" field.

func (*ScanMutation) ScannedAt

func (m *ScanMutation) ScannedAt() (r int64, exists bool)

ScannedAt returns the value of the "scanned_at" field in the mutation.

func (*ScanMutation) SetBranch

func (m *ScanMutation) SetBranch(s string)

SetBranch sets the "branch" field.

func (*ScanMutation) SetCheckID

func (m *ScanMutation) SetCheckID(i int64)

SetCheckID sets the "check_id" field.

func (*ScanMutation) SetCommitID

func (m *ScanMutation) SetCommitID(s string)

SetCommitID sets the "commit_id" field.

func (*ScanMutation) SetField

func (m *ScanMutation) 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 (*ScanMutation) SetID

func (m *ScanMutation) SetID(id string)

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

func (*ScanMutation) SetPullRequestTarget

func (m *ScanMutation) SetPullRequestTarget(s string)

SetPullRequestTarget sets the "pull_request_target" field.

func (*ScanMutation) SetRequestedAt

func (m *ScanMutation) SetRequestedAt(i int64)

SetRequestedAt sets the "requested_at" field.

func (*ScanMutation) SetScannedAt

func (m *ScanMutation) SetScannedAt(i int64)

SetScannedAt sets the "scanned_at" field.

func (ScanMutation) Tx

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

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

func (*ScanMutation) Type

func (m *ScanMutation) Type() string

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

func (*ScanMutation) Where

func (m *ScanMutation) Where(ps ...predicate.Scan)

Where appends a list predicates to the ScanMutation builder.

type ScanQuery

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

ScanQuery is the builder for querying Scan entities.

func (*ScanQuery) All

func (sq *ScanQuery) All(ctx context.Context) ([]*Scan, error)

All executes the query and returns a list of Scans.

func (*ScanQuery) AllX

func (sq *ScanQuery) AllX(ctx context.Context) []*Scan

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

func (*ScanQuery) Clone

func (sq *ScanQuery) Clone() *ScanQuery

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

func (*ScanQuery) Count

func (sq *ScanQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*ScanQuery) CountX

func (sq *ScanQuery) CountX(ctx context.Context) int

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

func (*ScanQuery) Exist

func (sq *ScanQuery) Exist(ctx context.Context) (bool, error)

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

func (*ScanQuery) ExistX

func (sq *ScanQuery) ExistX(ctx context.Context) bool

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

func (*ScanQuery) First

func (sq *ScanQuery) First(ctx context.Context) (*Scan, error)

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

func (*ScanQuery) FirstID

func (sq *ScanQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*ScanQuery) FirstIDX

func (sq *ScanQuery) FirstIDX(ctx context.Context) string

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

func (*ScanQuery) FirstX

func (sq *ScanQuery) FirstX(ctx context.Context) *Scan

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

func (*ScanQuery) GroupBy

func (sq *ScanQuery) GroupBy(field string, fields ...string) *ScanGroupBy

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 {
	Branch string `json:"branch,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Scan.Query().
	GroupBy(scan.FieldBranch).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*ScanQuery) IDs

func (sq *ScanQuery) IDs(ctx context.Context) ([]string, error)

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

func (*ScanQuery) IDsX

func (sq *ScanQuery) IDsX(ctx context.Context) []string

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

func (*ScanQuery) Limit

func (sq *ScanQuery) Limit(limit int) *ScanQuery

Limit adds a limit step to the query.

func (*ScanQuery) Offset

func (sq *ScanQuery) Offset(offset int) *ScanQuery

Offset adds an offset step to the query.

func (*ScanQuery) Only

func (sq *ScanQuery) Only(ctx context.Context) (*Scan, error)

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

func (*ScanQuery) OnlyID

func (sq *ScanQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*ScanQuery) OnlyIDX

func (sq *ScanQuery) OnlyIDX(ctx context.Context) string

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

func (*ScanQuery) OnlyX

func (sq *ScanQuery) OnlyX(ctx context.Context) *Scan

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

func (*ScanQuery) Order

func (sq *ScanQuery) Order(o ...OrderFunc) *ScanQuery

Order adds an order step to the query.

func (*ScanQuery) QueryPackages

func (sq *ScanQuery) QueryPackages() *PackageRecordQuery

QueryPackages chains the current query on the "packages" edge.

func (*ScanQuery) QueryRepository

func (sq *ScanQuery) QueryRepository() *RepositoryQuery

QueryRepository chains the current query on the "repository" edge.

func (*ScanQuery) Select

func (sq *ScanQuery) Select(fields ...string) *ScanSelect

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 {
	Branch string `json:"branch,omitempty"`
}

client.Scan.Query().
	Select(scan.FieldBranch).
	Scan(ctx, &v)

func (*ScanQuery) Unique

func (sq *ScanQuery) Unique(unique bool) *ScanQuery

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 (*ScanQuery) Where

func (sq *ScanQuery) Where(ps ...predicate.Scan) *ScanQuery

Where adds a new predicate for the ScanQuery builder.

func (*ScanQuery) WithPackages

func (sq *ScanQuery) WithPackages(opts ...func(*PackageRecordQuery)) *ScanQuery

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

func (*ScanQuery) WithRepository

func (sq *ScanQuery) WithRepository(opts ...func(*RepositoryQuery)) *ScanQuery

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

type ScanSelect

type ScanSelect struct {
	*ScanQuery
	// contains filtered or unexported fields
}

ScanSelect is the builder for selecting fields of Scan entities.

func (*ScanSelect) Bool

func (ss *ScanSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*ScanSelect) BoolX

func (ss *ScanSelect) BoolX(ctx context.Context) bool

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

func (*ScanSelect) Bools

func (ss *ScanSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*ScanSelect) BoolsX

func (ss *ScanSelect) BoolsX(ctx context.Context) []bool

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

func (*ScanSelect) Float64

func (ss *ScanSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*ScanSelect) Float64X

func (ss *ScanSelect) Float64X(ctx context.Context) float64

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

func (*ScanSelect) Float64s

func (ss *ScanSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*ScanSelect) Float64sX

func (ss *ScanSelect) Float64sX(ctx context.Context) []float64

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

func (*ScanSelect) Int

func (ss *ScanSelect) Int(ctx context.Context) (_ int, err error)

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

func (*ScanSelect) IntX

func (ss *ScanSelect) IntX(ctx context.Context) int

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

func (*ScanSelect) Ints

func (ss *ScanSelect) Ints(ctx context.Context) ([]int, error)

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

func (*ScanSelect) IntsX

func (ss *ScanSelect) IntsX(ctx context.Context) []int

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

func (*ScanSelect) Scan

func (ss *ScanSelect) Scan(ctx context.Context, v interface{}) error

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

func (*ScanSelect) ScanX

func (ss *ScanSelect) ScanX(ctx context.Context, v interface{})

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

func (*ScanSelect) String

func (ss *ScanSelect) String(ctx context.Context) (_ string, err error)

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

func (*ScanSelect) StringX

func (ss *ScanSelect) StringX(ctx context.Context) string

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

func (*ScanSelect) Strings

func (ss *ScanSelect) Strings(ctx context.Context) ([]string, error)

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

func (*ScanSelect) StringsX

func (ss *ScanSelect) StringsX(ctx context.Context) []string

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

type ScanUpdate

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

ScanUpdate is the builder for updating Scan entities.

func (*ScanUpdate) AddCheckID

func (su *ScanUpdate) AddCheckID(i int64) *ScanUpdate

AddCheckID adds i to the "check_id" field.

func (*ScanUpdate) AddPackageIDs

func (su *ScanUpdate) AddPackageIDs(ids ...int) *ScanUpdate

AddPackageIDs adds the "packages" edge to the PackageRecord entity by IDs.

func (*ScanUpdate) AddPackages

func (su *ScanUpdate) AddPackages(p ...*PackageRecord) *ScanUpdate

AddPackages adds the "packages" edges to the PackageRecord entity.

func (*ScanUpdate) AddRepository

func (su *ScanUpdate) AddRepository(r ...*Repository) *ScanUpdate

AddRepository adds the "repository" edges to the Repository entity.

func (*ScanUpdate) AddRepositoryIDs

func (su *ScanUpdate) AddRepositoryIDs(ids ...int) *ScanUpdate

AddRepositoryIDs adds the "repository" edge to the Repository entity by IDs.

func (*ScanUpdate) AddRequestedAt

func (su *ScanUpdate) AddRequestedAt(i int64) *ScanUpdate

AddRequestedAt adds i to the "requested_at" field.

func (*ScanUpdate) AddScannedAt

func (su *ScanUpdate) AddScannedAt(i int64) *ScanUpdate

AddScannedAt adds i to the "scanned_at" field.

func (*ScanUpdate) ClearCheckID

func (su *ScanUpdate) ClearCheckID() *ScanUpdate

ClearCheckID clears the value of the "check_id" field.

func (*ScanUpdate) ClearPackages

func (su *ScanUpdate) ClearPackages() *ScanUpdate

ClearPackages clears all "packages" edges to the PackageRecord entity.

func (*ScanUpdate) ClearPullRequestTarget

func (su *ScanUpdate) ClearPullRequestTarget() *ScanUpdate

ClearPullRequestTarget clears the value of the "pull_request_target" field.

func (*ScanUpdate) ClearRepository

func (su *ScanUpdate) ClearRepository() *ScanUpdate

ClearRepository clears all "repository" edges to the Repository entity.

func (*ScanUpdate) Exec

func (su *ScanUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*ScanUpdate) ExecX

func (su *ScanUpdate) ExecX(ctx context.Context)

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

func (*ScanUpdate) Mutation

func (su *ScanUpdate) Mutation() *ScanMutation

Mutation returns the ScanMutation object of the builder.

func (*ScanUpdate) RemovePackageIDs

func (su *ScanUpdate) RemovePackageIDs(ids ...int) *ScanUpdate

RemovePackageIDs removes the "packages" edge to PackageRecord entities by IDs.

func (*ScanUpdate) RemovePackages

func (su *ScanUpdate) RemovePackages(p ...*PackageRecord) *ScanUpdate

RemovePackages removes "packages" edges to PackageRecord entities.

func (*ScanUpdate) RemoveRepository

func (su *ScanUpdate) RemoveRepository(r ...*Repository) *ScanUpdate

RemoveRepository removes "repository" edges to Repository entities.

func (*ScanUpdate) RemoveRepositoryIDs

func (su *ScanUpdate) RemoveRepositoryIDs(ids ...int) *ScanUpdate

RemoveRepositoryIDs removes the "repository" edge to Repository entities by IDs.

func (*ScanUpdate) Save

func (su *ScanUpdate) Save(ctx context.Context) (int, error)

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

func (*ScanUpdate) SaveX

func (su *ScanUpdate) SaveX(ctx context.Context) int

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

func (*ScanUpdate) SetCheckID

func (su *ScanUpdate) SetCheckID(i int64) *ScanUpdate

SetCheckID sets the "check_id" field.

func (*ScanUpdate) SetNillableCheckID

func (su *ScanUpdate) SetNillableCheckID(i *int64) *ScanUpdate

SetNillableCheckID sets the "check_id" field if the given value is not nil.

func (*ScanUpdate) SetNillablePullRequestTarget

func (su *ScanUpdate) SetNillablePullRequestTarget(s *string) *ScanUpdate

SetNillablePullRequestTarget sets the "pull_request_target" field if the given value is not nil.

func (*ScanUpdate) SetPullRequestTarget

func (su *ScanUpdate) SetPullRequestTarget(s string) *ScanUpdate

SetPullRequestTarget sets the "pull_request_target" field.

func (*ScanUpdate) SetRequestedAt

func (su *ScanUpdate) SetRequestedAt(i int64) *ScanUpdate

SetRequestedAt sets the "requested_at" field.

func (*ScanUpdate) SetScannedAt

func (su *ScanUpdate) SetScannedAt(i int64) *ScanUpdate

SetScannedAt sets the "scanned_at" field.

func (*ScanUpdate) Where

func (su *ScanUpdate) Where(ps ...predicate.Scan) *ScanUpdate

Where appends a list predicates to the ScanUpdate builder.

type ScanUpdateOne

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

ScanUpdateOne is the builder for updating a single Scan entity.

func (*ScanUpdateOne) AddCheckID

func (suo *ScanUpdateOne) AddCheckID(i int64) *ScanUpdateOne

AddCheckID adds i to the "check_id" field.

func (*ScanUpdateOne) AddPackageIDs

func (suo *ScanUpdateOne) AddPackageIDs(ids ...int) *ScanUpdateOne

AddPackageIDs adds the "packages" edge to the PackageRecord entity by IDs.

func (*ScanUpdateOne) AddPackages

func (suo *ScanUpdateOne) AddPackages(p ...*PackageRecord) *ScanUpdateOne

AddPackages adds the "packages" edges to the PackageRecord entity.

func (*ScanUpdateOne) AddRepository

func (suo *ScanUpdateOne) AddRepository(r ...*Repository) *ScanUpdateOne

AddRepository adds the "repository" edges to the Repository entity.

func (*ScanUpdateOne) AddRepositoryIDs

func (suo *ScanUpdateOne) AddRepositoryIDs(ids ...int) *ScanUpdateOne

AddRepositoryIDs adds the "repository" edge to the Repository entity by IDs.

func (*ScanUpdateOne) AddRequestedAt

func (suo *ScanUpdateOne) AddRequestedAt(i int64) *ScanUpdateOne

AddRequestedAt adds i to the "requested_at" field.

func (*ScanUpdateOne) AddScannedAt

func (suo *ScanUpdateOne) AddScannedAt(i int64) *ScanUpdateOne

AddScannedAt adds i to the "scanned_at" field.

func (*ScanUpdateOne) ClearCheckID

func (suo *ScanUpdateOne) ClearCheckID() *ScanUpdateOne

ClearCheckID clears the value of the "check_id" field.

func (*ScanUpdateOne) ClearPackages

func (suo *ScanUpdateOne) ClearPackages() *ScanUpdateOne

ClearPackages clears all "packages" edges to the PackageRecord entity.

func (*ScanUpdateOne) ClearPullRequestTarget

func (suo *ScanUpdateOne) ClearPullRequestTarget() *ScanUpdateOne

ClearPullRequestTarget clears the value of the "pull_request_target" field.

func (*ScanUpdateOne) ClearRepository

func (suo *ScanUpdateOne) ClearRepository() *ScanUpdateOne

ClearRepository clears all "repository" edges to the Repository entity.

func (*ScanUpdateOne) Exec

func (suo *ScanUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*ScanUpdateOne) ExecX

func (suo *ScanUpdateOne) ExecX(ctx context.Context)

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

func (*ScanUpdateOne) Mutation

func (suo *ScanUpdateOne) Mutation() *ScanMutation

Mutation returns the ScanMutation object of the builder.

func (*ScanUpdateOne) RemovePackageIDs

func (suo *ScanUpdateOne) RemovePackageIDs(ids ...int) *ScanUpdateOne

RemovePackageIDs removes the "packages" edge to PackageRecord entities by IDs.

func (*ScanUpdateOne) RemovePackages

func (suo *ScanUpdateOne) RemovePackages(p ...*PackageRecord) *ScanUpdateOne

RemovePackages removes "packages" edges to PackageRecord entities.

func (*ScanUpdateOne) RemoveRepository

func (suo *ScanUpdateOne) RemoveRepository(r ...*Repository) *ScanUpdateOne

RemoveRepository removes "repository" edges to Repository entities.

func (*ScanUpdateOne) RemoveRepositoryIDs

func (suo *ScanUpdateOne) RemoveRepositoryIDs(ids ...int) *ScanUpdateOne

RemoveRepositoryIDs removes the "repository" edge to Repository entities by IDs.

func (*ScanUpdateOne) Save

func (suo *ScanUpdateOne) Save(ctx context.Context) (*Scan, error)

Save executes the query and returns the updated Scan entity.

func (*ScanUpdateOne) SaveX

func (suo *ScanUpdateOne) SaveX(ctx context.Context) *Scan

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

func (*ScanUpdateOne) Select

func (suo *ScanUpdateOne) Select(field string, fields ...string) *ScanUpdateOne

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

func (*ScanUpdateOne) SetCheckID

func (suo *ScanUpdateOne) SetCheckID(i int64) *ScanUpdateOne

SetCheckID sets the "check_id" field.

func (*ScanUpdateOne) SetNillableCheckID

func (suo *ScanUpdateOne) SetNillableCheckID(i *int64) *ScanUpdateOne

SetNillableCheckID sets the "check_id" field if the given value is not nil.

func (*ScanUpdateOne) SetNillablePullRequestTarget

func (suo *ScanUpdateOne) SetNillablePullRequestTarget(s *string) *ScanUpdateOne

SetNillablePullRequestTarget sets the "pull_request_target" field if the given value is not nil.

func (*ScanUpdateOne) SetPullRequestTarget

func (suo *ScanUpdateOne) SetPullRequestTarget(s string) *ScanUpdateOne

SetPullRequestTarget sets the "pull_request_target" field.

func (*ScanUpdateOne) SetRequestedAt

func (suo *ScanUpdateOne) SetRequestedAt(i int64) *ScanUpdateOne

SetRequestedAt sets the "requested_at" field.

func (*ScanUpdateOne) SetScannedAt

func (suo *ScanUpdateOne) SetScannedAt(i int64) *ScanUpdateOne

SetScannedAt sets the "scanned_at" field.

type ScanUpsert

type ScanUpsert struct {
	*sql.UpdateSet
}

ScanUpsert is the "OnConflict" setter.

func (*ScanUpsert) ClearCheckID

func (u *ScanUpsert) ClearCheckID() *ScanUpsert

ClearCheckID clears the value of the "check_id" field.

func (*ScanUpsert) ClearPullRequestTarget

func (u *ScanUpsert) ClearPullRequestTarget() *ScanUpsert

ClearPullRequestTarget clears the value of the "pull_request_target" field.

func (*ScanUpsert) SetBranch

func (u *ScanUpsert) SetBranch(v string) *ScanUpsert

SetBranch sets the "branch" field.

func (*ScanUpsert) SetCheckID

func (u *ScanUpsert) SetCheckID(v int64) *ScanUpsert

SetCheckID sets the "check_id" field.

func (*ScanUpsert) SetCommitID

func (u *ScanUpsert) SetCommitID(v string) *ScanUpsert

SetCommitID sets the "commit_id" field.

func (*ScanUpsert) SetPullRequestTarget

func (u *ScanUpsert) SetPullRequestTarget(v string) *ScanUpsert

SetPullRequestTarget sets the "pull_request_target" field.

func (*ScanUpsert) SetRequestedAt

func (u *ScanUpsert) SetRequestedAt(v int64) *ScanUpsert

SetRequestedAt sets the "requested_at" field.

func (*ScanUpsert) SetScannedAt

func (u *ScanUpsert) SetScannedAt(v int64) *ScanUpsert

SetScannedAt sets the "scanned_at" field.

func (*ScanUpsert) UpdateBranch

func (u *ScanUpsert) UpdateBranch() *ScanUpsert

UpdateBranch sets the "branch" field to the value that was provided on create.

func (*ScanUpsert) UpdateCheckID

func (u *ScanUpsert) UpdateCheckID() *ScanUpsert

UpdateCheckID sets the "check_id" field to the value that was provided on create.

func (*ScanUpsert) UpdateCommitID

func (u *ScanUpsert) UpdateCommitID() *ScanUpsert

UpdateCommitID sets the "commit_id" field to the value that was provided on create.

func (*ScanUpsert) UpdatePullRequestTarget

func (u *ScanUpsert) UpdatePullRequestTarget() *ScanUpsert

UpdatePullRequestTarget sets the "pull_request_target" field to the value that was provided on create.

func (*ScanUpsert) UpdateRequestedAt

func (u *ScanUpsert) UpdateRequestedAt() *ScanUpsert

UpdateRequestedAt sets the "requested_at" field to the value that was provided on create.

func (*ScanUpsert) UpdateScannedAt

func (u *ScanUpsert) UpdateScannedAt() *ScanUpsert

UpdateScannedAt sets the "scanned_at" field to the value that was provided on create.

type ScanUpsertBulk

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

ScanUpsertBulk is the builder for "upsert"-ing a bulk of Scan nodes.

func (*ScanUpsertBulk) ClearCheckID

func (u *ScanUpsertBulk) ClearCheckID() *ScanUpsertBulk

ClearCheckID clears the value of the "check_id" field.

func (*ScanUpsertBulk) ClearPullRequestTarget

func (u *ScanUpsertBulk) ClearPullRequestTarget() *ScanUpsertBulk

ClearPullRequestTarget clears the value of the "pull_request_target" field.

func (*ScanUpsertBulk) DoNothing

func (u *ScanUpsertBulk) DoNothing() *ScanUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ScanUpsertBulk) Exec

func (u *ScanUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*ScanUpsertBulk) ExecX

func (u *ScanUpsertBulk) ExecX(ctx context.Context)

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

func (*ScanUpsertBulk) Ignore

func (u *ScanUpsertBulk) Ignore() *ScanUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Scan.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ScanUpsertBulk) SetBranch

func (u *ScanUpsertBulk) SetBranch(v string) *ScanUpsertBulk

SetBranch sets the "branch" field.

func (*ScanUpsertBulk) SetCheckID

func (u *ScanUpsertBulk) SetCheckID(v int64) *ScanUpsertBulk

SetCheckID sets the "check_id" field.

func (*ScanUpsertBulk) SetCommitID

func (u *ScanUpsertBulk) SetCommitID(v string) *ScanUpsertBulk

SetCommitID sets the "commit_id" field.

func (*ScanUpsertBulk) SetPullRequestTarget

func (u *ScanUpsertBulk) SetPullRequestTarget(v string) *ScanUpsertBulk

SetPullRequestTarget sets the "pull_request_target" field.

func (*ScanUpsertBulk) SetRequestedAt

func (u *ScanUpsertBulk) SetRequestedAt(v int64) *ScanUpsertBulk

SetRequestedAt sets the "requested_at" field.

func (*ScanUpsertBulk) SetScannedAt

func (u *ScanUpsertBulk) SetScannedAt(v int64) *ScanUpsertBulk

SetScannedAt sets the "scanned_at" field.

func (*ScanUpsertBulk) Update

func (u *ScanUpsertBulk) Update(set func(*ScanUpsert)) *ScanUpsertBulk

Update allows overriding fields `UPDATE` values. See the ScanCreateBulk.OnConflict documentation for more info.

func (*ScanUpsertBulk) UpdateBranch

func (u *ScanUpsertBulk) UpdateBranch() *ScanUpsertBulk

UpdateBranch sets the "branch" field to the value that was provided on create.

func (*ScanUpsertBulk) UpdateCheckID

func (u *ScanUpsertBulk) UpdateCheckID() *ScanUpsertBulk

UpdateCheckID sets the "check_id" field to the value that was provided on create.

func (*ScanUpsertBulk) UpdateCommitID

func (u *ScanUpsertBulk) UpdateCommitID() *ScanUpsertBulk

UpdateCommitID sets the "commit_id" field to the value that was provided on create.

func (*ScanUpsertBulk) UpdateNewValues

func (u *ScanUpsertBulk) UpdateNewValues() *ScanUpsertBulk

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.Scan.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

func (*ScanUpsertBulk) UpdatePullRequestTarget

func (u *ScanUpsertBulk) UpdatePullRequestTarget() *ScanUpsertBulk

UpdatePullRequestTarget sets the "pull_request_target" field to the value that was provided on create.

func (*ScanUpsertBulk) UpdateRequestedAt

func (u *ScanUpsertBulk) UpdateRequestedAt() *ScanUpsertBulk

UpdateRequestedAt sets the "requested_at" field to the value that was provided on create.

func (*ScanUpsertBulk) UpdateScannedAt

func (u *ScanUpsertBulk) UpdateScannedAt() *ScanUpsertBulk

UpdateScannedAt sets the "scanned_at" field to the value that was provided on create.

type ScanUpsertOne

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

ScanUpsertOne is the builder for "upsert"-ing

one Scan node.

func (*ScanUpsertOne) ClearCheckID

func (u *ScanUpsertOne) ClearCheckID() *ScanUpsertOne

ClearCheckID clears the value of the "check_id" field.

func (*ScanUpsertOne) ClearPullRequestTarget

func (u *ScanUpsertOne) ClearPullRequestTarget() *ScanUpsertOne

ClearPullRequestTarget clears the value of the "pull_request_target" field.

func (*ScanUpsertOne) DoNothing

func (u *ScanUpsertOne) DoNothing() *ScanUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*ScanUpsertOne) Exec

func (u *ScanUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*ScanUpsertOne) ExecX

func (u *ScanUpsertOne) ExecX(ctx context.Context)

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

func (*ScanUpsertOne) ID

func (u *ScanUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*ScanUpsertOne) IDX

func (u *ScanUpsertOne) IDX(ctx context.Context) string

IDX is like ID, but panics if an error occurs.

func (*ScanUpsertOne) Ignore

func (u *ScanUpsertOne) Ignore() *ScanUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Scan.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*ScanUpsertOne) SetBranch

func (u *ScanUpsertOne) SetBranch(v string) *ScanUpsertOne

SetBranch sets the "branch" field.

func (*ScanUpsertOne) SetCheckID

func (u *ScanUpsertOne) SetCheckID(v int64) *ScanUpsertOne

SetCheckID sets the "check_id" field.

func (*ScanUpsertOne) SetCommitID

func (u *ScanUpsertOne) SetCommitID(v string) *ScanUpsertOne

SetCommitID sets the "commit_id" field.

func (*ScanUpsertOne) SetPullRequestTarget

func (u *ScanUpsertOne) SetPullRequestTarget(v string) *ScanUpsertOne

SetPullRequestTarget sets the "pull_request_target" field.

func (*ScanUpsertOne) SetRequestedAt

func (u *ScanUpsertOne) SetRequestedAt(v int64) *ScanUpsertOne

SetRequestedAt sets the "requested_at" field.

func (*ScanUpsertOne) SetScannedAt

func (u *ScanUpsertOne) SetScannedAt(v int64) *ScanUpsertOne

SetScannedAt sets the "scanned_at" field.

func (*ScanUpsertOne) Update

func (u *ScanUpsertOne) Update(set func(*ScanUpsert)) *ScanUpsertOne

Update allows overriding fields `UPDATE` values. See the ScanCreate.OnConflict documentation for more info.

func (*ScanUpsertOne) UpdateBranch

func (u *ScanUpsertOne) UpdateBranch() *ScanUpsertOne

UpdateBranch sets the "branch" field to the value that was provided on create.

func (*ScanUpsertOne) UpdateCheckID

func (u *ScanUpsertOne) UpdateCheckID() *ScanUpsertOne

UpdateCheckID sets the "check_id" field to the value that was provided on create.

func (*ScanUpsertOne) UpdateCommitID

func (u *ScanUpsertOne) UpdateCommitID() *ScanUpsertOne

UpdateCommitID sets the "commit_id" field to the value that was provided on create.

func (*ScanUpsertOne) UpdateNewValues

func (u *ScanUpsertOne) UpdateNewValues() *ScanUpsertOne

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.Scan.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

func (*ScanUpsertOne) UpdatePullRequestTarget

func (u *ScanUpsertOne) UpdatePullRequestTarget() *ScanUpsertOne

UpdatePullRequestTarget sets the "pull_request_target" field to the value that was provided on create.

func (*ScanUpsertOne) UpdateRequestedAt

func (u *ScanUpsertOne) UpdateRequestedAt() *ScanUpsertOne

UpdateRequestedAt sets the "requested_at" field to the value that was provided on create.

func (*ScanUpsertOne) UpdateScannedAt

func (u *ScanUpsertOne) UpdateScannedAt() *ScanUpsertOne

UpdateScannedAt sets the "scanned_at" field to the value that was provided on create.

type Scans

type Scans []*Scan

Scans is a parsable slice of Scan.

type Session

type Session struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// UserID holds the value of the "user_id" field.
	UserID int `json:"user_id,omitempty"`
	// Token holds the value of the "token" field.
	Token string `json:"-"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt int64 `json:"created_at,omitempty"`
	// ExpiresAt holds the value of the "expires_at" field.
	ExpiresAt int64 `json:"expires_at,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SessionQuery when eager-loading is set.
	Edges SessionEdges `json:"edges"`
	// contains filtered or unexported fields
}

Session is the model entity for the Session schema.

func (*Session) QueryLogin

func (s *Session) QueryLogin() *UserQuery

QueryLogin queries the "login" edge of the Session entity.

func (*Session) String

func (s *Session) String() string

String implements the fmt.Stringer.

func (*Session) Unwrap

func (s *Session) Unwrap() *Session

Unwrap unwraps the Session 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 (*Session) Update

func (s *Session) Update() *SessionUpdateOne

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

type SessionClient

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

SessionClient is a client for the Session schema.

func NewSessionClient

func NewSessionClient(c config) *SessionClient

NewSessionClient returns a client for the Session from the given config.

func (*SessionClient) Create

func (c *SessionClient) Create() *SessionCreate

Create returns a create builder for Session.

func (*SessionClient) CreateBulk

func (c *SessionClient) CreateBulk(builders ...*SessionCreate) *SessionCreateBulk

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

func (*SessionClient) Delete

func (c *SessionClient) Delete() *SessionDelete

Delete returns a delete builder for Session.

func (*SessionClient) DeleteOne

func (c *SessionClient) DeleteOne(s *Session) *SessionDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SessionClient) DeleteOneID

func (c *SessionClient) DeleteOneID(id string) *SessionDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*SessionClient) Get

func (c *SessionClient) Get(ctx context.Context, id string) (*Session, error)

Get returns a Session entity by its id.

func (*SessionClient) GetX

func (c *SessionClient) GetX(ctx context.Context, id string) *Session

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

func (*SessionClient) Hooks

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

Hooks returns the client hooks.

func (*SessionClient) Query

func (c *SessionClient) Query() *SessionQuery

Query returns a query builder for Session.

func (*SessionClient) QueryLogin

func (c *SessionClient) QueryLogin(s *Session) *UserQuery

QueryLogin queries the login edge of a Session.

func (*SessionClient) Update

func (c *SessionClient) Update() *SessionUpdate

Update returns an update builder for Session.

func (*SessionClient) UpdateOne

func (c *SessionClient) UpdateOne(s *Session) *SessionUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SessionClient) UpdateOneID

func (c *SessionClient) UpdateOneID(id string) *SessionUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SessionClient) Use

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

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

type SessionCreate

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

SessionCreate is the builder for creating a Session entity.

func (*SessionCreate) Exec

func (sc *SessionCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SessionCreate) ExecX

func (sc *SessionCreate) ExecX(ctx context.Context)

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

func (*SessionCreate) Mutation

func (sc *SessionCreate) Mutation() *SessionMutation

Mutation returns the SessionMutation object of the builder.

func (*SessionCreate) OnConflict

func (sc *SessionCreate) OnConflict(opts ...sql.ConflictOption) *SessionUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Session.Create().
	SetUserID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SessionUpsert) {
		SetUserID(v+v).
	}).
	Exec(ctx)

func (*SessionCreate) OnConflictColumns

func (sc *SessionCreate) OnConflictColumns(columns ...string) *SessionUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Session.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*SessionCreate) Save

func (sc *SessionCreate) Save(ctx context.Context) (*Session, error)

Save creates the Session in the database.

func (*SessionCreate) SaveX

func (sc *SessionCreate) SaveX(ctx context.Context) *Session

SaveX calls Save and panics if Save returns an error.

func (*SessionCreate) SetCreatedAt

func (sc *SessionCreate) SetCreatedAt(i int64) *SessionCreate

SetCreatedAt sets the "created_at" field.

func (*SessionCreate) SetExpiresAt

func (sc *SessionCreate) SetExpiresAt(i int64) *SessionCreate

SetExpiresAt sets the "expires_at" field.

func (*SessionCreate) SetID

func (sc *SessionCreate) SetID(s string) *SessionCreate

SetID sets the "id" field.

func (*SessionCreate) SetLogin

func (sc *SessionCreate) SetLogin(u *User) *SessionCreate

SetLogin sets the "login" edge to the User entity.

func (*SessionCreate) SetLoginID

func (sc *SessionCreate) SetLoginID(id int) *SessionCreate

SetLoginID sets the "login" edge to the User entity by ID.

func (*SessionCreate) SetNillableLoginID

func (sc *SessionCreate) SetNillableLoginID(id *int) *SessionCreate

SetNillableLoginID sets the "login" edge to the User entity by ID if the given value is not nil.

func (*SessionCreate) SetToken

func (sc *SessionCreate) SetToken(s string) *SessionCreate

SetToken sets the "token" field.

func (*SessionCreate) SetUserID

func (sc *SessionCreate) SetUserID(i int) *SessionCreate

SetUserID sets the "user_id" field.

type SessionCreateBulk

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

SessionCreateBulk is the builder for creating many Session entities in bulk.

func (*SessionCreateBulk) Exec

func (scb *SessionCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SessionCreateBulk) ExecX

func (scb *SessionCreateBulk) ExecX(ctx context.Context)

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

func (*SessionCreateBulk) OnConflict

func (scb *SessionCreateBulk) OnConflict(opts ...sql.ConflictOption) *SessionUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Session.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SessionUpsert) {
		SetUserID(v+v).
	}).
	Exec(ctx)

func (*SessionCreateBulk) OnConflictColumns

func (scb *SessionCreateBulk) OnConflictColumns(columns ...string) *SessionUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Session.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*SessionCreateBulk) Save

func (scb *SessionCreateBulk) Save(ctx context.Context) ([]*Session, error)

Save creates the Session entities in the database.

func (*SessionCreateBulk) SaveX

func (scb *SessionCreateBulk) SaveX(ctx context.Context) []*Session

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

type SessionDelete

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

SessionDelete is the builder for deleting a Session entity.

func (*SessionDelete) Exec

func (sd *SessionDelete) Exec(ctx context.Context) (int, error)

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

func (*SessionDelete) ExecX

func (sd *SessionDelete) ExecX(ctx context.Context) int

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

func (*SessionDelete) Where

func (sd *SessionDelete) Where(ps ...predicate.Session) *SessionDelete

Where appends a list predicates to the SessionDelete builder.

type SessionDeleteOne

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

SessionDeleteOne is the builder for deleting a single Session entity.

func (*SessionDeleteOne) Exec

func (sdo *SessionDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SessionDeleteOne) ExecX

func (sdo *SessionDeleteOne) ExecX(ctx context.Context)

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

type SessionEdges

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

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

func (SessionEdges) LoginOrErr

func (e SessionEdges) LoginOrErr() (*User, error)

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

type SessionGroupBy

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

SessionGroupBy is the group-by builder for Session entities.

func (*SessionGroupBy) Aggregate

func (sgb *SessionGroupBy) Aggregate(fns ...AggregateFunc) *SessionGroupBy

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

func (*SessionGroupBy) Bool

func (sgb *SessionGroupBy) 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 (*SessionGroupBy) BoolX

func (sgb *SessionGroupBy) BoolX(ctx context.Context) bool

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

func (*SessionGroupBy) Bools

func (sgb *SessionGroupBy) 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 (*SessionGroupBy) BoolsX

func (sgb *SessionGroupBy) BoolsX(ctx context.Context) []bool

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

func (*SessionGroupBy) Float64

func (sgb *SessionGroupBy) 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 (*SessionGroupBy) Float64X

func (sgb *SessionGroupBy) Float64X(ctx context.Context) float64

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

func (*SessionGroupBy) Float64s

func (sgb *SessionGroupBy) 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 (*SessionGroupBy) Float64sX

func (sgb *SessionGroupBy) Float64sX(ctx context.Context) []float64

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

func (*SessionGroupBy) Int

func (sgb *SessionGroupBy) 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 (*SessionGroupBy) IntX

func (sgb *SessionGroupBy) IntX(ctx context.Context) int

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

func (*SessionGroupBy) Ints

func (sgb *SessionGroupBy) 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 (*SessionGroupBy) IntsX

func (sgb *SessionGroupBy) IntsX(ctx context.Context) []int

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

func (*SessionGroupBy) Scan

func (sgb *SessionGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*SessionGroupBy) ScanX

func (sgb *SessionGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*SessionGroupBy) String

func (sgb *SessionGroupBy) 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 (*SessionGroupBy) StringX

func (sgb *SessionGroupBy) StringX(ctx context.Context) string

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

func (*SessionGroupBy) Strings

func (sgb *SessionGroupBy) 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 (*SessionGroupBy) StringsX

func (sgb *SessionGroupBy) StringsX(ctx context.Context) []string

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

type SessionMutation

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

SessionMutation represents an operation that mutates the Session nodes in the graph.

func (*SessionMutation) AddCreatedAt

func (m *SessionMutation) AddCreatedAt(i int64)

AddCreatedAt adds i to the "created_at" field.

func (*SessionMutation) AddExpiresAt

func (m *SessionMutation) AddExpiresAt(i int64)

AddExpiresAt adds i to the "expires_at" field.

func (*SessionMutation) AddField

func (m *SessionMutation) 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 (*SessionMutation) AddUserID

func (m *SessionMutation) AddUserID(i int)

AddUserID adds i to the "user_id" field.

func (*SessionMutation) AddedCreatedAt

func (m *SessionMutation) AddedCreatedAt() (r int64, exists bool)

AddedCreatedAt returns the value that was added to the "created_at" field in this mutation.

func (*SessionMutation) AddedEdges

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

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

func (*SessionMutation) AddedExpiresAt

func (m *SessionMutation) AddedExpiresAt() (r int64, exists bool)

AddedExpiresAt returns the value that was added to the "expires_at" field in this mutation.

func (*SessionMutation) AddedField

func (m *SessionMutation) 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 (*SessionMutation) AddedFields

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

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

func (*SessionMutation) AddedIDs

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

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

func (*SessionMutation) AddedUserID

func (m *SessionMutation) AddedUserID() (r int, exists bool)

AddedUserID returns the value that was added to the "user_id" field in this mutation.

func (*SessionMutation) ClearEdge

func (m *SessionMutation) 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 (*SessionMutation) ClearField

func (m *SessionMutation) 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 (*SessionMutation) ClearLogin

func (m *SessionMutation) ClearLogin()

ClearLogin clears the "login" edge to the User entity.

func (*SessionMutation) ClearedEdges

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

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

func (*SessionMutation) ClearedFields

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

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

func (SessionMutation) Client

func (m SessionMutation) 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 (*SessionMutation) CreatedAt

func (m *SessionMutation) CreatedAt() (r int64, exists bool)

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

func (*SessionMutation) EdgeCleared

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

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

func (*SessionMutation) ExpiresAt

func (m *SessionMutation) ExpiresAt() (r int64, exists bool)

ExpiresAt returns the value of the "expires_at" field in the mutation.

func (*SessionMutation) Field

func (m *SessionMutation) 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 (*SessionMutation) FieldCleared

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

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

func (*SessionMutation) Fields

func (m *SessionMutation) 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 (*SessionMutation) ID

func (m *SessionMutation) 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 (*SessionMutation) LoginCleared

func (m *SessionMutation) LoginCleared() bool

LoginCleared reports if the "login" edge to the User entity was cleared.

func (*SessionMutation) LoginID

func (m *SessionMutation) LoginID() (id int, exists bool)

LoginID returns the "login" edge ID in the mutation.

func (*SessionMutation) LoginIDs

func (m *SessionMutation) LoginIDs() (ids []int)

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

func (*SessionMutation) OldCreatedAt

func (m *SessionMutation) OldCreatedAt(ctx context.Context) (v int64, err error)

OldCreatedAt returns the old "created_at" field's value of the Session entity. If the Session 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 (*SessionMutation) OldExpiresAt

func (m *SessionMutation) OldExpiresAt(ctx context.Context) (v int64, err error)

OldExpiresAt returns the old "expires_at" field's value of the Session entity. If the Session 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 (*SessionMutation) OldField

func (m *SessionMutation) 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 (*SessionMutation) OldToken

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

OldToken returns the old "token" field's value of the Session entity. If the Session 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 (*SessionMutation) OldUserID

func (m *SessionMutation) OldUserID(ctx context.Context) (v int, err error)

OldUserID returns the old "user_id" field's value of the Session entity. If the Session 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 (*SessionMutation) Op

func (m *SessionMutation) Op() Op

Op returns the operation name.

func (*SessionMutation) RemovedEdges

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

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

func (*SessionMutation) RemovedIDs

func (m *SessionMutation) 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 (*SessionMutation) ResetCreatedAt

func (m *SessionMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*SessionMutation) ResetEdge

func (m *SessionMutation) 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 (*SessionMutation) ResetExpiresAt

func (m *SessionMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expires_at" field.

func (*SessionMutation) ResetField

func (m *SessionMutation) 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 (*SessionMutation) ResetLogin

func (m *SessionMutation) ResetLogin()

ResetLogin resets all changes to the "login" edge.

func (*SessionMutation) ResetToken

func (m *SessionMutation) ResetToken()

ResetToken resets all changes to the "token" field.

func (*SessionMutation) ResetUserID

func (m *SessionMutation) ResetUserID()

ResetUserID resets all changes to the "user_id" field.

func (*SessionMutation) SetCreatedAt

func (m *SessionMutation) SetCreatedAt(i int64)

SetCreatedAt sets the "created_at" field.

func (*SessionMutation) SetExpiresAt

func (m *SessionMutation) SetExpiresAt(i int64)

SetExpiresAt sets the "expires_at" field.

func (*SessionMutation) SetField

func (m *SessionMutation) 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 (*SessionMutation) SetID

func (m *SessionMutation) SetID(id string)

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

func (*SessionMutation) SetLoginID

func (m *SessionMutation) SetLoginID(id int)

SetLoginID sets the "login" edge to the User entity by id.

func (*SessionMutation) SetToken

func (m *SessionMutation) SetToken(s string)

SetToken sets the "token" field.

func (*SessionMutation) SetUserID

func (m *SessionMutation) SetUserID(i int)

SetUserID sets the "user_id" field.

func (*SessionMutation) Token

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

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

func (SessionMutation) Tx

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

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

func (*SessionMutation) Type

func (m *SessionMutation) Type() string

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

func (*SessionMutation) UserID

func (m *SessionMutation) UserID() (r int, exists bool)

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

func (*SessionMutation) Where

func (m *SessionMutation) Where(ps ...predicate.Session)

Where appends a list predicates to the SessionMutation builder.

type SessionQuery

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

SessionQuery is the builder for querying Session entities.

func (*SessionQuery) All

func (sq *SessionQuery) All(ctx context.Context) ([]*Session, error)

All executes the query and returns a list of Sessions.

func (*SessionQuery) AllX

func (sq *SessionQuery) AllX(ctx context.Context) []*Session

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

func (*SessionQuery) Clone

func (sq *SessionQuery) Clone() *SessionQuery

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

func (*SessionQuery) Count

func (sq *SessionQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SessionQuery) CountX

func (sq *SessionQuery) CountX(ctx context.Context) int

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

func (*SessionQuery) Exist

func (sq *SessionQuery) Exist(ctx context.Context) (bool, error)

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

func (*SessionQuery) ExistX

func (sq *SessionQuery) ExistX(ctx context.Context) bool

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

func (*SessionQuery) First

func (sq *SessionQuery) First(ctx context.Context) (*Session, error)

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

func (*SessionQuery) FirstID

func (sq *SessionQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*SessionQuery) FirstIDX

func (sq *SessionQuery) FirstIDX(ctx context.Context) string

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

func (*SessionQuery) FirstX

func (sq *SessionQuery) FirstX(ctx context.Context) *Session

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

func (*SessionQuery) GroupBy

func (sq *SessionQuery) GroupBy(field string, fields ...string) *SessionGroupBy

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 {
	UserID int `json:"user_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Session.Query().
	GroupBy(session.FieldUserID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SessionQuery) IDs

func (sq *SessionQuery) IDs(ctx context.Context) ([]string, error)

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

func (*SessionQuery) IDsX

func (sq *SessionQuery) IDsX(ctx context.Context) []string

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

func (*SessionQuery) Limit

func (sq *SessionQuery) Limit(limit int) *SessionQuery

Limit adds a limit step to the query.

func (*SessionQuery) Offset

func (sq *SessionQuery) Offset(offset int) *SessionQuery

Offset adds an offset step to the query.

func (*SessionQuery) Only

func (sq *SessionQuery) Only(ctx context.Context) (*Session, error)

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

func (*SessionQuery) OnlyID

func (sq *SessionQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*SessionQuery) OnlyIDX

func (sq *SessionQuery) OnlyIDX(ctx context.Context) string

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

func (*SessionQuery) OnlyX

func (sq *SessionQuery) OnlyX(ctx context.Context) *Session

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

func (*SessionQuery) Order

func (sq *SessionQuery) Order(o ...OrderFunc) *SessionQuery

Order adds an order step to the query.

func (*SessionQuery) QueryLogin

func (sq *SessionQuery) QueryLogin() *UserQuery

QueryLogin chains the current query on the "login" edge.

func (*SessionQuery) Select

func (sq *SessionQuery) Select(fields ...string) *SessionSelect

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 {
	UserID int `json:"user_id,omitempty"`
}

client.Session.Query().
	Select(session.FieldUserID).
	Scan(ctx, &v)

func (*SessionQuery) Unique

func (sq *SessionQuery) Unique(unique bool) *SessionQuery

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 (*SessionQuery) Where

func (sq *SessionQuery) Where(ps ...predicate.Session) *SessionQuery

Where adds a new predicate for the SessionQuery builder.

func (*SessionQuery) WithLogin

func (sq *SessionQuery) WithLogin(opts ...func(*UserQuery)) *SessionQuery

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

type SessionSelect

type SessionSelect struct {
	*SessionQuery
	// contains filtered or unexported fields
}

SessionSelect is the builder for selecting fields of Session entities.

func (*SessionSelect) Bool

func (ss *SessionSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*SessionSelect) BoolX

func (ss *SessionSelect) BoolX(ctx context.Context) bool

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

func (*SessionSelect) Bools

func (ss *SessionSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*SessionSelect) BoolsX

func (ss *SessionSelect) BoolsX(ctx context.Context) []bool

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

func (*SessionSelect) Float64

func (ss *SessionSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*SessionSelect) Float64X

func (ss *SessionSelect) Float64X(ctx context.Context) float64

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

func (*SessionSelect) Float64s

func (ss *SessionSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*SessionSelect) Float64sX

func (ss *SessionSelect) Float64sX(ctx context.Context) []float64

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

func (*SessionSelect) Int

func (ss *SessionSelect) Int(ctx context.Context) (_ int, err error)

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

func (*SessionSelect) IntX

func (ss *SessionSelect) IntX(ctx context.Context) int

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

func (*SessionSelect) Ints

func (ss *SessionSelect) Ints(ctx context.Context) ([]int, error)

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

func (*SessionSelect) IntsX

func (ss *SessionSelect) IntsX(ctx context.Context) []int

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

func (*SessionSelect) Scan

func (ss *SessionSelect) Scan(ctx context.Context, v interface{}) error

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

func (*SessionSelect) ScanX

func (ss *SessionSelect) ScanX(ctx context.Context, v interface{})

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

func (*SessionSelect) String

func (ss *SessionSelect) String(ctx context.Context) (_ string, err error)

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

func (*SessionSelect) StringX

func (ss *SessionSelect) StringX(ctx context.Context) string

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

func (*SessionSelect) Strings

func (ss *SessionSelect) Strings(ctx context.Context) ([]string, error)

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

func (*SessionSelect) StringsX

func (ss *SessionSelect) StringsX(ctx context.Context) []string

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

type SessionUpdate

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

SessionUpdate is the builder for updating Session entities.

func (*SessionUpdate) AddUserID

func (su *SessionUpdate) AddUserID(i int) *SessionUpdate

AddUserID adds i to the "user_id" field.

func (*SessionUpdate) ClearLogin

func (su *SessionUpdate) ClearLogin() *SessionUpdate

ClearLogin clears the "login" edge to the User entity.

func (*SessionUpdate) Exec

func (su *SessionUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SessionUpdate) ExecX

func (su *SessionUpdate) ExecX(ctx context.Context)

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

func (*SessionUpdate) Mutation

func (su *SessionUpdate) Mutation() *SessionMutation

Mutation returns the SessionMutation object of the builder.

func (*SessionUpdate) Save

func (su *SessionUpdate) Save(ctx context.Context) (int, error)

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

func (*SessionUpdate) SaveX

func (su *SessionUpdate) SaveX(ctx context.Context) int

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

func (*SessionUpdate) SetLogin

func (su *SessionUpdate) SetLogin(u *User) *SessionUpdate

SetLogin sets the "login" edge to the User entity.

func (*SessionUpdate) SetLoginID

func (su *SessionUpdate) SetLoginID(id int) *SessionUpdate

SetLoginID sets the "login" edge to the User entity by ID.

func (*SessionUpdate) SetNillableLoginID

func (su *SessionUpdate) SetNillableLoginID(id *int) *SessionUpdate

SetNillableLoginID sets the "login" edge to the User entity by ID if the given value is not nil.

func (*SessionUpdate) SetUserID

func (su *SessionUpdate) SetUserID(i int) *SessionUpdate

SetUserID sets the "user_id" field.

func (*SessionUpdate) Where

func (su *SessionUpdate) Where(ps ...predicate.Session) *SessionUpdate

Where appends a list predicates to the SessionUpdate builder.

type SessionUpdateOne

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

SessionUpdateOne is the builder for updating a single Session entity.

func (*SessionUpdateOne) AddUserID

func (suo *SessionUpdateOne) AddUserID(i int) *SessionUpdateOne

AddUserID adds i to the "user_id" field.

func (*SessionUpdateOne) ClearLogin

func (suo *SessionUpdateOne) ClearLogin() *SessionUpdateOne

ClearLogin clears the "login" edge to the User entity.

func (*SessionUpdateOne) Exec

func (suo *SessionUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SessionUpdateOne) ExecX

func (suo *SessionUpdateOne) ExecX(ctx context.Context)

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

func (*SessionUpdateOne) Mutation

func (suo *SessionUpdateOne) Mutation() *SessionMutation

Mutation returns the SessionMutation object of the builder.

func (*SessionUpdateOne) Save

func (suo *SessionUpdateOne) Save(ctx context.Context) (*Session, error)

Save executes the query and returns the updated Session entity.

func (*SessionUpdateOne) SaveX

func (suo *SessionUpdateOne) SaveX(ctx context.Context) *Session

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

func (*SessionUpdateOne) Select

func (suo *SessionUpdateOne) Select(field string, fields ...string) *SessionUpdateOne

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

func (*SessionUpdateOne) SetLogin

func (suo *SessionUpdateOne) SetLogin(u *User) *SessionUpdateOne

SetLogin sets the "login" edge to the User entity.

func (*SessionUpdateOne) SetLoginID

func (suo *SessionUpdateOne) SetLoginID(id int) *SessionUpdateOne

SetLoginID sets the "login" edge to the User entity by ID.

func (*SessionUpdateOne) SetNillableLoginID

func (suo *SessionUpdateOne) SetNillableLoginID(id *int) *SessionUpdateOne

SetNillableLoginID sets the "login" edge to the User entity by ID if the given value is not nil.

func (*SessionUpdateOne) SetUserID

func (suo *SessionUpdateOne) SetUserID(i int) *SessionUpdateOne

SetUserID sets the "user_id" field.

type SessionUpsert

type SessionUpsert struct {
	*sql.UpdateSet
}

SessionUpsert is the "OnConflict" setter.

func (*SessionUpsert) SetCreatedAt

func (u *SessionUpsert) SetCreatedAt(v int64) *SessionUpsert

SetCreatedAt sets the "created_at" field.

func (*SessionUpsert) SetExpiresAt

func (u *SessionUpsert) SetExpiresAt(v int64) *SessionUpsert

SetExpiresAt sets the "expires_at" field.

func (*SessionUpsert) SetToken

func (u *SessionUpsert) SetToken(v string) *SessionUpsert

SetToken sets the "token" field.

func (*SessionUpsert) SetUserID

func (u *SessionUpsert) SetUserID(v int) *SessionUpsert

SetUserID sets the "user_id" field.

func (*SessionUpsert) UpdateCreatedAt

func (u *SessionUpsert) UpdateCreatedAt() *SessionUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*SessionUpsert) UpdateExpiresAt

func (u *SessionUpsert) UpdateExpiresAt() *SessionUpsert

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*SessionUpsert) UpdateToken

func (u *SessionUpsert) UpdateToken() *SessionUpsert

UpdateToken sets the "token" field to the value that was provided on create.

func (*SessionUpsert) UpdateUserID

func (u *SessionUpsert) UpdateUserID() *SessionUpsert

UpdateUserID sets the "user_id" field to the value that was provided on create.

type SessionUpsertBulk

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

SessionUpsertBulk is the builder for "upsert"-ing a bulk of Session nodes.

func (*SessionUpsertBulk) DoNothing

func (u *SessionUpsertBulk) DoNothing() *SessionUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SessionUpsertBulk) Exec

func (u *SessionUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SessionUpsertBulk) ExecX

func (u *SessionUpsertBulk) ExecX(ctx context.Context)

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

func (*SessionUpsertBulk) Ignore

func (u *SessionUpsertBulk) Ignore() *SessionUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Session.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SessionUpsertBulk) SetCreatedAt

func (u *SessionUpsertBulk) SetCreatedAt(v int64) *SessionUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*SessionUpsertBulk) SetExpiresAt

func (u *SessionUpsertBulk) SetExpiresAt(v int64) *SessionUpsertBulk

SetExpiresAt sets the "expires_at" field.

func (*SessionUpsertBulk) SetToken

func (u *SessionUpsertBulk) SetToken(v string) *SessionUpsertBulk

SetToken sets the "token" field.

func (*SessionUpsertBulk) SetUserID

func (u *SessionUpsertBulk) SetUserID(v int) *SessionUpsertBulk

SetUserID sets the "user_id" field.

func (*SessionUpsertBulk) Update

func (u *SessionUpsertBulk) Update(set func(*SessionUpsert)) *SessionUpsertBulk

Update allows overriding fields `UPDATE` values. See the SessionCreateBulk.OnConflict documentation for more info.

func (*SessionUpsertBulk) UpdateCreatedAt

func (u *SessionUpsertBulk) UpdateCreatedAt() *SessionUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateExpiresAt

func (u *SessionUpsertBulk) UpdateExpiresAt() *SessionUpsertBulk

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateNewValues

func (u *SessionUpsertBulk) UpdateNewValues() *SessionUpsertBulk

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.Session.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

func (*SessionUpsertBulk) UpdateToken

func (u *SessionUpsertBulk) UpdateToken() *SessionUpsertBulk

UpdateToken sets the "token" field to the value that was provided on create.

func (*SessionUpsertBulk) UpdateUserID

func (u *SessionUpsertBulk) UpdateUserID() *SessionUpsertBulk

UpdateUserID sets the "user_id" field to the value that was provided on create.

type SessionUpsertOne

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

SessionUpsertOne is the builder for "upsert"-ing

one Session node.

func (*SessionUpsertOne) DoNothing

func (u *SessionUpsertOne) DoNothing() *SessionUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SessionUpsertOne) Exec

func (u *SessionUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*SessionUpsertOne) ExecX

func (u *SessionUpsertOne) ExecX(ctx context.Context)

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

func (*SessionUpsertOne) ID

func (u *SessionUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SessionUpsertOne) IDX

func (u *SessionUpsertOne) IDX(ctx context.Context) string

IDX is like ID, but panics if an error occurs.

func (*SessionUpsertOne) Ignore

func (u *SessionUpsertOne) Ignore() *SessionUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Session.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SessionUpsertOne) SetCreatedAt

func (u *SessionUpsertOne) SetCreatedAt(v int64) *SessionUpsertOne

SetCreatedAt sets the "created_at" field.

func (*SessionUpsertOne) SetExpiresAt

func (u *SessionUpsertOne) SetExpiresAt(v int64) *SessionUpsertOne

SetExpiresAt sets the "expires_at" field.

func (*SessionUpsertOne) SetToken

func (u *SessionUpsertOne) SetToken(v string) *SessionUpsertOne

SetToken sets the "token" field.

func (*SessionUpsertOne) SetUserID

func (u *SessionUpsertOne) SetUserID(v int) *SessionUpsertOne

SetUserID sets the "user_id" field.

func (*SessionUpsertOne) Update

func (u *SessionUpsertOne) Update(set func(*SessionUpsert)) *SessionUpsertOne

Update allows overriding fields `UPDATE` values. See the SessionCreate.OnConflict documentation for more info.

func (*SessionUpsertOne) UpdateCreatedAt

func (u *SessionUpsertOne) UpdateCreatedAt() *SessionUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateExpiresAt

func (u *SessionUpsertOne) UpdateExpiresAt() *SessionUpsertOne

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateNewValues

func (u *SessionUpsertOne) UpdateNewValues() *SessionUpsertOne

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.Session.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

func (*SessionUpsertOne) UpdateToken

func (u *SessionUpsertOne) UpdateToken() *SessionUpsertOne

UpdateToken sets the "token" field to the value that was provided on create.

func (*SessionUpsertOne) UpdateUserID

func (u *SessionUpsertOne) UpdateUserID() *SessionUpsertOne

UpdateUserID sets the "user_id" field to the value that was provided on create.

type Sessions

type Sessions []*Session

Sessions is a parsable slice of Session.

type Severities added in v0.1.1

type Severities []*Severity

Severities is a parsable slice of Severity.

type Severity added in v0.1.1

type Severity struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Label holds the value of the "label" field.
	Label string `json:"label,omitempty"`
	// Color holds the value of the "color" field.
	Color string `json:"color,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the SeverityQuery when eager-loading is set.
	Edges SeverityEdges `json:"edges"`
	// contains filtered or unexported fields
}

Severity is the model entity for the Severity schema.

func (*Severity) QueryVulnerabilities added in v0.1.1

func (s *Severity) QueryVulnerabilities() *VulnerabilityQuery

QueryVulnerabilities queries the "vulnerabilities" edge of the Severity entity.

func (*Severity) String added in v0.1.1

func (s *Severity) String() string

String implements the fmt.Stringer.

func (*Severity) Unwrap added in v0.1.1

func (s *Severity) Unwrap() *Severity

Unwrap unwraps the Severity 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 (*Severity) Update added in v0.1.1

func (s *Severity) Update() *SeverityUpdateOne

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

type SeverityClient added in v0.1.1

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

SeverityClient is a client for the Severity schema.

func NewSeverityClient added in v0.1.1

func NewSeverityClient(c config) *SeverityClient

NewSeverityClient returns a client for the Severity from the given config.

func (*SeverityClient) Create added in v0.1.1

func (c *SeverityClient) Create() *SeverityCreate

Create returns a create builder for Severity.

func (*SeverityClient) CreateBulk added in v0.1.1

func (c *SeverityClient) CreateBulk(builders ...*SeverityCreate) *SeverityCreateBulk

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

func (*SeverityClient) Delete added in v0.1.1

func (c *SeverityClient) Delete() *SeverityDelete

Delete returns a delete builder for Severity.

func (*SeverityClient) DeleteOne added in v0.1.1

func (c *SeverityClient) DeleteOne(s *Severity) *SeverityDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*SeverityClient) DeleteOneID added in v0.1.1

func (c *SeverityClient) DeleteOneID(id int) *SeverityDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*SeverityClient) Get added in v0.1.1

func (c *SeverityClient) Get(ctx context.Context, id int) (*Severity, error)

Get returns a Severity entity by its id.

func (*SeverityClient) GetX added in v0.1.1

func (c *SeverityClient) GetX(ctx context.Context, id int) *Severity

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

func (*SeverityClient) Hooks added in v0.1.1

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

Hooks returns the client hooks.

func (*SeverityClient) Query added in v0.1.1

func (c *SeverityClient) Query() *SeverityQuery

Query returns a query builder for Severity.

func (*SeverityClient) QueryVulnerabilities added in v0.1.1

func (c *SeverityClient) QueryVulnerabilities(s *Severity) *VulnerabilityQuery

QueryVulnerabilities queries the vulnerabilities edge of a Severity.

func (*SeverityClient) Update added in v0.1.1

func (c *SeverityClient) Update() *SeverityUpdate

Update returns an update builder for Severity.

func (*SeverityClient) UpdateOne added in v0.1.1

func (c *SeverityClient) UpdateOne(s *Severity) *SeverityUpdateOne

UpdateOne returns an update builder for the given entity.

func (*SeverityClient) UpdateOneID added in v0.1.1

func (c *SeverityClient) UpdateOneID(id int) *SeverityUpdateOne

UpdateOneID returns an update builder for the given id.

func (*SeverityClient) Use added in v0.1.1

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

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

type SeverityCreate added in v0.1.1

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

SeverityCreate is the builder for creating a Severity entity.

func (*SeverityCreate) AddVulnerabilities added in v0.1.1

func (sc *SeverityCreate) AddVulnerabilities(v ...*Vulnerability) *SeverityCreate

AddVulnerabilities adds the "vulnerabilities" edges to the Vulnerability entity.

func (*SeverityCreate) AddVulnerabilityIDs added in v0.1.1

func (sc *SeverityCreate) AddVulnerabilityIDs(ids ...string) *SeverityCreate

AddVulnerabilityIDs adds the "vulnerabilities" edge to the Vulnerability entity by IDs.

func (*SeverityCreate) Exec added in v0.1.1

func (sc *SeverityCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*SeverityCreate) ExecX added in v0.1.1

func (sc *SeverityCreate) ExecX(ctx context.Context)

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

func (*SeverityCreate) Mutation added in v0.1.1

func (sc *SeverityCreate) Mutation() *SeverityMutation

Mutation returns the SeverityMutation object of the builder.

func (*SeverityCreate) OnConflict added in v0.1.1

func (sc *SeverityCreate) OnConflict(opts ...sql.ConflictOption) *SeverityUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Severity.Create().
	SetLabel(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SeverityUpsert) {
		SetLabel(v+v).
	}).
	Exec(ctx)

func (*SeverityCreate) OnConflictColumns added in v0.1.1

func (sc *SeverityCreate) OnConflictColumns(columns ...string) *SeverityUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Severity.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*SeverityCreate) Save added in v0.1.1

func (sc *SeverityCreate) Save(ctx context.Context) (*Severity, error)

Save creates the Severity in the database.

func (*SeverityCreate) SaveX added in v0.1.1

func (sc *SeverityCreate) SaveX(ctx context.Context) *Severity

SaveX calls Save and panics if Save returns an error.

func (*SeverityCreate) SetColor added in v0.1.1

func (sc *SeverityCreate) SetColor(s string) *SeverityCreate

SetColor sets the "color" field.

func (*SeverityCreate) SetLabel added in v0.1.1

func (sc *SeverityCreate) SetLabel(s string) *SeverityCreate

SetLabel sets the "label" field.

func (*SeverityCreate) SetNillableColor added in v0.1.1

func (sc *SeverityCreate) SetNillableColor(s *string) *SeverityCreate

SetNillableColor sets the "color" field if the given value is not nil.

type SeverityCreateBulk added in v0.1.1

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

SeverityCreateBulk is the builder for creating many Severity entities in bulk.

func (*SeverityCreateBulk) Exec added in v0.1.1

func (scb *SeverityCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SeverityCreateBulk) ExecX added in v0.1.1

func (scb *SeverityCreateBulk) ExecX(ctx context.Context)

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

func (*SeverityCreateBulk) OnConflict added in v0.1.1

func (scb *SeverityCreateBulk) OnConflict(opts ...sql.ConflictOption) *SeverityUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Severity.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.SeverityUpsert) {
		SetLabel(v+v).
	}).
	Exec(ctx)

func (*SeverityCreateBulk) OnConflictColumns added in v0.1.1

func (scb *SeverityCreateBulk) OnConflictColumns(columns ...string) *SeverityUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Severity.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*SeverityCreateBulk) Save added in v0.1.1

func (scb *SeverityCreateBulk) Save(ctx context.Context) ([]*Severity, error)

Save creates the Severity entities in the database.

func (*SeverityCreateBulk) SaveX added in v0.1.1

func (scb *SeverityCreateBulk) SaveX(ctx context.Context) []*Severity

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

type SeverityDelete added in v0.1.1

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

SeverityDelete is the builder for deleting a Severity entity.

func (*SeverityDelete) Exec added in v0.1.1

func (sd *SeverityDelete) Exec(ctx context.Context) (int, error)

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

func (*SeverityDelete) ExecX added in v0.1.1

func (sd *SeverityDelete) ExecX(ctx context.Context) int

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

func (*SeverityDelete) Where added in v0.1.1

func (sd *SeverityDelete) Where(ps ...predicate.Severity) *SeverityDelete

Where appends a list predicates to the SeverityDelete builder.

type SeverityDeleteOne added in v0.1.1

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

SeverityDeleteOne is the builder for deleting a single Severity entity.

func (*SeverityDeleteOne) Exec added in v0.1.1

func (sdo *SeverityDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*SeverityDeleteOne) ExecX added in v0.1.1

func (sdo *SeverityDeleteOne) ExecX(ctx context.Context)

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

type SeverityEdges added in v0.1.1

type SeverityEdges struct {
	// Vulnerabilities holds the value of the vulnerabilities edge.
	Vulnerabilities []*Vulnerability `json:"vulnerabilities,omitempty"`
	// contains filtered or unexported fields
}

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

func (SeverityEdges) VulnerabilitiesOrErr added in v0.1.1

func (e SeverityEdges) VulnerabilitiesOrErr() ([]*Vulnerability, error)

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

type SeverityGroupBy added in v0.1.1

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

SeverityGroupBy is the group-by builder for Severity entities.

func (*SeverityGroupBy) Aggregate added in v0.1.1

func (sgb *SeverityGroupBy) Aggregate(fns ...AggregateFunc) *SeverityGroupBy

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

func (*SeverityGroupBy) Bool added in v0.1.1

func (sgb *SeverityGroupBy) 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 (*SeverityGroupBy) BoolX added in v0.1.1

func (sgb *SeverityGroupBy) BoolX(ctx context.Context) bool

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

func (*SeverityGroupBy) Bools added in v0.1.1

func (sgb *SeverityGroupBy) 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 (*SeverityGroupBy) BoolsX added in v0.1.1

func (sgb *SeverityGroupBy) BoolsX(ctx context.Context) []bool

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

func (*SeverityGroupBy) Float64 added in v0.1.1

func (sgb *SeverityGroupBy) 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 (*SeverityGroupBy) Float64X added in v0.1.1

func (sgb *SeverityGroupBy) Float64X(ctx context.Context) float64

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

func (*SeverityGroupBy) Float64s added in v0.1.1

func (sgb *SeverityGroupBy) 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 (*SeverityGroupBy) Float64sX added in v0.1.1

func (sgb *SeverityGroupBy) Float64sX(ctx context.Context) []float64

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

func (*SeverityGroupBy) Int added in v0.1.1

func (sgb *SeverityGroupBy) 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 (*SeverityGroupBy) IntX added in v0.1.1

func (sgb *SeverityGroupBy) IntX(ctx context.Context) int

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

func (*SeverityGroupBy) Ints added in v0.1.1

func (sgb *SeverityGroupBy) 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 (*SeverityGroupBy) IntsX added in v0.1.1

func (sgb *SeverityGroupBy) IntsX(ctx context.Context) []int

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

func (*SeverityGroupBy) Scan added in v0.1.1

func (sgb *SeverityGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*SeverityGroupBy) ScanX added in v0.1.1

func (sgb *SeverityGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*SeverityGroupBy) String added in v0.1.1

func (sgb *SeverityGroupBy) 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 (*SeverityGroupBy) StringX added in v0.1.1

func (sgb *SeverityGroupBy) StringX(ctx context.Context) string

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

func (*SeverityGroupBy) Strings added in v0.1.1

func (sgb *SeverityGroupBy) 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 (*SeverityGroupBy) StringsX added in v0.1.1

func (sgb *SeverityGroupBy) StringsX(ctx context.Context) []string

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

type SeverityMutation added in v0.1.1

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

SeverityMutation represents an operation that mutates the Severity nodes in the graph.

func (*SeverityMutation) AddField added in v0.1.1

func (m *SeverityMutation) 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 (*SeverityMutation) AddVulnerabilityIDs added in v0.1.1

func (m *SeverityMutation) AddVulnerabilityIDs(ids ...string)

AddVulnerabilityIDs adds the "vulnerabilities" edge to the Vulnerability entity by ids.

func (*SeverityMutation) AddedEdges added in v0.1.1

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

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

func (*SeverityMutation) AddedField added in v0.1.1

func (m *SeverityMutation) 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 (*SeverityMutation) AddedFields added in v0.1.1

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

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

func (*SeverityMutation) AddedIDs added in v0.1.1

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

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

func (*SeverityMutation) ClearColor added in v0.1.1

func (m *SeverityMutation) ClearColor()

ClearColor clears the value of the "color" field.

func (*SeverityMutation) ClearEdge added in v0.1.1

func (m *SeverityMutation) 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 (*SeverityMutation) ClearField added in v0.1.1

func (m *SeverityMutation) 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 (*SeverityMutation) ClearVulnerabilities added in v0.1.1

func (m *SeverityMutation) ClearVulnerabilities()

ClearVulnerabilities clears the "vulnerabilities" edge to the Vulnerability entity.

func (*SeverityMutation) ClearedEdges added in v0.1.1

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

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

func (*SeverityMutation) ClearedFields added in v0.1.1

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

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

func (SeverityMutation) Client added in v0.1.1

func (m SeverityMutation) 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 (*SeverityMutation) Color added in v0.1.1

func (m *SeverityMutation) Color() (r string, exists bool)

Color returns the value of the "color" field in the mutation.

func (*SeverityMutation) ColorCleared added in v0.1.1

func (m *SeverityMutation) ColorCleared() bool

ColorCleared returns if the "color" field was cleared in this mutation.

func (*SeverityMutation) EdgeCleared added in v0.1.1

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

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

func (*SeverityMutation) Field added in v0.1.1

func (m *SeverityMutation) 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 (*SeverityMutation) FieldCleared added in v0.1.1

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

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

func (*SeverityMutation) Fields added in v0.1.1

func (m *SeverityMutation) 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 (*SeverityMutation) ID added in v0.1.1

func (m *SeverityMutation) 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 (*SeverityMutation) Label added in v0.1.1

func (m *SeverityMutation) Label() (r string, exists bool)

Label returns the value of the "label" field in the mutation.

func (*SeverityMutation) OldColor added in v0.1.1

func (m *SeverityMutation) OldColor(ctx context.Context) (v string, err error)

OldColor returns the old "color" field's value of the Severity entity. If the Severity 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 (*SeverityMutation) OldField added in v0.1.1

func (m *SeverityMutation) 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 (*SeverityMutation) OldLabel added in v0.1.1

func (m *SeverityMutation) OldLabel(ctx context.Context) (v string, err error)

OldLabel returns the old "label" field's value of the Severity entity. If the Severity 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 (*SeverityMutation) Op added in v0.1.1

func (m *SeverityMutation) Op() Op

Op returns the operation name.

func (*SeverityMutation) RemoveVulnerabilityIDs added in v0.1.1

func (m *SeverityMutation) RemoveVulnerabilityIDs(ids ...string)

RemoveVulnerabilityIDs removes the "vulnerabilities" edge to the Vulnerability entity by IDs.

func (*SeverityMutation) RemovedEdges added in v0.1.1

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

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

func (*SeverityMutation) RemovedIDs added in v0.1.1

func (m *SeverityMutation) 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 (*SeverityMutation) RemovedVulnerabilitiesIDs added in v0.1.1

func (m *SeverityMutation) RemovedVulnerabilitiesIDs() (ids []string)

RemovedVulnerabilities returns the removed IDs of the "vulnerabilities" edge to the Vulnerability entity.

func (*SeverityMutation) ResetColor added in v0.1.1

func (m *SeverityMutation) ResetColor()

ResetColor resets all changes to the "color" field.

func (*SeverityMutation) ResetEdge added in v0.1.1

func (m *SeverityMutation) 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 (*SeverityMutation) ResetField added in v0.1.1

func (m *SeverityMutation) 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 (*SeverityMutation) ResetLabel added in v0.1.1

func (m *SeverityMutation) ResetLabel()

ResetLabel resets all changes to the "label" field.

func (*SeverityMutation) ResetVulnerabilities added in v0.1.1

func (m *SeverityMutation) ResetVulnerabilities()

ResetVulnerabilities resets all changes to the "vulnerabilities" edge.

func (*SeverityMutation) SetColor added in v0.1.1

func (m *SeverityMutation) SetColor(s string)

SetColor sets the "color" field.

func (*SeverityMutation) SetField added in v0.1.1

func (m *SeverityMutation) 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 (*SeverityMutation) SetLabel added in v0.1.1

func (m *SeverityMutation) SetLabel(s string)

SetLabel sets the "label" field.

func (SeverityMutation) Tx added in v0.1.1

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

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

func (*SeverityMutation) Type added in v0.1.1

func (m *SeverityMutation) Type() string

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

func (*SeverityMutation) VulnerabilitiesCleared added in v0.1.1

func (m *SeverityMutation) VulnerabilitiesCleared() bool

VulnerabilitiesCleared reports if the "vulnerabilities" edge to the Vulnerability entity was cleared.

func (*SeverityMutation) VulnerabilitiesIDs added in v0.1.1

func (m *SeverityMutation) VulnerabilitiesIDs() (ids []string)

VulnerabilitiesIDs returns the "vulnerabilities" edge IDs in the mutation.

func (*SeverityMutation) Where added in v0.1.1

func (m *SeverityMutation) Where(ps ...predicate.Severity)

Where appends a list predicates to the SeverityMutation builder.

type SeverityQuery added in v0.1.1

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

SeverityQuery is the builder for querying Severity entities.

func (*SeverityQuery) All added in v0.1.1

func (sq *SeverityQuery) All(ctx context.Context) ([]*Severity, error)

All executes the query and returns a list of Severities.

func (*SeverityQuery) AllX added in v0.1.1

func (sq *SeverityQuery) AllX(ctx context.Context) []*Severity

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

func (*SeverityQuery) Clone added in v0.1.1

func (sq *SeverityQuery) Clone() *SeverityQuery

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

func (*SeverityQuery) Count added in v0.1.1

func (sq *SeverityQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*SeverityQuery) CountX added in v0.1.1

func (sq *SeverityQuery) CountX(ctx context.Context) int

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

func (*SeverityQuery) Exist added in v0.1.1

func (sq *SeverityQuery) Exist(ctx context.Context) (bool, error)

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

func (*SeverityQuery) ExistX added in v0.1.1

func (sq *SeverityQuery) ExistX(ctx context.Context) bool

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

func (*SeverityQuery) First added in v0.1.1

func (sq *SeverityQuery) First(ctx context.Context) (*Severity, error)

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

func (*SeverityQuery) FirstID added in v0.1.1

func (sq *SeverityQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*SeverityQuery) FirstIDX added in v0.1.1

func (sq *SeverityQuery) FirstIDX(ctx context.Context) int

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

func (*SeverityQuery) FirstX added in v0.1.1

func (sq *SeverityQuery) FirstX(ctx context.Context) *Severity

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

func (*SeverityQuery) GroupBy added in v0.1.1

func (sq *SeverityQuery) GroupBy(field string, fields ...string) *SeverityGroupBy

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 {
	Label string `json:"label,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Severity.Query().
	GroupBy(severity.FieldLabel).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*SeverityQuery) IDs added in v0.1.1

func (sq *SeverityQuery) IDs(ctx context.Context) ([]int, error)

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

func (*SeverityQuery) IDsX added in v0.1.1

func (sq *SeverityQuery) IDsX(ctx context.Context) []int

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

func (*SeverityQuery) Limit added in v0.1.1

func (sq *SeverityQuery) Limit(limit int) *SeverityQuery

Limit adds a limit step to the query.

func (*SeverityQuery) Offset added in v0.1.1

func (sq *SeverityQuery) Offset(offset int) *SeverityQuery

Offset adds an offset step to the query.

func (*SeverityQuery) Only added in v0.1.1

func (sq *SeverityQuery) Only(ctx context.Context) (*Severity, error)

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

func (*SeverityQuery) OnlyID added in v0.1.1

func (sq *SeverityQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*SeverityQuery) OnlyIDX added in v0.1.1

func (sq *SeverityQuery) OnlyIDX(ctx context.Context) int

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

func (*SeverityQuery) OnlyX added in v0.1.1

func (sq *SeverityQuery) OnlyX(ctx context.Context) *Severity

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

func (*SeverityQuery) Order added in v0.1.1

func (sq *SeverityQuery) Order(o ...OrderFunc) *SeverityQuery

Order adds an order step to the query.

func (*SeverityQuery) QueryVulnerabilities added in v0.1.1

func (sq *SeverityQuery) QueryVulnerabilities() *VulnerabilityQuery

QueryVulnerabilities chains the current query on the "vulnerabilities" edge.

func (*SeverityQuery) Select added in v0.1.1

func (sq *SeverityQuery) Select(fields ...string) *SeveritySelect

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 {
	Label string `json:"label,omitempty"`
}

client.Severity.Query().
	Select(severity.FieldLabel).
	Scan(ctx, &v)

func (*SeverityQuery) Unique added in v0.1.1

func (sq *SeverityQuery) Unique(unique bool) *SeverityQuery

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 (*SeverityQuery) Where added in v0.1.1

func (sq *SeverityQuery) Where(ps ...predicate.Severity) *SeverityQuery

Where adds a new predicate for the SeverityQuery builder.

func (*SeverityQuery) WithVulnerabilities added in v0.1.1

func (sq *SeverityQuery) WithVulnerabilities(opts ...func(*VulnerabilityQuery)) *SeverityQuery

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

type SeveritySelect added in v0.1.1

type SeveritySelect struct {
	*SeverityQuery
	// contains filtered or unexported fields
}

SeveritySelect is the builder for selecting fields of Severity entities.

func (*SeveritySelect) Bool added in v0.1.1

func (ss *SeveritySelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*SeveritySelect) BoolX added in v0.1.1

func (ss *SeveritySelect) BoolX(ctx context.Context) bool

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

func (*SeveritySelect) Bools added in v0.1.1

func (ss *SeveritySelect) Bools(ctx context.Context) ([]bool, error)

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

func (*SeveritySelect) BoolsX added in v0.1.1

func (ss *SeveritySelect) BoolsX(ctx context.Context) []bool

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

func (*SeveritySelect) Float64 added in v0.1.1

func (ss *SeveritySelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*SeveritySelect) Float64X added in v0.1.1

func (ss *SeveritySelect) Float64X(ctx context.Context) float64

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

func (*SeveritySelect) Float64s added in v0.1.1

func (ss *SeveritySelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*SeveritySelect) Float64sX added in v0.1.1

func (ss *SeveritySelect) Float64sX(ctx context.Context) []float64

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

func (*SeveritySelect) Int added in v0.1.1

func (ss *SeveritySelect) Int(ctx context.Context) (_ int, err error)

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

func (*SeveritySelect) IntX added in v0.1.1

func (ss *SeveritySelect) IntX(ctx context.Context) int

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

func (*SeveritySelect) Ints added in v0.1.1

func (ss *SeveritySelect) Ints(ctx context.Context) ([]int, error)

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

func (*SeveritySelect) IntsX added in v0.1.1

func (ss *SeveritySelect) IntsX(ctx context.Context) []int

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

func (*SeveritySelect) Scan added in v0.1.1

func (ss *SeveritySelect) Scan(ctx context.Context, v interface{}) error

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

func (*SeveritySelect) ScanX added in v0.1.1

func (ss *SeveritySelect) ScanX(ctx context.Context, v interface{})

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

func (*SeveritySelect) String added in v0.1.1

func (ss *SeveritySelect) String(ctx context.Context) (_ string, err error)

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

func (*SeveritySelect) StringX added in v0.1.1

func (ss *SeveritySelect) StringX(ctx context.Context) string

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

func (*SeveritySelect) Strings added in v0.1.1

func (ss *SeveritySelect) Strings(ctx context.Context) ([]string, error)

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

func (*SeveritySelect) StringsX added in v0.1.1

func (ss *SeveritySelect) StringsX(ctx context.Context) []string

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

type SeverityUpdate added in v0.1.1

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

SeverityUpdate is the builder for updating Severity entities.

func (*SeverityUpdate) AddVulnerabilities added in v0.1.1

func (su *SeverityUpdate) AddVulnerabilities(v ...*Vulnerability) *SeverityUpdate

AddVulnerabilities adds the "vulnerabilities" edges to the Vulnerability entity.

func (*SeverityUpdate) AddVulnerabilityIDs added in v0.1.1

func (su *SeverityUpdate) AddVulnerabilityIDs(ids ...string) *SeverityUpdate

AddVulnerabilityIDs adds the "vulnerabilities" edge to the Vulnerability entity by IDs.

func (*SeverityUpdate) ClearColor added in v0.1.1

func (su *SeverityUpdate) ClearColor() *SeverityUpdate

ClearColor clears the value of the "color" field.

func (*SeverityUpdate) ClearVulnerabilities added in v0.1.1

func (su *SeverityUpdate) ClearVulnerabilities() *SeverityUpdate

ClearVulnerabilities clears all "vulnerabilities" edges to the Vulnerability entity.

func (*SeverityUpdate) Exec added in v0.1.1

func (su *SeverityUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*SeverityUpdate) ExecX added in v0.1.1

func (su *SeverityUpdate) ExecX(ctx context.Context)

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

func (*SeverityUpdate) Mutation added in v0.1.1

func (su *SeverityUpdate) Mutation() *SeverityMutation

Mutation returns the SeverityMutation object of the builder.

func (*SeverityUpdate) RemoveVulnerabilities added in v0.1.1

func (su *SeverityUpdate) RemoveVulnerabilities(v ...*Vulnerability) *SeverityUpdate

RemoveVulnerabilities removes "vulnerabilities" edges to Vulnerability entities.

func (*SeverityUpdate) RemoveVulnerabilityIDs added in v0.1.1

func (su *SeverityUpdate) RemoveVulnerabilityIDs(ids ...string) *SeverityUpdate

RemoveVulnerabilityIDs removes the "vulnerabilities" edge to Vulnerability entities by IDs.

func (*SeverityUpdate) Save added in v0.1.1

func (su *SeverityUpdate) Save(ctx context.Context) (int, error)

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

func (*SeverityUpdate) SaveX added in v0.1.1

func (su *SeverityUpdate) SaveX(ctx context.Context) int

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

func (*SeverityUpdate) SetColor added in v0.1.1

func (su *SeverityUpdate) SetColor(s string) *SeverityUpdate

SetColor sets the "color" field.

func (*SeverityUpdate) SetLabel added in v0.1.1

func (su *SeverityUpdate) SetLabel(s string) *SeverityUpdate

SetLabel sets the "label" field.

func (*SeverityUpdate) SetNillableColor added in v0.1.1

func (su *SeverityUpdate) SetNillableColor(s *string) *SeverityUpdate

SetNillableColor sets the "color" field if the given value is not nil.

func (*SeverityUpdate) Where added in v0.1.1

func (su *SeverityUpdate) Where(ps ...predicate.Severity) *SeverityUpdate

Where appends a list predicates to the SeverityUpdate builder.

type SeverityUpdateOne added in v0.1.1

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

SeverityUpdateOne is the builder for updating a single Severity entity.

func (*SeverityUpdateOne) AddVulnerabilities added in v0.1.1

func (suo *SeverityUpdateOne) AddVulnerabilities(v ...*Vulnerability) *SeverityUpdateOne

AddVulnerabilities adds the "vulnerabilities" edges to the Vulnerability entity.

func (*SeverityUpdateOne) AddVulnerabilityIDs added in v0.1.1

func (suo *SeverityUpdateOne) AddVulnerabilityIDs(ids ...string) *SeverityUpdateOne

AddVulnerabilityIDs adds the "vulnerabilities" edge to the Vulnerability entity by IDs.

func (*SeverityUpdateOne) ClearColor added in v0.1.1

func (suo *SeverityUpdateOne) ClearColor() *SeverityUpdateOne

ClearColor clears the value of the "color" field.

func (*SeverityUpdateOne) ClearVulnerabilities added in v0.1.1

func (suo *SeverityUpdateOne) ClearVulnerabilities() *SeverityUpdateOne

ClearVulnerabilities clears all "vulnerabilities" edges to the Vulnerability entity.

func (*SeverityUpdateOne) Exec added in v0.1.1

func (suo *SeverityUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*SeverityUpdateOne) ExecX added in v0.1.1

func (suo *SeverityUpdateOne) ExecX(ctx context.Context)

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

func (*SeverityUpdateOne) Mutation added in v0.1.1

func (suo *SeverityUpdateOne) Mutation() *SeverityMutation

Mutation returns the SeverityMutation object of the builder.

func (*SeverityUpdateOne) RemoveVulnerabilities added in v0.1.1

func (suo *SeverityUpdateOne) RemoveVulnerabilities(v ...*Vulnerability) *SeverityUpdateOne

RemoveVulnerabilities removes "vulnerabilities" edges to Vulnerability entities.

func (*SeverityUpdateOne) RemoveVulnerabilityIDs added in v0.1.1

func (suo *SeverityUpdateOne) RemoveVulnerabilityIDs(ids ...string) *SeverityUpdateOne

RemoveVulnerabilityIDs removes the "vulnerabilities" edge to Vulnerability entities by IDs.

func (*SeverityUpdateOne) Save added in v0.1.1

func (suo *SeverityUpdateOne) Save(ctx context.Context) (*Severity, error)

Save executes the query and returns the updated Severity entity.

func (*SeverityUpdateOne) SaveX added in v0.1.1

func (suo *SeverityUpdateOne) SaveX(ctx context.Context) *Severity

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

func (*SeverityUpdateOne) Select added in v0.1.1

func (suo *SeverityUpdateOne) Select(field string, fields ...string) *SeverityUpdateOne

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

func (*SeverityUpdateOne) SetColor added in v0.1.1

func (suo *SeverityUpdateOne) SetColor(s string) *SeverityUpdateOne

SetColor sets the "color" field.

func (*SeverityUpdateOne) SetLabel added in v0.1.1

func (suo *SeverityUpdateOne) SetLabel(s string) *SeverityUpdateOne

SetLabel sets the "label" field.

func (*SeverityUpdateOne) SetNillableColor added in v0.1.1

func (suo *SeverityUpdateOne) SetNillableColor(s *string) *SeverityUpdateOne

SetNillableColor sets the "color" field if the given value is not nil.

type SeverityUpsert added in v0.1.1

type SeverityUpsert struct {
	*sql.UpdateSet
}

SeverityUpsert is the "OnConflict" setter.

func (*SeverityUpsert) ClearColor added in v0.1.1

func (u *SeverityUpsert) ClearColor() *SeverityUpsert

ClearColor clears the value of the "color" field.

func (*SeverityUpsert) SetColor added in v0.1.1

func (u *SeverityUpsert) SetColor(v string) *SeverityUpsert

SetColor sets the "color" field.

func (*SeverityUpsert) SetLabel added in v0.1.1

func (u *SeverityUpsert) SetLabel(v string) *SeverityUpsert

SetLabel sets the "label" field.

func (*SeverityUpsert) UpdateColor added in v0.1.1

func (u *SeverityUpsert) UpdateColor() *SeverityUpsert

UpdateColor sets the "color" field to the value that was provided on create.

func (*SeverityUpsert) UpdateLabel added in v0.1.1

func (u *SeverityUpsert) UpdateLabel() *SeverityUpsert

UpdateLabel sets the "label" field to the value that was provided on create.

type SeverityUpsertBulk added in v0.1.1

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

SeverityUpsertBulk is the builder for "upsert"-ing a bulk of Severity nodes.

func (*SeverityUpsertBulk) ClearColor added in v0.1.1

func (u *SeverityUpsertBulk) ClearColor() *SeverityUpsertBulk

ClearColor clears the value of the "color" field.

func (*SeverityUpsertBulk) DoNothing added in v0.1.1

func (u *SeverityUpsertBulk) DoNothing() *SeverityUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SeverityUpsertBulk) Exec added in v0.1.1

func (u *SeverityUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*SeverityUpsertBulk) ExecX added in v0.1.1

func (u *SeverityUpsertBulk) ExecX(ctx context.Context)

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

func (*SeverityUpsertBulk) Ignore added in v0.1.1

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Severity.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SeverityUpsertBulk) SetColor added in v0.1.1

SetColor sets the "color" field.

func (*SeverityUpsertBulk) SetLabel added in v0.1.1

SetLabel sets the "label" field.

func (*SeverityUpsertBulk) Update added in v0.1.1

func (u *SeverityUpsertBulk) Update(set func(*SeverityUpsert)) *SeverityUpsertBulk

Update allows overriding fields `UPDATE` values. See the SeverityCreateBulk.OnConflict documentation for more info.

func (*SeverityUpsertBulk) UpdateColor added in v0.1.1

func (u *SeverityUpsertBulk) UpdateColor() *SeverityUpsertBulk

UpdateColor sets the "color" field to the value that was provided on create.

func (*SeverityUpsertBulk) UpdateLabel added in v0.1.1

func (u *SeverityUpsertBulk) UpdateLabel() *SeverityUpsertBulk

UpdateLabel sets the "label" field to the value that was provided on create.

func (*SeverityUpsertBulk) UpdateNewValues added in v0.1.1

func (u *SeverityUpsertBulk) UpdateNewValues() *SeverityUpsertBulk

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.Severity.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

type SeverityUpsertOne added in v0.1.1

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

SeverityUpsertOne is the builder for "upsert"-ing

one Severity node.

func (*SeverityUpsertOne) ClearColor added in v0.1.1

func (u *SeverityUpsertOne) ClearColor() *SeverityUpsertOne

ClearColor clears the value of the "color" field.

func (*SeverityUpsertOne) DoNothing added in v0.1.1

func (u *SeverityUpsertOne) DoNothing() *SeverityUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*SeverityUpsertOne) Exec added in v0.1.1

func (u *SeverityUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*SeverityUpsertOne) ExecX added in v0.1.1

func (u *SeverityUpsertOne) ExecX(ctx context.Context)

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

func (*SeverityUpsertOne) ID added in v0.1.1

func (u *SeverityUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*SeverityUpsertOne) IDX added in v0.1.1

func (u *SeverityUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*SeverityUpsertOne) Ignore added in v0.1.1

func (u *SeverityUpsertOne) Ignore() *SeverityUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Severity.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*SeverityUpsertOne) SetColor added in v0.1.1

func (u *SeverityUpsertOne) SetColor(v string) *SeverityUpsertOne

SetColor sets the "color" field.

func (*SeverityUpsertOne) SetLabel added in v0.1.1

func (u *SeverityUpsertOne) SetLabel(v string) *SeverityUpsertOne

SetLabel sets the "label" field.

func (*SeverityUpsertOne) Update added in v0.1.1

func (u *SeverityUpsertOne) Update(set func(*SeverityUpsert)) *SeverityUpsertOne

Update allows overriding fields `UPDATE` values. See the SeverityCreate.OnConflict documentation for more info.

func (*SeverityUpsertOne) UpdateColor added in v0.1.1

func (u *SeverityUpsertOne) UpdateColor() *SeverityUpsertOne

UpdateColor sets the "color" field to the value that was provided on create.

func (*SeverityUpsertOne) UpdateLabel added in v0.1.1

func (u *SeverityUpsertOne) UpdateLabel() *SeverityUpsertOne

UpdateLabel sets the "label" field to the value that was provided on create.

func (*SeverityUpsertOne) UpdateNewValues added in v0.1.1

func (u *SeverityUpsertOne) UpdateNewValues() *SeverityUpsertOne

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.Severity.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

type Tx

type Tx struct {

	// AuthStateCache is the client for interacting with the AuthStateCache builders.
	AuthStateCache *AuthStateCacheClient
	// PackageRecord is the client for interacting with the PackageRecord builders.
	PackageRecord *PackageRecordClient
	// Repository is the client for interacting with the Repository builders.
	Repository *RepositoryClient
	// Scan is the client for interacting with the Scan builders.
	Scan *ScanClient
	// Session is the client for interacting with the Session builders.
	Session *SessionClient
	// Severity is the client for interacting with the Severity builders.
	Severity *SeverityClient
	// User is the client for interacting with the User builders.
	User *UserClient
	// VulnStatus is the client for interacting with the VulnStatus builders.
	VulnStatus *VulnStatusClient
	// VulnStatusIndex is the client for interacting with the VulnStatusIndex builders.
	VulnStatusIndex *VulnStatusIndexClient
	// Vulnerability is the client for interacting with the Vulnerability builders.
	Vulnerability *VulnerabilityClient
	// 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) 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 int `json:"id,omitempty"`
	// GithubID holds the value of the "github_id" field.
	GithubID int64 `json:"github_id,omitempty"`
	// Login holds the value of the "login" field.
	Login string `json:"login,omitempty"`
	// Name holds the value of the "name" field.
	Name string `json:"name,omitempty"`
	// AvatarURL holds the value of the "avatar_url" field.
	AvatarURL string `json:"avatar_url,omitempty"`
	// URL holds the value of the "url" field.
	URL string `json:"url,omitempty"`
	// 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) QueryEditedStatus

func (u *User) QueryEditedStatus() *VulnStatusQuery

QueryEditedStatus queries the "edited_status" 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 int) *UserDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*UserClient) Get

func (c *UserClient) Get(ctx context.Context, id int) (*User, error)

Get returns a User entity by its id.

func (*UserClient) GetX

func (c *UserClient) GetX(ctx context.Context, id int) *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) QueryEditedStatus

func (c *UserClient) QueryEditedStatus(u *User) *VulnStatusQuery

QueryEditedStatus queries the edited_status 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 int) *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) AddEditedStatuIDs

func (uc *UserCreate) AddEditedStatuIDs(ids ...int) *UserCreate

AddEditedStatuIDs adds the "edited_status" edge to the VulnStatus entity by IDs.

func (*UserCreate) AddEditedStatus

func (uc *UserCreate) AddEditedStatus(v ...*VulnStatus) *UserCreate

AddEditedStatus adds the "edited_status" edges to the VulnStatus 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) OnConflict

func (uc *UserCreate) OnConflict(opts ...sql.ConflictOption) *UserUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.Create().
	SetGithubID(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetGithubID(v+v).
	}).
	Exec(ctx)

func (*UserCreate) OnConflictColumns

func (uc *UserCreate) OnConflictColumns(columns ...string) *UserUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

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

func (uc *UserCreate) SetAvatarURL(s string) *UserCreate

SetAvatarURL sets the "avatar_url" field.

func (*UserCreate) SetGithubID

func (uc *UserCreate) SetGithubID(i int64) *UserCreate

SetGithubID sets the "github_id" field.

func (*UserCreate) SetLogin

func (uc *UserCreate) SetLogin(s string) *UserCreate

SetLogin sets the "login" field.

func (*UserCreate) SetName

func (uc *UserCreate) SetName(s string) *UserCreate

SetName sets the "name" field.

func (*UserCreate) SetURL

func (uc *UserCreate) SetURL(s string) *UserCreate

SetURL sets the "url" 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) OnConflict

func (ucb *UserCreateBulk) OnConflict(opts ...sql.ConflictOption) *UserUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.User.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.UserUpsert) {
		SetGithubID(v+v).
	}).
	Exec(ctx)

func (*UserCreateBulk) OnConflictColumns

func (ucb *UserCreateBulk) OnConflictColumns(columns ...string) *UserUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

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 {
	// EditedStatus holds the value of the edited_status edge.
	EditedStatus []*VulnStatus `json:"edited_status,omitempty"`
	// contains filtered or unexported fields
}

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

func (UserEdges) EditedStatusOrErr

func (e UserEdges) EditedStatusOrErr() ([]*VulnStatus, error)

EditedStatusOrErr returns the EditedStatus 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) AddEditedStatuIDs

func (m *UserMutation) AddEditedStatuIDs(ids ...int)

AddEditedStatuIDs adds the "edited_status" edge to the VulnStatus 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) AddGithubID

func (m *UserMutation) AddGithubID(i int64)

AddGithubID adds i to the "github_id" field.

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

func (m *UserMutation) AddedGithubID() (r int64, exists bool)

AddedGithubID returns the value that was added to the "github_id" field in 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) AvatarURL

func (m *UserMutation) AvatarURL() (r string, exists bool)

AvatarURL returns the value of the "avatar_url" field in the mutation.

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

func (m *UserMutation) ClearEditedStatus()

ClearEditedStatus clears the "edited_status" edge to the VulnStatus entity.

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

func (m *UserMutation) EditedStatusCleared() bool

EditedStatusCleared reports if the "edited_status" edge to the VulnStatus entity was cleared.

func (*UserMutation) EditedStatusIDs

func (m *UserMutation) EditedStatusIDs() (ids []int)

EditedStatusIDs returns the "edited_status" edge IDs 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) GithubID

func (m *UserMutation) GithubID() (r int64, exists bool)

GithubID returns the value of the "github_id" field in the mutation.

func (*UserMutation) ID

func (m *UserMutation) 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 (*UserMutation) Login

func (m *UserMutation) Login() (r string, exists bool)

Login returns the value of the "login" field in the mutation.

func (*UserMutation) Name

func (m *UserMutation) Name() (r string, exists bool)

Name returns the value of the "name" field in the mutation.

func (*UserMutation) OldAvatarURL

func (m *UserMutation) OldAvatarURL(ctx context.Context) (v string, err error)

OldAvatarURL returns the old "avatar_url" 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) OldGithubID

func (m *UserMutation) OldGithubID(ctx context.Context) (v int64, err error)

OldGithubID returns the old "github_id" 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) OldName

func (m *UserMutation) OldName(ctx context.Context) (v string, err error)

OldName returns the old "name" 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) OldURL

func (m *UserMutation) OldURL(ctx context.Context) (v string, err error)

OldURL returns the old "url" 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) RemoveEditedStatuIDs

func (m *UserMutation) RemoveEditedStatuIDs(ids ...int)

RemoveEditedStatuIDs removes the "edited_status" edge to the VulnStatus entity by IDs.

func (*UserMutation) RemovedEdges

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

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

func (*UserMutation) RemovedEditedStatusIDs

func (m *UserMutation) RemovedEditedStatusIDs() (ids []int)

RemovedEditedStatus returns the removed IDs of the "edited_status" edge to the VulnStatus entity.

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

func (m *UserMutation) ResetAvatarURL()

ResetAvatarURL resets all changes to the "avatar_url" field.

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

func (m *UserMutation) ResetEditedStatus()

ResetEditedStatus resets all changes to the "edited_status" edge.

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

func (m *UserMutation) ResetGithubID()

ResetGithubID resets all changes to the "github_id" field.

func (*UserMutation) ResetLogin

func (m *UserMutation) ResetLogin()

ResetLogin resets all changes to the "login" field.

func (*UserMutation) ResetName

func (m *UserMutation) ResetName()

ResetName resets all changes to the "name" field.

func (*UserMutation) ResetURL

func (m *UserMutation) ResetURL()

ResetURL resets all changes to the "url" field.

func (*UserMutation) SetAvatarURL

func (m *UserMutation) SetAvatarURL(s string)

SetAvatarURL sets the "avatar_url" 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) SetGithubID

func (m *UserMutation) SetGithubID(i int64)

SetGithubID sets the "github_id" field.

func (*UserMutation) SetLogin

func (m *UserMutation) SetLogin(s string)

SetLogin sets the "login" field.

func (*UserMutation) SetName

func (m *UserMutation) SetName(s string)

SetName sets the "name" field.

func (*UserMutation) SetURL

func (m *UserMutation) SetURL(s string)

SetURL sets the "url" field.

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

func (m *UserMutation) URL() (r string, exists bool)

URL returns the value of the "url" 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 int, 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) int

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) 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 {
	GithubID int64 `json:"github_id,omitempty"`
	Count int `json:"count,omitempty"`
}

client.User.Query().
	GroupBy(user.FieldGithubID).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*UserQuery) IDs

func (uq *UserQuery) IDs(ctx context.Context) ([]int, error)

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

func (*UserQuery) IDsX

func (uq *UserQuery) IDsX(ctx context.Context) []int

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 exactly one User entity is not found. Returns a *NotFoundError when no User entities are found.

func (*UserQuery) OnlyID

func (uq *UserQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*UserQuery) OnlyIDX

func (uq *UserQuery) OnlyIDX(ctx context.Context) int

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

func (uq *UserQuery) QueryEditedStatus() *VulnStatusQuery

QueryEditedStatus chains the current query on the "edited_status" 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 {
	GithubID int64 `json:"github_id,omitempty"`
}

client.User.Query().
	Select(user.FieldGithubID).
	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) WithEditedStatus

func (uq *UserQuery) WithEditedStatus(opts ...func(*VulnStatusQuery)) *UserQuery

WithEditedStatus tells the query-builder to eager-load the nodes that are connected to the "edited_status" 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) AddEditedStatuIDs

func (uu *UserUpdate) AddEditedStatuIDs(ids ...int) *UserUpdate

AddEditedStatuIDs adds the "edited_status" edge to the VulnStatus entity by IDs.

func (*UserUpdate) AddEditedStatus

func (uu *UserUpdate) AddEditedStatus(v ...*VulnStatus) *UserUpdate

AddEditedStatus adds the "edited_status" edges to the VulnStatus entity.

func (*UserUpdate) ClearEditedStatus

func (uu *UserUpdate) ClearEditedStatus() *UserUpdate

ClearEditedStatus clears all "edited_status" edges to the VulnStatus 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) RemoveEditedStatuIDs

func (uu *UserUpdate) RemoveEditedStatuIDs(ids ...int) *UserUpdate

RemoveEditedStatuIDs removes the "edited_status" edge to VulnStatus entities by IDs.

func (*UserUpdate) RemoveEditedStatus

func (uu *UserUpdate) RemoveEditedStatus(v ...*VulnStatus) *UserUpdate

RemoveEditedStatus removes "edited_status" edges to VulnStatus 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) SetAvatarURL

func (uu *UserUpdate) SetAvatarURL(s string) *UserUpdate

SetAvatarURL sets the "avatar_url" field.

func (*UserUpdate) SetLogin

func (uu *UserUpdate) SetLogin(s string) *UserUpdate

SetLogin sets the "login" field.

func (*UserUpdate) SetName

func (uu *UserUpdate) SetName(s string) *UserUpdate

SetName sets the "name" field.

func (*UserUpdate) SetURL

func (uu *UserUpdate) SetURL(s string) *UserUpdate

SetURL sets the "url" 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) AddEditedStatuIDs

func (uuo *UserUpdateOne) AddEditedStatuIDs(ids ...int) *UserUpdateOne

AddEditedStatuIDs adds the "edited_status" edge to the VulnStatus entity by IDs.

func (*UserUpdateOne) AddEditedStatus

func (uuo *UserUpdateOne) AddEditedStatus(v ...*VulnStatus) *UserUpdateOne

AddEditedStatus adds the "edited_status" edges to the VulnStatus entity.

func (*UserUpdateOne) ClearEditedStatus

func (uuo *UserUpdateOne) ClearEditedStatus() *UserUpdateOne

ClearEditedStatus clears all "edited_status" edges to the VulnStatus 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) RemoveEditedStatuIDs

func (uuo *UserUpdateOne) RemoveEditedStatuIDs(ids ...int) *UserUpdateOne

RemoveEditedStatuIDs removes the "edited_status" edge to VulnStatus entities by IDs.

func (*UserUpdateOne) RemoveEditedStatus

func (uuo *UserUpdateOne) RemoveEditedStatus(v ...*VulnStatus) *UserUpdateOne

RemoveEditedStatus removes "edited_status" edges to VulnStatus 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) SetAvatarURL

func (uuo *UserUpdateOne) SetAvatarURL(s string) *UserUpdateOne

SetAvatarURL sets the "avatar_url" field.

func (*UserUpdateOne) SetLogin

func (uuo *UserUpdateOne) SetLogin(s string) *UserUpdateOne

SetLogin sets the "login" field.

func (*UserUpdateOne) SetName

func (uuo *UserUpdateOne) SetName(s string) *UserUpdateOne

SetName sets the "name" field.

func (*UserUpdateOne) SetURL

func (uuo *UserUpdateOne) SetURL(s string) *UserUpdateOne

SetURL sets the "url" field.

type UserUpsert

type UserUpsert struct {
	*sql.UpdateSet
}

UserUpsert is the "OnConflict" setter.

func (*UserUpsert) SetAvatarURL

func (u *UserUpsert) SetAvatarURL(v string) *UserUpsert

SetAvatarURL sets the "avatar_url" field.

func (*UserUpsert) SetGithubID

func (u *UserUpsert) SetGithubID(v int64) *UserUpsert

SetGithubID sets the "github_id" field.

func (*UserUpsert) SetLogin

func (u *UserUpsert) SetLogin(v string) *UserUpsert

SetLogin sets the "login" field.

func (*UserUpsert) SetName

func (u *UserUpsert) SetName(v string) *UserUpsert

SetName sets the "name" field.

func (*UserUpsert) SetURL

func (u *UserUpsert) SetURL(v string) *UserUpsert

SetURL sets the "url" field.

func (*UserUpsert) UpdateAvatarURL

func (u *UserUpsert) UpdateAvatarURL() *UserUpsert

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*UserUpsert) UpdateGithubID

func (u *UserUpsert) UpdateGithubID() *UserUpsert

UpdateGithubID sets the "github_id" field to the value that was provided on create.

func (*UserUpsert) UpdateLogin

func (u *UserUpsert) UpdateLogin() *UserUpsert

UpdateLogin sets the "login" field to the value that was provided on create.

func (*UserUpsert) UpdateName

func (u *UserUpsert) UpdateName() *UserUpsert

UpdateName sets the "name" field to the value that was provided on create.

func (*UserUpsert) UpdateURL

func (u *UserUpsert) UpdateURL() *UserUpsert

UpdateURL sets the "url" field to the value that was provided on create.

type UserUpsertBulk

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

UserUpsertBulk is the builder for "upsert"-ing a bulk of User nodes.

func (*UserUpsertBulk) DoNothing

func (u *UserUpsertBulk) DoNothing() *UserUpsertBulk

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertBulk) Exec

func (u *UserUpsertBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertBulk) ExecX

func (u *UserUpsertBulk) ExecX(ctx context.Context)

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

func (*UserUpsertBulk) Ignore

func (u *UserUpsertBulk) Ignore() *UserUpsertBulk

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserUpsertBulk) SetAvatarURL

func (u *UserUpsertBulk) SetAvatarURL(v string) *UserUpsertBulk

SetAvatarURL sets the "avatar_url" field.

func (*UserUpsertBulk) SetGithubID

func (u *UserUpsertBulk) SetGithubID(v int64) *UserUpsertBulk

SetGithubID sets the "github_id" field.

func (*UserUpsertBulk) SetLogin

func (u *UserUpsertBulk) SetLogin(v string) *UserUpsertBulk

SetLogin sets the "login" field.

func (*UserUpsertBulk) SetName

func (u *UserUpsertBulk) SetName(v string) *UserUpsertBulk

SetName sets the "name" field.

func (*UserUpsertBulk) SetURL

func (u *UserUpsertBulk) SetURL(v string) *UserUpsertBulk

SetURL sets the "url" field.

func (*UserUpsertBulk) Update

func (u *UserUpsertBulk) Update(set func(*UserUpsert)) *UserUpsertBulk

Update allows overriding fields `UPDATE` values. See the UserCreateBulk.OnConflict documentation for more info.

func (*UserUpsertBulk) UpdateAvatarURL

func (u *UserUpsertBulk) UpdateAvatarURL() *UserUpsertBulk

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateGithubID

func (u *UserUpsertBulk) UpdateGithubID() *UserUpsertBulk

UpdateGithubID sets the "github_id" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateLogin

func (u *UserUpsertBulk) UpdateLogin() *UserUpsertBulk

UpdateLogin sets the "login" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateName

func (u *UserUpsertBulk) UpdateName() *UserUpsertBulk

UpdateName sets the "name" field to the value that was provided on create.

func (*UserUpsertBulk) UpdateNewValues

func (u *UserUpsertBulk) UpdateNewValues() *UserUpsertBulk

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

func (*UserUpsertBulk) UpdateURL

func (u *UserUpsertBulk) UpdateURL() *UserUpsertBulk

UpdateURL sets the "url" field to the value that was provided on create.

type UserUpsertOne

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

UserUpsertOne is the builder for "upsert"-ing

one User node.

func (*UserUpsertOne) DoNothing

func (u *UserUpsertOne) DoNothing() *UserUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*UserUpsertOne) Exec

func (u *UserUpsertOne) Exec(ctx context.Context) error

Exec executes the query.

func (*UserUpsertOne) ExecX

func (u *UserUpsertOne) ExecX(ctx context.Context)

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

func (*UserUpsertOne) ID

func (u *UserUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*UserUpsertOne) IDX

func (u *UserUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*UserUpsertOne) Ignore

func (u *UserUpsertOne) Ignore() *UserUpsertOne

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*UserUpsertOne) SetAvatarURL

func (u *UserUpsertOne) SetAvatarURL(v string) *UserUpsertOne

SetAvatarURL sets the "avatar_url" field.

func (*UserUpsertOne) SetGithubID

func (u *UserUpsertOne) SetGithubID(v int64) *UserUpsertOne

SetGithubID sets the "github_id" field.

func (*UserUpsertOne) SetLogin

func (u *UserUpsertOne) SetLogin(v string) *UserUpsertOne

SetLogin sets the "login" field.

func (*UserUpsertOne) SetName

func (u *UserUpsertOne) SetName(v string) *UserUpsertOne

SetName sets the "name" field.

func (*UserUpsertOne) SetURL

func (u *UserUpsertOne) SetURL(v string) *UserUpsertOne

SetURL sets the "url" field.

func (*UserUpsertOne) Update

func (u *UserUpsertOne) Update(set func(*UserUpsert)) *UserUpsertOne

Update allows overriding fields `UPDATE` values. See the UserCreate.OnConflict documentation for more info.

func (*UserUpsertOne) UpdateAvatarURL

func (u *UserUpsertOne) UpdateAvatarURL() *UserUpsertOne

UpdateAvatarURL sets the "avatar_url" field to the value that was provided on create.

func (*UserUpsertOne) UpdateGithubID

func (u *UserUpsertOne) UpdateGithubID() *UserUpsertOne

UpdateGithubID sets the "github_id" field to the value that was provided on create.

func (*UserUpsertOne) UpdateLogin

func (u *UserUpsertOne) UpdateLogin() *UserUpsertOne

UpdateLogin sets the "login" field to the value that was provided on create.

func (*UserUpsertOne) UpdateName

func (u *UserUpsertOne) UpdateName() *UserUpsertOne

UpdateName sets the "name" field to the value that was provided on create.

func (*UserUpsertOne) UpdateNewValues

func (u *UserUpsertOne) UpdateNewValues() *UserUpsertOne

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.User.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

func (*UserUpsertOne) UpdateURL

func (u *UserUpsertOne) UpdateURL() *UserUpsertOne

UpdateURL sets the "url" field to the value that was provided on create.

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 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.

type VulnStatus

type VulnStatus struct {

	// ID of the ent.
	ID int `json:"id,omitempty"`
	// Status holds the value of the "status" field.
	Status types.VulnStatusType `json:"status,omitempty"`
	// Source holds the value of the "source" field.
	Source string `json:"source,omitempty"`
	// PkgName holds the value of the "pkg_name" field.
	PkgName string `json:"pkg_name,omitempty"`
	// PkgType holds the value of the "pkg_type" field.
	PkgType string `json:"pkg_type,omitempty"`
	// VulnID holds the value of the "vuln_id" field.
	VulnID string `json:"vuln_id,omitempty"`
	// ExpiresAt holds the value of the "expires_at" field.
	ExpiresAt int64 `json:"expires_at,omitempty"`
	// CreatedAt holds the value of the "created_at" field.
	CreatedAt int64 `json:"created_at,omitempty"`
	// Comment holds the value of the "comment" field.
	Comment string `json:"comment,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the VulnStatusQuery when eager-loading is set.
	Edges VulnStatusEdges `json:"edges"`
	// contains filtered or unexported fields
}

VulnStatus is the model entity for the VulnStatus schema.

func (*VulnStatus) QueryAuthor

func (vs *VulnStatus) QueryAuthor() *UserQuery

QueryAuthor queries the "author" edge of the VulnStatus entity.

func (*VulnStatus) String

func (vs *VulnStatus) String() string

String implements the fmt.Stringer.

func (*VulnStatus) Unwrap

func (vs *VulnStatus) Unwrap() *VulnStatus

Unwrap unwraps the VulnStatus 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 (*VulnStatus) Update

func (vs *VulnStatus) Update() *VulnStatusUpdateOne

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

type VulnStatusClient

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

VulnStatusClient is a client for the VulnStatus schema.

func NewVulnStatusClient

func NewVulnStatusClient(c config) *VulnStatusClient

NewVulnStatusClient returns a client for the VulnStatus from the given config.

func (*VulnStatusClient) Create

func (c *VulnStatusClient) Create() *VulnStatusCreate

Create returns a create builder for VulnStatus.

func (*VulnStatusClient) CreateBulk

func (c *VulnStatusClient) CreateBulk(builders ...*VulnStatusCreate) *VulnStatusCreateBulk

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

func (*VulnStatusClient) Delete

func (c *VulnStatusClient) Delete() *VulnStatusDelete

Delete returns a delete builder for VulnStatus.

func (*VulnStatusClient) DeleteOne

func (c *VulnStatusClient) DeleteOne(vs *VulnStatus) *VulnStatusDeleteOne

DeleteOne returns a delete builder for the given entity.

func (*VulnStatusClient) DeleteOneID

func (c *VulnStatusClient) DeleteOneID(id int) *VulnStatusDeleteOne

DeleteOneID returns a delete builder for the given id.

func (*VulnStatusClient) Get

func (c *VulnStatusClient) Get(ctx context.Context, id int) (*VulnStatus, error)

Get returns a VulnStatus entity by its id.

func (*VulnStatusClient) GetX

func (c *VulnStatusClient) GetX(ctx context.Context, id int) *VulnStatus

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

func (*VulnStatusClient) Hooks

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

Hooks returns the client hooks.

func (*VulnStatusClient) Query

func (c *VulnStatusClient) Query() *VulnStatusQuery

Query returns a query builder for VulnStatus.

func (*VulnStatusClient) QueryAuthor

func (c *VulnStatusClient) QueryAuthor(vs *VulnStatus) *UserQuery

QueryAuthor queries the author edge of a VulnStatus.

func (*VulnStatusClient) Update

func (c *VulnStatusClient) Update() *VulnStatusUpdate

Update returns an update builder for VulnStatus.

func (*VulnStatusClient) UpdateOne

func (c *VulnStatusClient) UpdateOne(vs *VulnStatus) *VulnStatusUpdateOne

UpdateOne returns an update builder for the given entity.

func (*VulnStatusClient) UpdateOneID

func (c *VulnStatusClient) UpdateOneID(id int) *VulnStatusUpdateOne

UpdateOneID returns an update builder for the given id.

func (*VulnStatusClient) Use

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

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

type VulnStatusCreate

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

VulnStatusCreate is the builder for creating a VulnStatus entity.

func (*VulnStatusCreate) Exec

func (vsc *VulnStatusCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*VulnStatusCreate) ExecX

func (vsc *VulnStatusCreate) ExecX(ctx context.Context)

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

func (*VulnStatusCreate) Mutation

func (vsc *VulnStatusCreate) Mutation() *VulnStatusMutation

Mutation returns the VulnStatusMutation object of the builder.

func (*VulnStatusCreate) OnConflict

func (vsc *VulnStatusCreate) OnConflict(opts ...sql.ConflictOption) *VulnStatusUpsertOne

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VulnStatus.Create().
	SetStatus(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VulnStatusUpsert) {
		SetStatus(v+v).
	}).
	Exec(ctx)

func (*VulnStatusCreate) OnConflictColumns

func (vsc *VulnStatusCreate) OnConflictColumns(columns ...string) *VulnStatusUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VulnStatus.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*VulnStatusCreate) Save

func (vsc *VulnStatusCreate) Save(ctx context.Context) (*VulnStatus, error)

Save creates the VulnStatus in the database.

func (*VulnStatusCreate) SaveX

func (vsc *VulnStatusCreate) SaveX(ctx context.Context) *VulnStatus

SaveX calls Save and panics if Save returns an error.

func (*VulnStatusCreate) SetAuthor

func (vsc *VulnStatusCreate) SetAuthor(u *User) *VulnStatusCreate

SetAuthor sets the "author" edge to the User entity.

func (*VulnStatusCreate) SetAuthorID

func (vsc *VulnStatusCreate) SetAuthorID(id int) *VulnStatusCreate

SetAuthorID sets the "author" edge to the User entity by ID.

func (*VulnStatusCreate) SetComment

func (vsc *VulnStatusCreate) SetComment(s string) *VulnStatusCreate

SetComment sets the "comment" field.

func (*VulnStatusCreate) SetCreatedAt

func (vsc *VulnStatusCreate) SetCreatedAt(i int64) *VulnStatusCreate

SetCreatedAt sets the "created_at" field.

func (*VulnStatusCreate) SetExpiresAt

func (vsc *VulnStatusCreate) SetExpiresAt(i int64) *VulnStatusCreate

SetExpiresAt sets the "expires_at" field.

func (*VulnStatusCreate) SetNillableAuthorID

func (vsc *VulnStatusCreate) SetNillableAuthorID(id *int) *VulnStatusCreate

SetNillableAuthorID sets the "author" edge to the User entity by ID if the given value is not nil.

func (*VulnStatusCreate) SetPkgName

func (vsc *VulnStatusCreate) SetPkgName(s string) *VulnStatusCreate

SetPkgName sets the "pkg_name" field.

func (*VulnStatusCreate) SetPkgType

func (vsc *VulnStatusCreate) SetPkgType(s string) *VulnStatusCreate

SetPkgType sets the "pkg_type" field.

func (*VulnStatusCreate) SetSource

func (vsc *VulnStatusCreate) SetSource(s string) *VulnStatusCreate

SetSource sets the "source" field.

func (*VulnStatusCreate) SetStatus

SetStatus sets the "status" field.

func (*VulnStatusCreate) SetVulnID

func (vsc *VulnStatusCreate) SetVulnID(s string) *VulnStatusCreate

SetVulnID sets the "vuln_id" field.

type VulnStatusCreateBulk

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

VulnStatusCreateBulk is the builder for creating many VulnStatus entities in bulk.

func (*VulnStatusCreateBulk) Exec

func (vscb *VulnStatusCreateBulk) Exec(ctx context.Context) error

Exec executes the query.

func (*VulnStatusCreateBulk) ExecX

func (vscb *VulnStatusCreateBulk) ExecX(ctx context.Context)

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

func (*VulnStatusCreateBulk) OnConflict

func (vscb *VulnStatusCreateBulk) OnConflict(opts ...sql.ConflictOption) *VulnStatusUpsertBulk

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VulnStatus.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VulnStatusUpsert) {
		SetStatus(v+v).
	}).
	Exec(ctx)

func (*VulnStatusCreateBulk) OnConflictColumns

func (vscb *VulnStatusCreateBulk) OnConflictColumns(columns ...string) *VulnStatusUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VulnStatus.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*VulnStatusCreateBulk) Save

func (vscb *VulnStatusCreateBulk) Save(ctx context.Context) ([]*VulnStatus, error)

Save creates the VulnStatus entities in the database.

func (*VulnStatusCreateBulk) SaveX

func (vscb *VulnStatusCreateBulk) SaveX(ctx context.Context) []*VulnStatus

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

type VulnStatusDelete

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

VulnStatusDelete is the builder for deleting a VulnStatus entity.

func (*VulnStatusDelete) Exec

func (vsd *VulnStatusDelete) Exec(ctx context.Context) (int, error)

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

func (*VulnStatusDelete) ExecX

func (vsd *VulnStatusDelete) ExecX(ctx context.Context) int

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

func (*VulnStatusDelete) Where

Where appends a list predicates to the VulnStatusDelete builder.

type VulnStatusDeleteOne

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

VulnStatusDeleteOne is the builder for deleting a single VulnStatus entity.

func (*VulnStatusDeleteOne) Exec

func (vsdo *VulnStatusDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*VulnStatusDeleteOne) ExecX

func (vsdo *VulnStatusDeleteOne) ExecX(ctx context.Context)

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

type VulnStatusEdges

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

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

func (VulnStatusEdges) AuthorOrErr

func (e VulnStatusEdges) AuthorOrErr() (*User, error)

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

type VulnStatusGroupBy

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

VulnStatusGroupBy is the group-by builder for VulnStatus entities.

func (*VulnStatusGroupBy) Aggregate

func (vsgb *VulnStatusGroupBy) Aggregate(fns ...AggregateFunc) *VulnStatusGroupBy

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

func (*VulnStatusGroupBy) Bool

func (vsgb *VulnStatusGroupBy) 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 (*VulnStatusGroupBy) BoolX

func (vsgb *VulnStatusGroupBy) BoolX(ctx context.Context) bool

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

func (*VulnStatusGroupBy) Bools

func (vsgb *VulnStatusGroupBy) 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 (*VulnStatusGroupBy) BoolsX

func (vsgb *VulnStatusGroupBy) BoolsX(ctx context.Context) []bool

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

func (*VulnStatusGroupBy) Float64

func (vsgb *VulnStatusGroupBy) 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 (*VulnStatusGroupBy) Float64X

func (vsgb *VulnStatusGroupBy) Float64X(ctx context.Context) float64

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

func (*VulnStatusGroupBy) Float64s

func (vsgb *VulnStatusGroupBy) 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 (*VulnStatusGroupBy) Float64sX

func (vsgb *VulnStatusGroupBy) Float64sX(ctx context.Context) []float64

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

func (*VulnStatusGroupBy) Int

func (vsgb *VulnStatusGroupBy) 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 (*VulnStatusGroupBy) IntX

func (vsgb *VulnStatusGroupBy) IntX(ctx context.Context) int

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

func (*VulnStatusGroupBy) Ints

func (vsgb *VulnStatusGroupBy) 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 (*VulnStatusGroupBy) IntsX

func (vsgb *VulnStatusGroupBy) IntsX(ctx context.Context) []int

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

func (*VulnStatusGroupBy) Scan

func (vsgb *VulnStatusGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*VulnStatusGroupBy) ScanX

func (vsgb *VulnStatusGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*VulnStatusGroupBy) String

func (vsgb *VulnStatusGroupBy) 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 (*VulnStatusGroupBy) StringX

func (vsgb *VulnStatusGroupBy) StringX(ctx context.Context) string

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

func (*VulnStatusGroupBy) Strings

func (vsgb *VulnStatusGroupBy) 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 (*VulnStatusGroupBy) StringsX

func (vsgb *VulnStatusGroupBy) StringsX(ctx context.Context) []string

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

type VulnStatusIndex

type VulnStatusIndex struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the VulnStatusIndexQuery when eager-loading is set.
	Edges VulnStatusIndexEdges `json:"edges"`
	// contains filtered or unexported fields
}

VulnStatusIndex is the model entity for the VulnStatusIndex schema.

func (*VulnStatusIndex) QueryLatest added in v0.0.6

func (vsi *VulnStatusIndex) QueryLatest() *VulnStatusQuery

QueryLatest queries the "latest" edge of the VulnStatusIndex entity.

func (*VulnStatusIndex) QueryStatus

func (vsi *VulnStatusIndex) QueryStatus() *VulnStatusQuery

QueryStatus queries the "status" edge of the VulnStatusIndex entity.

func (*VulnStatusIndex) String

func (vsi *VulnStatusIndex) String() string

String implements the fmt.Stringer.

func (*VulnStatusIndex) Unwrap

func (vsi *VulnStatusIndex) Unwrap() *VulnStatusIndex

Unwrap unwraps the VulnStatusIndex 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 (*VulnStatusIndex) Update

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

type VulnStatusIndexClient

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

VulnStatusIndexClient is a client for the VulnStatusIndex schema.

func NewVulnStatusIndexClient

func NewVulnStatusIndexClient(c config) *VulnStatusIndexClient

NewVulnStatusIndexClient returns a client for the VulnStatusIndex from the given config.

func (*VulnStatusIndexClient) Create

Create returns a create builder for VulnStatusIndex.

func (*VulnStatusIndexClient) CreateBulk

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

func (*VulnStatusIndexClient) Delete

Delete returns a delete builder for VulnStatusIndex.

func (*VulnStatusIndexClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*VulnStatusIndexClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*VulnStatusIndexClient) Get

Get returns a VulnStatusIndex entity by its id.

func (*VulnStatusIndexClient) GetX

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

func (*VulnStatusIndexClient) Hooks

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

Hooks returns the client hooks.

func (*VulnStatusIndexClient) Query

Query returns a query builder for VulnStatusIndex.

func (*VulnStatusIndexClient) QueryLatest added in v0.0.6

QueryLatest queries the latest edge of a VulnStatusIndex.

func (*VulnStatusIndexClient) QueryStatus

QueryStatus queries the status edge of a VulnStatusIndex.

func (*VulnStatusIndexClient) Update

Update returns an update builder for VulnStatusIndex.

func (*VulnStatusIndexClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*VulnStatusIndexClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*VulnStatusIndexClient) Use

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

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

type VulnStatusIndexCreate

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

VulnStatusIndexCreate is the builder for creating a VulnStatusIndex entity.

func (*VulnStatusIndexCreate) AddStatuIDs

func (vsic *VulnStatusIndexCreate) AddStatuIDs(ids ...int) *VulnStatusIndexCreate

AddStatuIDs adds the "status" edge to the VulnStatus entity by IDs.

func (*VulnStatusIndexCreate) AddStatus

func (vsic *VulnStatusIndexCreate) AddStatus(v ...*VulnStatus) *VulnStatusIndexCreate

AddStatus adds the "status" edges to the VulnStatus entity.

func (*VulnStatusIndexCreate) Exec

func (vsic *VulnStatusIndexCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*VulnStatusIndexCreate) ExecX

func (vsic *VulnStatusIndexCreate) ExecX(ctx context.Context)

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

func (*VulnStatusIndexCreate) Mutation

Mutation returns the VulnStatusIndexMutation object of the builder.

func (*VulnStatusIndexCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VulnStatusIndex.Create().
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*VulnStatusIndexCreate) OnConflictColumns

func (vsic *VulnStatusIndexCreate) OnConflictColumns(columns ...string) *VulnStatusIndexUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VulnStatusIndex.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*VulnStatusIndexCreate) Save

Save creates the VulnStatusIndex in the database.

func (*VulnStatusIndexCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*VulnStatusIndexCreate) SetID

SetID sets the "id" field.

func (*VulnStatusIndexCreate) SetLatest added in v0.0.6

SetLatest sets the "latest" edge to the VulnStatus entity.

func (*VulnStatusIndexCreate) SetLatestID added in v0.0.6

func (vsic *VulnStatusIndexCreate) SetLatestID(id int) *VulnStatusIndexCreate

SetLatestID sets the "latest" edge to the VulnStatus entity by ID.

func (*VulnStatusIndexCreate) SetNillableLatestID added in v0.0.6

func (vsic *VulnStatusIndexCreate) SetNillableLatestID(id *int) *VulnStatusIndexCreate

SetNillableLatestID sets the "latest" edge to the VulnStatus entity by ID if the given value is not nil.

type VulnStatusIndexCreateBulk

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

VulnStatusIndexCreateBulk is the builder for creating many VulnStatusIndex entities in bulk.

func (*VulnStatusIndexCreateBulk) Exec

Exec executes the query.

func (*VulnStatusIndexCreateBulk) ExecX

func (vsicb *VulnStatusIndexCreateBulk) ExecX(ctx context.Context)

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

func (*VulnStatusIndexCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.VulnStatusIndex.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	Exec(ctx)

func (*VulnStatusIndexCreateBulk) OnConflictColumns

func (vsicb *VulnStatusIndexCreateBulk) OnConflictColumns(columns ...string) *VulnStatusIndexUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.VulnStatusIndex.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*VulnStatusIndexCreateBulk) Save

Save creates the VulnStatusIndex entities in the database.

func (*VulnStatusIndexCreateBulk) SaveX

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

type VulnStatusIndexDelete

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

VulnStatusIndexDelete is the builder for deleting a VulnStatusIndex entity.

func (*VulnStatusIndexDelete) Exec

func (vsid *VulnStatusIndexDelete) Exec(ctx context.Context) (int, error)

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

func (*VulnStatusIndexDelete) ExecX

func (vsid *VulnStatusIndexDelete) ExecX(ctx context.Context) int

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

func (*VulnStatusIndexDelete) Where

Where appends a list predicates to the VulnStatusIndexDelete builder.

type VulnStatusIndexDeleteOne

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

VulnStatusIndexDeleteOne is the builder for deleting a single VulnStatusIndex entity.

func (*VulnStatusIndexDeleteOne) Exec

func (vsido *VulnStatusIndexDeleteOne) Exec(ctx context.Context) error

Exec executes the deletion query.

func (*VulnStatusIndexDeleteOne) ExecX

func (vsido *VulnStatusIndexDeleteOne) ExecX(ctx context.Context)

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

type VulnStatusIndexEdges

type VulnStatusIndexEdges struct {
	// Latest holds the value of the latest edge.
	Latest *VulnStatus `json:"latest,omitempty"`
	// Status holds the value of the status edge.
	Status []*VulnStatus `json:"status,omitempty"`
	// contains filtered or unexported fields
}

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

func (VulnStatusIndexEdges) LatestOrErr added in v0.0.6

func (e VulnStatusIndexEdges) LatestOrErr() (*VulnStatus, error)

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

func (VulnStatusIndexEdges) StatusOrErr

func (e VulnStatusIndexEdges) StatusOrErr() ([]*VulnStatus, error)

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

type VulnStatusIndexGroupBy

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

VulnStatusIndexGroupBy is the group-by builder for VulnStatusIndex entities.

func (*VulnStatusIndexGroupBy) Aggregate

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

func (*VulnStatusIndexGroupBy) Bool

func (vsigb *VulnStatusIndexGroupBy) 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 (*VulnStatusIndexGroupBy) BoolX

func (vsigb *VulnStatusIndexGroupBy) BoolX(ctx context.Context) bool

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

func (*VulnStatusIndexGroupBy) Bools

func (vsigb *VulnStatusIndexGroupBy) 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 (*VulnStatusIndexGroupBy) BoolsX

func (vsigb *VulnStatusIndexGroupBy) BoolsX(ctx context.Context) []bool

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

func (*VulnStatusIndexGroupBy) Float64

func (vsigb *VulnStatusIndexGroupBy) 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 (*VulnStatusIndexGroupBy) Float64X

func (vsigb *VulnStatusIndexGroupBy) Float64X(ctx context.Context) float64

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

func (*VulnStatusIndexGroupBy) Float64s

func (vsigb *VulnStatusIndexGroupBy) 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 (*VulnStatusIndexGroupBy) Float64sX

func (vsigb *VulnStatusIndexGroupBy) Float64sX(ctx context.Context) []float64

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

func (*VulnStatusIndexGroupBy) Int

func (vsigb *VulnStatusIndexGroupBy) 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 (*VulnStatusIndexGroupBy) IntX

func (vsigb *VulnStatusIndexGroupBy) IntX(ctx context.Context) int

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

func (*VulnStatusIndexGroupBy) Ints

func (vsigb *VulnStatusIndexGroupBy) 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 (*VulnStatusIndexGroupBy) IntsX

func (vsigb *VulnStatusIndexGroupBy) IntsX(ctx context.Context) []int

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

func (*VulnStatusIndexGroupBy) Scan

func (vsigb *VulnStatusIndexGroupBy) Scan(ctx context.Context, v interface{}) error

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

func (*VulnStatusIndexGroupBy) ScanX

func (vsigb *VulnStatusIndexGroupBy) ScanX(ctx context.Context, v interface{})

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

func (*VulnStatusIndexGroupBy) String

func (vsigb *VulnStatusIndexGroupBy) 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 (*VulnStatusIndexGroupBy) StringX

func (vsigb *VulnStatusIndexGroupBy) StringX(ctx context.Context) string

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

func (*VulnStatusIndexGroupBy) Strings

func (vsigb *VulnStatusIndexGroupBy) 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 (*VulnStatusIndexGroupBy) StringsX

func (vsigb *VulnStatusIndexGroupBy) StringsX(ctx context.Context) []string

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

type VulnStatusIndexMutation

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

VulnStatusIndexMutation represents an operation that mutates the VulnStatusIndex nodes in the graph.

func (*VulnStatusIndexMutation) AddField

func (m *VulnStatusIndexMutation) 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 (*VulnStatusIndexMutation) AddStatuIDs

func (m *VulnStatusIndexMutation) AddStatuIDs(ids ...int)

AddStatuIDs adds the "status" edge to the VulnStatus entity by ids.

func (*VulnStatusIndexMutation) AddedEdges

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

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

func (*VulnStatusIndexMutation) AddedField

func (m *VulnStatusIndexMutation) 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 (*VulnStatusIndexMutation) AddedFields

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

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

func (*VulnStatusIndexMutation) AddedIDs

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

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

func (*VulnStatusIndexMutation) ClearEdge

func (m *VulnStatusIndexMutation) 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 (*VulnStatusIndexMutation) ClearField

func (m *VulnStatusIndexMutation) 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 (*VulnStatusIndexMutation) ClearLatest added in v0.0.6

func (m *VulnStatusIndexMutation) ClearLatest()

ClearLatest clears the "latest" edge to the VulnStatus entity.

func (*VulnStatusIndexMutation) ClearStatus

func (m *VulnStatusIndexMutation) ClearStatus()

ClearStatus clears the "status" edge to the VulnStatus entity.

func (*VulnStatusIndexMutation) ClearedEdges

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

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

func (*VulnStatusIndexMutation) ClearedFields

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

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

func (VulnStatusIndexMutation) Client

func (m VulnStatusIndexMutation) 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 (*VulnStatusIndexMutation) EdgeCleared

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

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

func (*VulnStatusIndexMutation) Field

func (m *VulnStatusIndexMutation) 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 (*VulnStatusIndexMutation) FieldCleared

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

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

func (*VulnStatusIndexMutation) Fields

func (m *VulnStatusIndexMutation) 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 (*VulnStatusIndexMutation) ID

func (m *VulnStatusIndexMutation) 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 (*VulnStatusIndexMutation) LatestCleared added in v0.0.6

func (m *VulnStatusIndexMutation) LatestCleared() bool

LatestCleared reports if the "latest" edge to the VulnStatus entity was cleared.

func (*VulnStatusIndexMutation) LatestID added in v0.0.6

func (m *VulnStatusIndexMutation) LatestID() (id int, exists bool)

LatestID returns the "latest" edge ID in the mutation.

func (*VulnStatusIndexMutation) LatestIDs added in v0.0.6

func (m *VulnStatusIndexMutation) LatestIDs() (ids []int)

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

func (*VulnStatusIndexMutation) OldField

func (m *VulnStatusIndexMutation) 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 (*VulnStatusIndexMutation) Op

func (m *VulnStatusIndexMutation) Op() Op

Op returns the operation name.

func (*VulnStatusIndexMutation) RemoveStatuIDs

func (m *VulnStatusIndexMutation) RemoveStatuIDs(ids ...int)

RemoveStatuIDs removes the "status" edge to the VulnStatus entity by IDs.

func (*VulnStatusIndexMutation) RemovedEdges

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

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

func (*VulnStatusIndexMutation) RemovedIDs

func (m *VulnStatusIndexMutation) 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 (*VulnStatusIndexMutation) RemovedStatusIDs

func (m *VulnStatusIndexMutation) RemovedStatusIDs() (ids []int)

RemovedStatus returns the removed IDs of the "status" edge to the VulnStatus entity.

func (*VulnStatusIndexMutation) ResetEdge

func (m *VulnStatusIndexMutation) 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 (*VulnStatusIndexMutation) ResetField

func (m *VulnStatusIndexMutation) 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 (*VulnStatusIndexMutation) ResetLatest added in v0.0.6

func (m *VulnStatusIndexMutation) ResetLatest()

ResetLatest resets all changes to the "latest" edge.

func (*VulnStatusIndexMutation) ResetStatus

func (m *VulnStatusIndexMutation) ResetStatus()

ResetStatus resets all changes to the "status" edge.

func (*VulnStatusIndexMutation) SetField

func (m *VulnStatusIndexMutation) 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 (*VulnStatusIndexMutation) SetID

func (m *VulnStatusIndexMutation) SetID(id string)

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

func (*VulnStatusIndexMutation) SetLatestID added in v0.0.6

func (m *VulnStatusIndexMutation) SetLatestID(id int)

SetLatestID sets the "latest" edge to the VulnStatus entity by id.

func (*VulnStatusIndexMutation) StatusCleared

func (m *VulnStatusIndexMutation) StatusCleared() bool

StatusCleared reports if the "status" edge to the VulnStatus entity was cleared.

func (*VulnStatusIndexMutation) StatusIDs

func (m *VulnStatusIndexMutation) StatusIDs() (ids []int)

StatusIDs returns the "status" edge IDs in the mutation.

func (VulnStatusIndexMutation) Tx

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

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

func (*VulnStatusIndexMutation) Type

func (m *VulnStatusIndexMutation) Type() string

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

func (*VulnStatusIndexMutation) Where

Where appends a list predicates to the VulnStatusIndexMutation builder.

type VulnStatusIndexQuery

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

VulnStatusIndexQuery is the builder for querying VulnStatusIndex entities.

func (*VulnStatusIndexQuery) All

All executes the query and returns a list of VulnStatusIndexes.

func (*VulnStatusIndexQuery) AllX

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

func (*VulnStatusIndexQuery) Clone

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

func (*VulnStatusIndexQuery) Count

func (vsiq *VulnStatusIndexQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VulnStatusIndexQuery) CountX

func (vsiq *VulnStatusIndexQuery) CountX(ctx context.Context) int

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

func (*VulnStatusIndexQuery) Exist

func (vsiq *VulnStatusIndexQuery) Exist(ctx context.Context) (bool, error)

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

func (*VulnStatusIndexQuery) ExistX

func (vsiq *VulnStatusIndexQuery) ExistX(ctx context.Context) bool

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

func (*VulnStatusIndexQuery) First

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

func (*VulnStatusIndexQuery) FirstID

func (vsiq *VulnStatusIndexQuery) FirstID(ctx context.Context) (id string, err error)

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

func (*VulnStatusIndexQuery) FirstIDX

func (vsiq *VulnStatusIndexQuery) FirstIDX(ctx context.Context) string

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

func (*VulnStatusIndexQuery) FirstX

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

func (*VulnStatusIndexQuery) GroupBy

func (vsiq *VulnStatusIndexQuery) GroupBy(field string, fields ...string) *VulnStatusIndexGroupBy

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.

func (*VulnStatusIndexQuery) IDs

func (vsiq *VulnStatusIndexQuery) IDs(ctx context.Context) ([]string, error)

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

func (*VulnStatusIndexQuery) IDsX

func (vsiq *VulnStatusIndexQuery) IDsX(ctx context.Context) []string

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

func (*VulnStatusIndexQuery) Limit

func (vsiq *VulnStatusIndexQuery) Limit(limit int) *VulnStatusIndexQuery

Limit adds a limit step to the query.

func (*VulnStatusIndexQuery) Offset

func (vsiq *VulnStatusIndexQuery) Offset(offset int) *VulnStatusIndexQuery

Offset adds an offset step to the query.

func (*VulnStatusIndexQuery) Only

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

func (*VulnStatusIndexQuery) OnlyID

func (vsiq *VulnStatusIndexQuery) OnlyID(ctx context.Context) (id string, err error)

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

func (*VulnStatusIndexQuery) OnlyIDX

func (vsiq *VulnStatusIndexQuery) OnlyIDX(ctx context.Context) string

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

func (*VulnStatusIndexQuery) OnlyX

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

func (*VulnStatusIndexQuery) Order

Order adds an order step to the query.

func (*VulnStatusIndexQuery) QueryLatest added in v0.0.6

func (vsiq *VulnStatusIndexQuery) QueryLatest() *VulnStatusQuery

QueryLatest chains the current query on the "latest" edge.

func (*VulnStatusIndexQuery) QueryStatus

func (vsiq *VulnStatusIndexQuery) QueryStatus() *VulnStatusQuery

QueryStatus chains the current query on the "status" edge.

func (*VulnStatusIndexQuery) Select

func (vsiq *VulnStatusIndexQuery) Select(fields ...string) *VulnStatusIndexSelect

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

func (*VulnStatusIndexQuery) Unique

func (vsiq *VulnStatusIndexQuery) Unique(unique bool) *VulnStatusIndexQuery

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 (*VulnStatusIndexQuery) Where

Where adds a new predicate for the VulnStatusIndexQuery builder.

func (*VulnStatusIndexQuery) WithLatest added in v0.0.6

func (vsiq *VulnStatusIndexQuery) WithLatest(opts ...func(*VulnStatusQuery)) *VulnStatusIndexQuery

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

func (*VulnStatusIndexQuery) WithStatus

func (vsiq *VulnStatusIndexQuery) WithStatus(opts ...func(*VulnStatusQuery)) *VulnStatusIndexQuery

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

type VulnStatusIndexSelect

type VulnStatusIndexSelect struct {
	*VulnStatusIndexQuery
	// contains filtered or unexported fields
}

VulnStatusIndexSelect is the builder for selecting fields of VulnStatusIndex entities.

func (*VulnStatusIndexSelect) Bool

func (vsis *VulnStatusIndexSelect) Bool(ctx context.Context) (_ bool, err error)

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

func (*VulnStatusIndexSelect) BoolX

func (vsis *VulnStatusIndexSelect) BoolX(ctx context.Context) bool

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

func (*VulnStatusIndexSelect) Bools

func (vsis *VulnStatusIndexSelect) Bools(ctx context.Context) ([]bool, error)

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

func (*VulnStatusIndexSelect) BoolsX

func (vsis *VulnStatusIndexSelect) BoolsX(ctx context.Context) []bool

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

func (*VulnStatusIndexSelect) Float64

func (vsis *VulnStatusIndexSelect) Float64(ctx context.Context) (_ float64, err error)

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

func (*VulnStatusIndexSelect) Float64X

func (vsis *VulnStatusIndexSelect) Float64X(ctx context.Context) float64

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

func (*VulnStatusIndexSelect) Float64s

func (vsis *VulnStatusIndexSelect) Float64s(ctx context.Context) ([]float64, error)

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

func (*VulnStatusIndexSelect) Float64sX

func (vsis *VulnStatusIndexSelect) Float64sX(ctx context.Context) []float64

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

func (*VulnStatusIndexSelect) Int

func (vsis *VulnStatusIndexSelect) Int(ctx context.Context) (_ int, err error)

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

func (*VulnStatusIndexSelect) IntX

func (vsis *VulnStatusIndexSelect) IntX(ctx context.Context) int

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

func (*VulnStatusIndexSelect) Ints

func (vsis *VulnStatusIndexSelect) Ints(ctx context.Context) ([]int, error)

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

func (*VulnStatusIndexSelect) IntsX

func (vsis *VulnStatusIndexSelect) IntsX(ctx context.Context) []int

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

func (*VulnStatusIndexSelect) Scan

func (vsis *VulnStatusIndexSelect) Scan(ctx context.Context, v interface{}) error

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

func (*VulnStatusIndexSelect) ScanX

func (vsis *VulnStatusIndexSelect) ScanX(ctx context.Context, v interface{})

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

func (*VulnStatusIndexSelect) String

func (vsis *VulnStatusIndexSelect) String(ctx context.Context) (_ string, err error)

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

func (*VulnStatusIndexSelect) StringX

func (vsis *VulnStatusIndexSelect) StringX(ctx context.Context) string

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

func (*VulnStatusIndexSelect) Strings

func (vsis *VulnStatusIndexSelect) Strings(ctx context.Context) ([]string, error)

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

func (*VulnStatusIndexSelect) StringsX

func (vsis *VulnStatusIndexSelect) StringsX(ctx context.Context) []string

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

type VulnStatusIndexUpdate

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

VulnStatusIndexUpdate is the builder for updating VulnStatusIndex entities.

func (*VulnStatusIndexUpdate) AddStatuIDs

func (vsiu *VulnStatusIndexUpdate) AddStatuIDs(ids ...int) *VulnStatusIndexUpdate

AddStatuIDs adds the "status" edge to the VulnStatus entity by IDs.

func (*VulnStatusIndexUpdate) AddStatus

func (vsiu *VulnStatusIndexUpdate) AddStatus(v ...*VulnStatus) *VulnStatusIndexUpdate

AddStatus adds the "status" edges to the VulnStatus entity.

func (*VulnStatusIndexUpdate) ClearLatest added in v0.0.6

func (vsiu *VulnStatusIndexUpdate) ClearLatest() *VulnStatusIndexUpdate

ClearLatest clears the "latest" edge to the VulnStatus entity.

func (*VulnStatusIndexUpdate) ClearStatus

func (vsiu *VulnStatusIndexUpdate) ClearStatus() *VulnStatusIndexUpdate

ClearStatus clears all "status" edges to the VulnStatus entity.

func (*VulnStatusIndexUpdate) Exec

func (vsiu *VulnStatusIndexUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*VulnStatusIndexUpdate) ExecX

func (vsiu *VulnStatusIndexUpdate) ExecX(ctx context.Context)

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

func (*VulnStatusIndexUpdate) Mutation

Mutation returns the VulnStatusIndexMutation object of the builder.

func (*VulnStatusIndexUpdate) RemoveStatuIDs

func (vsiu *VulnStatusIndexUpdate) RemoveStatuIDs(ids ...int) *VulnStatusIndexUpdate

RemoveStatuIDs removes the "status" edge to VulnStatus entities by IDs.

func (*VulnStatusIndexUpdate) RemoveStatus

func (vsiu *VulnStatusIndexUpdate) RemoveStatus(v ...*VulnStatus) *VulnStatusIndexUpdate

RemoveStatus removes "status" edges to VulnStatus entities.

func (*VulnStatusIndexUpdate) Save

func (vsiu *VulnStatusIndexUpdate) Save(ctx context.Context) (int, error)

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

func (*VulnStatusIndexUpdate) SaveX

func (vsiu *VulnStatusIndexUpdate) SaveX(ctx context.Context) int

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

func (*VulnStatusIndexUpdate) SetLatest added in v0.0.6

SetLatest sets the "latest" edge to the VulnStatus entity.

func (*VulnStatusIndexUpdate) SetLatestID added in v0.0.6

func (vsiu *VulnStatusIndexUpdate) SetLatestID(id int) *VulnStatusIndexUpdate

SetLatestID sets the "latest" edge to the VulnStatus entity by ID.

func (*VulnStatusIndexUpdate) SetNillableLatestID added in v0.0.6

func (vsiu *VulnStatusIndexUpdate) SetNillableLatestID(id *int) *VulnStatusIndexUpdate

SetNillableLatestID sets the "latest" edge to the VulnStatus entity by ID if the given value is not nil.

func (*VulnStatusIndexUpdate) Where

Where appends a list predicates to the VulnStatusIndexUpdate builder.

type VulnStatusIndexUpdateOne

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

VulnStatusIndexUpdateOne is the builder for updating a single VulnStatusIndex entity.

func (*VulnStatusIndexUpdateOne) AddStatuIDs

func (vsiuo *VulnStatusIndexUpdateOne) AddStatuIDs(ids ...int) *VulnStatusIndexUpdateOne

AddStatuIDs adds the "status" edge to the VulnStatus entity by IDs.

func (*VulnStatusIndexUpdateOne) AddStatus

AddStatus adds the "status" edges to the VulnStatus entity.

func (*VulnStatusIndexUpdateOne) ClearLatest added in v0.0.6

func (vsiuo *VulnStatusIndexUpdateOne) ClearLatest() *VulnStatusIndexUpdateOne

ClearLatest clears the "latest" edge to the VulnStatus entity.

func (*VulnStatusIndexUpdateOne) ClearStatus

func (vsiuo *VulnStatusIndexUpdateOne) ClearStatus() *VulnStatusIndexUpdateOne

ClearStatus clears all "status" edges to the VulnStatus entity.

func (*VulnStatusIndexUpdateOne) Exec

func (vsiuo *VulnStatusIndexUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*VulnStatusIndexUpdateOne) ExecX

func (vsiuo *VulnStatusIndexUpdateOne) ExecX(ctx context.Context)

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

func (*VulnStatusIndexUpdateOne) Mutation

Mutation returns the VulnStatusIndexMutation object of the builder.

func (*VulnStatusIndexUpdateOne) RemoveStatuIDs

func (vsiuo *VulnStatusIndexUpdateOne) RemoveStatuIDs(ids ...int) *VulnStatusIndexUpdateOne

RemoveStatuIDs removes the "status" edge to VulnStatus entities by IDs.

func (*VulnStatusIndexUpdateOne) RemoveStatus

func (vsiuo *VulnStatusIndexUpdateOne) RemoveStatus(v ...*VulnStatus) *VulnStatusIndexUpdateOne

RemoveStatus removes "status" edges to VulnStatus entities.

func (*VulnStatusIndexUpdateOne) Save

Save executes the query and returns the updated VulnStatusIndex entity.

func (*VulnStatusIndexUpdateOne) SaveX

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

func (*VulnStatusIndexUpdateOne) Select

func (vsiuo *VulnStatusIndexUpdateOne) Select(field string, fields ...string) *VulnStatusIndexUpdateOne

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

func (*VulnStatusIndexUpdateOne) SetLatest added in v0.0.6

SetLatest sets the "latest" edge to the VulnStatus entity.

func (*VulnStatusIndexUpdateOne) SetLatestID added in v0.0.6

func (vsiuo *VulnStatusIndexUpdateOne) SetLatestID(id int) *VulnStatusIndexUpdateOne

SetLatestID sets the "latest" edge to the VulnStatus entity by ID.

func (*VulnStatusIndexUpdateOne) SetNillableLatestID added in v0.0.6

func (vsiuo *VulnStatusIndexUpdateOne) SetNillableLatestID(id *int) *VulnStatusIndexUpdateOne

SetNillableLatestID sets the "latest" edge to the VulnStatus entity by ID if the given value is not nil.

type VulnStatusIndexUpsert

type VulnStatusIndexUpsert struct {
	*sql.UpdateSet
}

VulnStatusIndexUpsert is the "OnConflict" setter.

type VulnStatusIndexUpsertBulk

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

VulnStatusIndexUpsertBulk is the builder for "upsert"-ing a bulk of VulnStatusIndex nodes.

func (*VulnStatusIndexUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnStatusIndexUpsertBulk) Exec

Exec executes the query.

func (*VulnStatusIndexUpsertBulk) ExecX

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

func (*VulnStatusIndexUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VulnStatusIndex.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VulnStatusIndexUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the VulnStatusIndexCreateBulk.OnConflict documentation for more info.

func (*VulnStatusIndexUpsertBulk) UpdateNewValues

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.VulnStatusIndex.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

type VulnStatusIndexUpsertOne

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

VulnStatusIndexUpsertOne is the builder for "upsert"-ing

one VulnStatusIndex node.

func (*VulnStatusIndexUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnStatusIndexUpsertOne) Exec

Exec executes the query.

func (*VulnStatusIndexUpsertOne) ExecX

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

func (*VulnStatusIndexUpsertOne) ID

func (u *VulnStatusIndexUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VulnStatusIndexUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*VulnStatusIndexUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VulnStatusIndex.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VulnStatusIndexUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the VulnStatusIndexCreate.OnConflict documentation for more info.

func (*VulnStatusIndexUpsertOne) UpdateNewValues

func (u *VulnStatusIndexUpsertOne) UpdateNewValues() *VulnStatusIndexUpsertOne

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.VulnStatusIndex.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

type VulnStatusIndexes

type VulnStatusIndexes []*VulnStatusIndex

VulnStatusIndexes is a parsable slice of VulnStatusIndex.

type VulnStatusMutation

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

VulnStatusMutation represents an operation that mutates the VulnStatus nodes in the graph.

func (*VulnStatusMutation) AddCreatedAt

func (m *VulnStatusMutation) AddCreatedAt(i int64)

AddCreatedAt adds i to the "created_at" field.

func (*VulnStatusMutation) AddExpiresAt

func (m *VulnStatusMutation) AddExpiresAt(i int64)

AddExpiresAt adds i to the "expires_at" field.

func (*VulnStatusMutation) AddField

func (m *VulnStatusMutation) 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 (*VulnStatusMutation) AddedCreatedAt

func (m *VulnStatusMutation) AddedCreatedAt() (r int64, exists bool)

AddedCreatedAt returns the value that was added to the "created_at" field in this mutation.

func (*VulnStatusMutation) AddedEdges

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

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

func (*VulnStatusMutation) AddedExpiresAt

func (m *VulnStatusMutation) AddedExpiresAt() (r int64, exists bool)

AddedExpiresAt returns the value that was added to the "expires_at" field in this mutation.

func (*VulnStatusMutation) AddedField

func (m *VulnStatusMutation) 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 (*VulnStatusMutation) AddedFields

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

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

func (*VulnStatusMutation) AddedIDs

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

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

func (*VulnStatusMutation) AuthorCleared

func (m *VulnStatusMutation) AuthorCleared() bool

AuthorCleared reports if the "author" edge to the User entity was cleared.

func (*VulnStatusMutation) AuthorID

func (m *VulnStatusMutation) AuthorID() (id int, exists bool)

AuthorID returns the "author" edge ID in the mutation.

func (*VulnStatusMutation) AuthorIDs

func (m *VulnStatusMutation) AuthorIDs() (ids []int)

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

func (*VulnStatusMutation) ClearAuthor

func (m *VulnStatusMutation) ClearAuthor()

ClearAuthor clears the "author" edge to the User entity.

func (*VulnStatusMutation) ClearEdge

func (m *VulnStatusMutation) 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 (*VulnStatusMutation) ClearField

func (m *VulnStatusMutation) 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 (*VulnStatusMutation) ClearedEdges

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

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

func (*VulnStatusMutation) ClearedFields

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

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

func (VulnStatusMutation) Client

func (m VulnStatusMutation) 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 (*VulnStatusMutation) Comment

func (m *VulnStatusMutation) Comment() (r string, exists bool)

Comment returns the value of the "comment" field in the mutation.

func (*VulnStatusMutation) CreatedAt

func (m *VulnStatusMutation) CreatedAt() (r int64, exists bool)

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

func (*VulnStatusMutation) EdgeCleared

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

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

func (*VulnStatusMutation) ExpiresAt

func (m *VulnStatusMutation) ExpiresAt() (r int64, exists bool)

ExpiresAt returns the value of the "expires_at" field in the mutation.

func (*VulnStatusMutation) Field

func (m *VulnStatusMutation) 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 (*VulnStatusMutation) FieldCleared

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

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

func (*VulnStatusMutation) Fields

func (m *VulnStatusMutation) 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 (*VulnStatusMutation) ID

func (m *VulnStatusMutation) 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 (*VulnStatusMutation) OldComment

func (m *VulnStatusMutation) OldComment(ctx context.Context) (v string, err error)

OldComment returns the old "comment" field's value of the VulnStatus entity. If the VulnStatus 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 (*VulnStatusMutation) OldCreatedAt

func (m *VulnStatusMutation) OldCreatedAt(ctx context.Context) (v int64, err error)

OldCreatedAt returns the old "created_at" field's value of the VulnStatus entity. If the VulnStatus 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 (*VulnStatusMutation) OldExpiresAt

func (m *VulnStatusMutation) OldExpiresAt(ctx context.Context) (v int64, err error)

OldExpiresAt returns the old "expires_at" field's value of the VulnStatus entity. If the VulnStatus 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 (*VulnStatusMutation) OldField

func (m *VulnStatusMutation) 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 (*VulnStatusMutation) OldPkgName

func (m *VulnStatusMutation) OldPkgName(ctx context.Context) (v string, err error)

OldPkgName returns the old "pkg_name" field's value of the VulnStatus entity. If the VulnStatus 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 (*VulnStatusMutation) OldPkgType

func (m *VulnStatusMutation) OldPkgType(ctx context.Context) (v string, err error)

OldPkgType returns the old "pkg_type" field's value of the VulnStatus entity. If the VulnStatus 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 (*VulnStatusMutation) OldSource

func (m *VulnStatusMutation) OldSource(ctx context.Context) (v string, err error)

OldSource returns the old "source" field's value of the VulnStatus entity. If the VulnStatus 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 (*VulnStatusMutation) OldStatus

func (m *VulnStatusMutation) OldStatus(ctx context.Context) (v types.VulnStatusType, err error)

OldStatus returns the old "status" field's value of the VulnStatus entity. If the VulnStatus 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 (*VulnStatusMutation) OldVulnID

func (m *VulnStatusMutation) OldVulnID(ctx context.Context) (v string, err error)

OldVulnID returns the old "vuln_id" field's value of the VulnStatus entity. If the VulnStatus 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 (*VulnStatusMutation) Op

func (m *VulnStatusMutation) Op() Op

Op returns the operation name.

func (*VulnStatusMutation) PkgName

func (m *VulnStatusMutation) PkgName() (r string, exists bool)

PkgName returns the value of the "pkg_name" field in the mutation.

func (*VulnStatusMutation) PkgType

func (m *VulnStatusMutation) PkgType() (r string, exists bool)

PkgType returns the value of the "pkg_type" field in the mutation.

func (*VulnStatusMutation) RemovedEdges

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

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

func (*VulnStatusMutation) RemovedIDs

func (m *VulnStatusMutation) 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 (*VulnStatusMutation) ResetAuthor

func (m *VulnStatusMutation) ResetAuthor()

ResetAuthor resets all changes to the "author" edge.

func (*VulnStatusMutation) ResetComment

func (m *VulnStatusMutation) ResetComment()

ResetComment resets all changes to the "comment" field.

func (*VulnStatusMutation) ResetCreatedAt

func (m *VulnStatusMutation) ResetCreatedAt()

ResetCreatedAt resets all changes to the "created_at" field.

func (*VulnStatusMutation) ResetEdge

func (m *VulnStatusMutation) 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 (*VulnStatusMutation) ResetExpiresAt

func (m *VulnStatusMutation) ResetExpiresAt()

ResetExpiresAt resets all changes to the "expires_at" field.

func (*VulnStatusMutation) ResetField

func (m *VulnStatusMutation) 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 (*VulnStatusMutation) ResetPkgName

func (m *VulnStatusMutation) ResetPkgName()

ResetPkgName resets all changes to the "pkg_name" field.

func (*VulnStatusMutation) ResetPkgType

func (m *VulnStatusMutation) ResetPkgType()

ResetPkgType resets all changes to the "pkg_type" field.

func (*VulnStatusMutation) ResetSource

func (m *VulnStatusMutation) ResetSource()

ResetSource resets all changes to the "source" field.

func (*VulnStatusMutation) ResetStatus

func (m *VulnStatusMutation) ResetStatus()

ResetStatus resets all changes to the "status" field.

func (*VulnStatusMutation) ResetVulnID

func (m *VulnStatusMutation) ResetVulnID()

ResetVulnID resets all changes to the "vuln_id" field.

func (*VulnStatusMutation) SetAuthorID

func (m *VulnStatusMutation) SetAuthorID(id int)

SetAuthorID sets the "author" edge to the User entity by id.

func (*VulnStatusMutation) SetComment

func (m *VulnStatusMutation) SetComment(s string)

SetComment sets the "comment" field.

func (*VulnStatusMutation) SetCreatedAt

func (m *VulnStatusMutation) SetCreatedAt(i int64)

SetCreatedAt sets the "created_at" field.

func (*VulnStatusMutation) SetExpiresAt

func (m *VulnStatusMutation) SetExpiresAt(i int64)

SetExpiresAt sets the "expires_at" field.

func (*VulnStatusMutation) SetField

func (m *VulnStatusMutation) 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 (*VulnStatusMutation) SetPkgName

func (m *VulnStatusMutation) SetPkgName(s string)

SetPkgName sets the "pkg_name" field.

func (*VulnStatusMutation) SetPkgType

func (m *VulnStatusMutation) SetPkgType(s string)

SetPkgType sets the "pkg_type" field.

func (*VulnStatusMutation) SetSource

func (m *VulnStatusMutation) SetSource(s string)

SetSource sets the "source" field.

func (*VulnStatusMutation) SetStatus

func (m *VulnStatusMutation) SetStatus(tst types.VulnStatusType)

SetStatus sets the "status" field.

func (*VulnStatusMutation) SetVulnID

func (m *VulnStatusMutation) SetVulnID(s string)

SetVulnID sets the "vuln_id" field.

func (*VulnStatusMutation) Source

func (m *VulnStatusMutation) Source() (r string, exists bool)

Source returns the value of the "source" field in the mutation.

func (*VulnStatusMutation) Status

func (m *VulnStatusMutation) Status() (r types.VulnStatusType, exists bool)

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

func (VulnStatusMutation) Tx

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

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

func (*VulnStatusMutation) Type

func (m *VulnStatusMutation) Type() string

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

func (*VulnStatusMutation) VulnID

func (m *VulnStatusMutation) VulnID() (r string, exists bool)

VulnID returns the value of the "vuln_id" field in the mutation.

func (*VulnStatusMutation) Where

func (m *VulnStatusMutation) Where(ps ...predicate.VulnStatus)

Where appends a list predicates to the VulnStatusMutation builder.

type VulnStatusQuery

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

VulnStatusQuery is the builder for querying VulnStatus entities.

func (*VulnStatusQuery) All

func (vsq *VulnStatusQuery) All(ctx context.Context) ([]*VulnStatus, error)

All executes the query and returns a list of VulnStatusSlice.

func (*VulnStatusQuery) AllX

func (vsq *VulnStatusQuery) AllX(ctx context.Context) []*VulnStatus

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

func (*VulnStatusQuery) Clone

func (vsq *VulnStatusQuery) Clone() *VulnStatusQuery

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

func (*VulnStatusQuery) Count

func (vsq *VulnStatusQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VulnStatusQuery) CountX

func (vsq *VulnStatusQuery) CountX(ctx context.Context) int

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

func (*VulnStatusQuery) Exist

func (vsq *VulnStatusQuery) Exist(ctx context.Context) (bool, error)

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

func (*VulnStatusQuery) ExistX

func (vsq *VulnStatusQuery) ExistX(ctx context.Context) bool

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

func (*VulnStatusQuery) First

func (vsq *VulnStatusQuery) First(ctx context.Context) (*VulnStatus, error)

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

func (*VulnStatusQuery) FirstID

func (vsq *VulnStatusQuery) FirstID(ctx context.Context) (id int, err error)

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

func (*VulnStatusQuery) FirstIDX

func (vsq *VulnStatusQuery) FirstIDX(ctx context.Context) int

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

func (*VulnStatusQuery) FirstX

func (vsq *VulnStatusQuery) FirstX(ctx context.Context) *VulnStatus

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

func (*VulnStatusQuery) GroupBy

func (vsq *VulnStatusQuery) GroupBy(field string, fields ...string) *VulnStatusGroupBy

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 types.VulnStatusType `json:"status,omitempty"`
	Count int `json:"count,omitempty"`
}

client.VulnStatus.Query().
	GroupBy(vulnstatus.FieldStatus).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*VulnStatusQuery) IDs

func (vsq *VulnStatusQuery) IDs(ctx context.Context) ([]int, error)

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

func (*VulnStatusQuery) IDsX

func (vsq *VulnStatusQuery) IDsX(ctx context.Context) []int

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

func (*VulnStatusQuery) Limit

func (vsq *VulnStatusQuery) Limit(limit int) *VulnStatusQuery

Limit adds a limit step to the query.

func (*VulnStatusQuery) Offset

func (vsq *VulnStatusQuery) Offset(offset int) *VulnStatusQuery

Offset adds an offset step to the query.

func (*VulnStatusQuery) Only

func (vsq *VulnStatusQuery) Only(ctx context.Context) (*VulnStatus, error)

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

func (*VulnStatusQuery) OnlyID

func (vsq *VulnStatusQuery) OnlyID(ctx context.Context) (id int, err error)

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

func (*VulnStatusQuery) OnlyIDX

func (vsq *VulnStatusQuery) OnlyIDX(ctx context.Context) int

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

func (*VulnStatusQuery) OnlyX

func (vsq *VulnStatusQuery) OnlyX(ctx context.Context) *VulnStatus

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

func (*VulnStatusQuery) Order

func (vsq *VulnStatusQuery) Order(o ...OrderFunc) *VulnStatusQuery

Order adds an order step to the query.

func (*VulnStatusQuery) QueryAuthor

func (vsq *VulnStatusQuery) QueryAuthor() *UserQuery

QueryAuthor chains the current query on the "author" edge.

func (*VulnStatusQuery) Select

func (vsq *VulnStatusQuery) Select(fields ...string) *VulnStatusSelect

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 types.VulnStatusType `json:"status,omitempty"`
}

client.VulnStatus.Query().
	Select(vulnstatus.FieldStatus).
	Scan(ctx, &v)

func (*VulnStatusQuery) Unique

func (vsq *VulnStatusQuery) Unique(unique bool) *VulnStatusQuery

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 (*VulnStatusQuery) Where

Where adds a new predicate for the VulnStatusQuery builder.

func (*VulnStatusQuery) WithAuthor

func (vsq *VulnStatusQuery) WithAuthor(opts ...func(*UserQuery)) *VulnStatusQuery

WithAuthor tells the query-builder to eager-load the nodes that are connected to the "author" edge. The optional arguments are used to configure the query builder of the edge.

type VulnStatusSelect

type VulnStatusSelect struct {
	*VulnStatusQuery
	// contains filtered or unexported fields
}

VulnStatusSelect is the builder for selecting fields of VulnStatus entities.

func (*VulnStatusSelect) Bool

func (vss *VulnStatusSelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VulnStatusSelect) BoolX

func (vss *VulnStatusSelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VulnStatusSelect) Bools

func (vss *VulnStatusSelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VulnStatusSelect) BoolsX

func (vss *VulnStatusSelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VulnStatusSelect) Float64

func (vss *VulnStatusSelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VulnStatusSelect) Float64X

func (vss *VulnStatusSelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VulnStatusSelect) Float64s

func (vss *VulnStatusSelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VulnStatusSelect) Float64sX

func (vss *VulnStatusSelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VulnStatusSelect) Int

func (vss *VulnStatusSelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VulnStatusSelect) IntX

func (vss *VulnStatusSelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VulnStatusSelect) Ints

func (vss *VulnStatusSelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VulnStatusSelect) IntsX

func (vss *VulnStatusSelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VulnStatusSelect) Scan

func (vss *VulnStatusSelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*VulnStatusSelect) ScanX

func (vss *VulnStatusSelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*VulnStatusSelect) String

func (vss *VulnStatusSelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VulnStatusSelect) StringX

func (vss *VulnStatusSelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VulnStatusSelect) Strings

func (vss *VulnStatusSelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VulnStatusSelect) StringsX

func (vss *VulnStatusSelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VulnStatusSlice

type VulnStatusSlice []*VulnStatus

VulnStatusSlice is a parsable slice of VulnStatus.

type VulnStatusUpdate

type VulnStatusUpdate struct {
	// contains filtered or unexported fields
}

VulnStatusUpdate is the builder for updating VulnStatus entities.

func (*VulnStatusUpdate) AddCreatedAt

func (vsu *VulnStatusUpdate) AddCreatedAt(i int64) *VulnStatusUpdate

AddCreatedAt adds i to the "created_at" field.

func (*VulnStatusUpdate) AddExpiresAt

func (vsu *VulnStatusUpdate) AddExpiresAt(i int64) *VulnStatusUpdate

AddExpiresAt adds i to the "expires_at" field.

func (*VulnStatusUpdate) ClearAuthor

func (vsu *VulnStatusUpdate) ClearAuthor() *VulnStatusUpdate

ClearAuthor clears the "author" edge to the User entity.

func (*VulnStatusUpdate) Exec

func (vsu *VulnStatusUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*VulnStatusUpdate) ExecX

func (vsu *VulnStatusUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnStatusUpdate) Mutation

func (vsu *VulnStatusUpdate) Mutation() *VulnStatusMutation

Mutation returns the VulnStatusMutation object of the builder.

func (*VulnStatusUpdate) Save

func (vsu *VulnStatusUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*VulnStatusUpdate) SaveX

func (vsu *VulnStatusUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*VulnStatusUpdate) SetAuthor

func (vsu *VulnStatusUpdate) SetAuthor(u *User) *VulnStatusUpdate

SetAuthor sets the "author" edge to the User entity.

func (*VulnStatusUpdate) SetAuthorID

func (vsu *VulnStatusUpdate) SetAuthorID(id int) *VulnStatusUpdate

SetAuthorID sets the "author" edge to the User entity by ID.

func (*VulnStatusUpdate) SetComment

func (vsu *VulnStatusUpdate) SetComment(s string) *VulnStatusUpdate

SetComment sets the "comment" field.

func (*VulnStatusUpdate) SetCreatedAt

func (vsu *VulnStatusUpdate) SetCreatedAt(i int64) *VulnStatusUpdate

SetCreatedAt sets the "created_at" field.

func (*VulnStatusUpdate) SetExpiresAt

func (vsu *VulnStatusUpdate) SetExpiresAt(i int64) *VulnStatusUpdate

SetExpiresAt sets the "expires_at" field.

func (*VulnStatusUpdate) SetNillableAuthorID

func (vsu *VulnStatusUpdate) SetNillableAuthorID(id *int) *VulnStatusUpdate

SetNillableAuthorID sets the "author" edge to the User entity by ID if the given value is not nil.

func (*VulnStatusUpdate) SetPkgName

func (vsu *VulnStatusUpdate) SetPkgName(s string) *VulnStatusUpdate

SetPkgName sets the "pkg_name" field.

func (*VulnStatusUpdate) SetPkgType

func (vsu *VulnStatusUpdate) SetPkgType(s string) *VulnStatusUpdate

SetPkgType sets the "pkg_type" field.

func (*VulnStatusUpdate) SetSource

func (vsu *VulnStatusUpdate) SetSource(s string) *VulnStatusUpdate

SetSource sets the "source" field.

func (*VulnStatusUpdate) SetStatus

SetStatus sets the "status" field.

func (*VulnStatusUpdate) SetVulnID

func (vsu *VulnStatusUpdate) SetVulnID(s string) *VulnStatusUpdate

SetVulnID sets the "vuln_id" field.

func (*VulnStatusUpdate) Where

Where appends a list predicates to the VulnStatusUpdate builder.

type VulnStatusUpdateOne

type VulnStatusUpdateOne struct {
	// contains filtered or unexported fields
}

VulnStatusUpdateOne is the builder for updating a single VulnStatus entity.

func (*VulnStatusUpdateOne) AddCreatedAt

func (vsuo *VulnStatusUpdateOne) AddCreatedAt(i int64) *VulnStatusUpdateOne

AddCreatedAt adds i to the "created_at" field.

func (*VulnStatusUpdateOne) AddExpiresAt

func (vsuo *VulnStatusUpdateOne) AddExpiresAt(i int64) *VulnStatusUpdateOne

AddExpiresAt adds i to the "expires_at" field.

func (*VulnStatusUpdateOne) ClearAuthor

func (vsuo *VulnStatusUpdateOne) ClearAuthor() *VulnStatusUpdateOne

ClearAuthor clears the "author" edge to the User entity.

func (*VulnStatusUpdateOne) Exec

func (vsuo *VulnStatusUpdateOne) Exec(ctx context.Context) error

Exec executes the query on the entity.

func (*VulnStatusUpdateOne) ExecX

func (vsuo *VulnStatusUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnStatusUpdateOne) Mutation

func (vsuo *VulnStatusUpdateOne) Mutation() *VulnStatusMutation

Mutation returns the VulnStatusMutation object of the builder.

func (*VulnStatusUpdateOne) Save

func (vsuo *VulnStatusUpdateOne) Save(ctx context.Context) (*VulnStatus, error)

Save executes the query and returns the updated VulnStatus entity.

func (*VulnStatusUpdateOne) SaveX

func (vsuo *VulnStatusUpdateOne) SaveX(ctx context.Context) *VulnStatus

SaveX is like Save, but panics if an error occurs.

func (*VulnStatusUpdateOne) Select

func (vsuo *VulnStatusUpdateOne) Select(field string, fields ...string) *VulnStatusUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VulnStatusUpdateOne) SetAuthor

func (vsuo *VulnStatusUpdateOne) SetAuthor(u *User) *VulnStatusUpdateOne

SetAuthor sets the "author" edge to the User entity.

func (*VulnStatusUpdateOne) SetAuthorID

func (vsuo *VulnStatusUpdateOne) SetAuthorID(id int) *VulnStatusUpdateOne

SetAuthorID sets the "author" edge to the User entity by ID.

func (*VulnStatusUpdateOne) SetComment

func (vsuo *VulnStatusUpdateOne) SetComment(s string) *VulnStatusUpdateOne

SetComment sets the "comment" field.

func (*VulnStatusUpdateOne) SetCreatedAt

func (vsuo *VulnStatusUpdateOne) SetCreatedAt(i int64) *VulnStatusUpdateOne

SetCreatedAt sets the "created_at" field.

func (*VulnStatusUpdateOne) SetExpiresAt

func (vsuo *VulnStatusUpdateOne) SetExpiresAt(i int64) *VulnStatusUpdateOne

SetExpiresAt sets the "expires_at" field.

func (*VulnStatusUpdateOne) SetNillableAuthorID

func (vsuo *VulnStatusUpdateOne) SetNillableAuthorID(id *int) *VulnStatusUpdateOne

SetNillableAuthorID sets the "author" edge to the User entity by ID if the given value is not nil.

func (*VulnStatusUpdateOne) SetPkgName

func (vsuo *VulnStatusUpdateOne) SetPkgName(s string) *VulnStatusUpdateOne

SetPkgName sets the "pkg_name" field.

func (*VulnStatusUpdateOne) SetPkgType

func (vsuo *VulnStatusUpdateOne) SetPkgType(s string) *VulnStatusUpdateOne

SetPkgType sets the "pkg_type" field.

func (*VulnStatusUpdateOne) SetSource

func (vsuo *VulnStatusUpdateOne) SetSource(s string) *VulnStatusUpdateOne

SetSource sets the "source" field.

func (*VulnStatusUpdateOne) SetStatus

SetStatus sets the "status" field.

func (*VulnStatusUpdateOne) SetVulnID

func (vsuo *VulnStatusUpdateOne) SetVulnID(s string) *VulnStatusUpdateOne

SetVulnID sets the "vuln_id" field.

type VulnStatusUpsert

type VulnStatusUpsert struct {
	*sql.UpdateSet
}

VulnStatusUpsert is the "OnConflict" setter.

func (*VulnStatusUpsert) SetComment

func (u *VulnStatusUpsert) SetComment(v string) *VulnStatusUpsert

SetComment sets the "comment" field.

func (*VulnStatusUpsert) SetCreatedAt

func (u *VulnStatusUpsert) SetCreatedAt(v int64) *VulnStatusUpsert

SetCreatedAt sets the "created_at" field.

func (*VulnStatusUpsert) SetExpiresAt

func (u *VulnStatusUpsert) SetExpiresAt(v int64) *VulnStatusUpsert

SetExpiresAt sets the "expires_at" field.

func (*VulnStatusUpsert) SetPkgName

func (u *VulnStatusUpsert) SetPkgName(v string) *VulnStatusUpsert

SetPkgName sets the "pkg_name" field.

func (*VulnStatusUpsert) SetPkgType

func (u *VulnStatusUpsert) SetPkgType(v string) *VulnStatusUpsert

SetPkgType sets the "pkg_type" field.

func (*VulnStatusUpsert) SetSource

func (u *VulnStatusUpsert) SetSource(v string) *VulnStatusUpsert

SetSource sets the "source" field.

func (*VulnStatusUpsert) SetStatus

SetStatus sets the "status" field.

func (*VulnStatusUpsert) SetVulnID

func (u *VulnStatusUpsert) SetVulnID(v string) *VulnStatusUpsert

SetVulnID sets the "vuln_id" field.

func (*VulnStatusUpsert) UpdateComment

func (u *VulnStatusUpsert) UpdateComment() *VulnStatusUpsert

UpdateComment sets the "comment" field to the value that was provided on create.

func (*VulnStatusUpsert) UpdateCreatedAt

func (u *VulnStatusUpsert) UpdateCreatedAt() *VulnStatusUpsert

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*VulnStatusUpsert) UpdateExpiresAt

func (u *VulnStatusUpsert) UpdateExpiresAt() *VulnStatusUpsert

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*VulnStatusUpsert) UpdatePkgName

func (u *VulnStatusUpsert) UpdatePkgName() *VulnStatusUpsert

UpdatePkgName sets the "pkg_name" field to the value that was provided on create.

func (*VulnStatusUpsert) UpdatePkgType

func (u *VulnStatusUpsert) UpdatePkgType() *VulnStatusUpsert

UpdatePkgType sets the "pkg_type" field to the value that was provided on create.

func (*VulnStatusUpsert) UpdateSource

func (u *VulnStatusUpsert) UpdateSource() *VulnStatusUpsert

UpdateSource sets the "source" field to the value that was provided on create.

func (*VulnStatusUpsert) UpdateStatus

func (u *VulnStatusUpsert) UpdateStatus() *VulnStatusUpsert

UpdateStatus sets the "status" field to the value that was provided on create.

func (*VulnStatusUpsert) UpdateVulnID

func (u *VulnStatusUpsert) UpdateVulnID() *VulnStatusUpsert

UpdateVulnID sets the "vuln_id" field to the value that was provided on create.

type VulnStatusUpsertBulk

type VulnStatusUpsertBulk struct {
	// contains filtered or unexported fields
}

VulnStatusUpsertBulk is the builder for "upsert"-ing a bulk of VulnStatus nodes.

func (*VulnStatusUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnStatusUpsertBulk) Exec

Exec executes the query.

func (*VulnStatusUpsertBulk) ExecX

func (u *VulnStatusUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnStatusUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VulnStatus.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VulnStatusUpsertBulk) SetComment

SetComment sets the "comment" field.

func (*VulnStatusUpsertBulk) SetCreatedAt

func (u *VulnStatusUpsertBulk) SetCreatedAt(v int64) *VulnStatusUpsertBulk

SetCreatedAt sets the "created_at" field.

func (*VulnStatusUpsertBulk) SetExpiresAt

func (u *VulnStatusUpsertBulk) SetExpiresAt(v int64) *VulnStatusUpsertBulk

SetExpiresAt sets the "expires_at" field.

func (*VulnStatusUpsertBulk) SetPkgName

SetPkgName sets the "pkg_name" field.

func (*VulnStatusUpsertBulk) SetPkgType

SetPkgType sets the "pkg_type" field.

func (*VulnStatusUpsertBulk) SetSource

SetSource sets the "source" field.

func (*VulnStatusUpsertBulk) SetStatus

SetStatus sets the "status" field.

func (*VulnStatusUpsertBulk) SetVulnID

SetVulnID sets the "vuln_id" field.

func (*VulnStatusUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the VulnStatusCreateBulk.OnConflict documentation for more info.

func (*VulnStatusUpsertBulk) UpdateComment

func (u *VulnStatusUpsertBulk) UpdateComment() *VulnStatusUpsertBulk

UpdateComment sets the "comment" field to the value that was provided on create.

func (*VulnStatusUpsertBulk) UpdateCreatedAt

func (u *VulnStatusUpsertBulk) UpdateCreatedAt() *VulnStatusUpsertBulk

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*VulnStatusUpsertBulk) UpdateExpiresAt

func (u *VulnStatusUpsertBulk) UpdateExpiresAt() *VulnStatusUpsertBulk

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*VulnStatusUpsertBulk) UpdateNewValues

func (u *VulnStatusUpsertBulk) UpdateNewValues() *VulnStatusUpsertBulk

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.VulnStatus.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

func (*VulnStatusUpsertBulk) UpdatePkgName

func (u *VulnStatusUpsertBulk) UpdatePkgName() *VulnStatusUpsertBulk

UpdatePkgName sets the "pkg_name" field to the value that was provided on create.

func (*VulnStatusUpsertBulk) UpdatePkgType

func (u *VulnStatusUpsertBulk) UpdatePkgType() *VulnStatusUpsertBulk

UpdatePkgType sets the "pkg_type" field to the value that was provided on create.

func (*VulnStatusUpsertBulk) UpdateSource

func (u *VulnStatusUpsertBulk) UpdateSource() *VulnStatusUpsertBulk

UpdateSource sets the "source" field to the value that was provided on create.

func (*VulnStatusUpsertBulk) UpdateStatus

func (u *VulnStatusUpsertBulk) UpdateStatus() *VulnStatusUpsertBulk

UpdateStatus sets the "status" field to the value that was provided on create.

func (*VulnStatusUpsertBulk) UpdateVulnID

func (u *VulnStatusUpsertBulk) UpdateVulnID() *VulnStatusUpsertBulk

UpdateVulnID sets the "vuln_id" field to the value that was provided on create.

type VulnStatusUpsertOne

type VulnStatusUpsertOne struct {
	// contains filtered or unexported fields
}

VulnStatusUpsertOne is the builder for "upsert"-ing

one VulnStatus node.

func (*VulnStatusUpsertOne) DoNothing

func (u *VulnStatusUpsertOne) DoNothing() *VulnStatusUpsertOne

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnStatusUpsertOne) Exec

Exec executes the query.

func (*VulnStatusUpsertOne) ExecX

func (u *VulnStatusUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnStatusUpsertOne) ID

func (u *VulnStatusUpsertOne) ID(ctx context.Context) (id int, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VulnStatusUpsertOne) IDX

func (u *VulnStatusUpsertOne) IDX(ctx context.Context) int

IDX is like ID, but panics if an error occurs.

func (*VulnStatusUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.VulnStatus.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VulnStatusUpsertOne) SetComment

SetComment sets the "comment" field.

func (*VulnStatusUpsertOne) SetCreatedAt

func (u *VulnStatusUpsertOne) SetCreatedAt(v int64) *VulnStatusUpsertOne

SetCreatedAt sets the "created_at" field.

func (*VulnStatusUpsertOne) SetExpiresAt

func (u *VulnStatusUpsertOne) SetExpiresAt(v int64) *VulnStatusUpsertOne

SetExpiresAt sets the "expires_at" field.

func (*VulnStatusUpsertOne) SetPkgName

SetPkgName sets the "pkg_name" field.

func (*VulnStatusUpsertOne) SetPkgType

SetPkgType sets the "pkg_type" field.

func (*VulnStatusUpsertOne) SetSource

SetSource sets the "source" field.

func (*VulnStatusUpsertOne) SetStatus

SetStatus sets the "status" field.

func (*VulnStatusUpsertOne) SetVulnID

SetVulnID sets the "vuln_id" field.

func (*VulnStatusUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the VulnStatusCreate.OnConflict documentation for more info.

func (*VulnStatusUpsertOne) UpdateComment

func (u *VulnStatusUpsertOne) UpdateComment() *VulnStatusUpsertOne

UpdateComment sets the "comment" field to the value that was provided on create.

func (*VulnStatusUpsertOne) UpdateCreatedAt

func (u *VulnStatusUpsertOne) UpdateCreatedAt() *VulnStatusUpsertOne

UpdateCreatedAt sets the "created_at" field to the value that was provided on create.

func (*VulnStatusUpsertOne) UpdateExpiresAt

func (u *VulnStatusUpsertOne) UpdateExpiresAt() *VulnStatusUpsertOne

UpdateExpiresAt sets the "expires_at" field to the value that was provided on create.

func (*VulnStatusUpsertOne) UpdateNewValues

func (u *VulnStatusUpsertOne) UpdateNewValues() *VulnStatusUpsertOne

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.VulnStatus.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

func (*VulnStatusUpsertOne) UpdatePkgName

func (u *VulnStatusUpsertOne) UpdatePkgName() *VulnStatusUpsertOne

UpdatePkgName sets the "pkg_name" field to the value that was provided on create.

func (*VulnStatusUpsertOne) UpdatePkgType

func (u *VulnStatusUpsertOne) UpdatePkgType() *VulnStatusUpsertOne

UpdatePkgType sets the "pkg_type" field to the value that was provided on create.

func (*VulnStatusUpsertOne) UpdateSource

func (u *VulnStatusUpsertOne) UpdateSource() *VulnStatusUpsertOne

UpdateSource sets the "source" field to the value that was provided on create.

func (*VulnStatusUpsertOne) UpdateStatus

func (u *VulnStatusUpsertOne) UpdateStatus() *VulnStatusUpsertOne

UpdateStatus sets the "status" field to the value that was provided on create.

func (*VulnStatusUpsertOne) UpdateVulnID

func (u *VulnStatusUpsertOne) UpdateVulnID() *VulnStatusUpsertOne

UpdateVulnID sets the "vuln_id" field to the value that was provided on create.

type Vulnerabilities

type Vulnerabilities []*Vulnerability

Vulnerabilities is a parsable slice of Vulnerability.

type Vulnerability

type Vulnerability struct {

	// ID of the ent.
	ID string `json:"id,omitempty"`
	// FirstSeenAt holds the value of the "first_seen_at" field.
	FirstSeenAt int64 `json:"first_seen_at,omitempty"`
	// LastModifiedAt holds the value of the "last_modified_at" field.
	LastModifiedAt int64 `json:"last_modified_at,omitempty"`
	// Title holds the value of the "title" field.
	Title string `json:"title,omitempty"`
	// Description holds the value of the "description" field.
	Description string `json:"description,omitempty"`
	// CweID holds the value of the "cwe_id" field.
	CweID []string `json:"cwe_id,omitempty"`
	// Severity holds the value of the "severity" field.
	Severity string `json:"severity,omitempty"`
	// Cvss holds the value of the "cvss" field.
	Cvss []string `json:"cvss,omitempty"`
	// References holds the value of the "references" field.
	References []string `json:"references,omitempty"`
	// Edges holds the relations/edges for other nodes in the graph.
	// The values are being populated by the VulnerabilityQuery when eager-loading is set.
	Edges VulnerabilityEdges `json:"edges"`
	// contains filtered or unexported fields
}

Vulnerability is the model entity for the Vulnerability schema.

func (*Vulnerability) QueryCustomSeverity added in v0.1.1

func (v *Vulnerability) QueryCustomSeverity() *SeverityQuery

QueryCustomSeverity queries the "custom_severity" edge of the Vulnerability entity.

func (*Vulnerability) QueryPackages

func (v *Vulnerability) QueryPackages() *PackageRecordQuery

QueryPackages queries the "packages" edge of the Vulnerability entity.

func (*Vulnerability) String

func (v *Vulnerability) String() string

String implements the fmt.Stringer.

func (*Vulnerability) Unwrap

func (v *Vulnerability) Unwrap() *Vulnerability

Unwrap unwraps the Vulnerability 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 (*Vulnerability) Update

Update returns a builder for updating this Vulnerability. Note that you need to call Vulnerability.Unwrap() before calling this method if this Vulnerability was returned from a transaction, and the transaction was committed or rolled back.

type VulnerabilityClient

type VulnerabilityClient struct {
	// contains filtered or unexported fields
}

VulnerabilityClient is a client for the Vulnerability schema.

func NewVulnerabilityClient

func NewVulnerabilityClient(c config) *VulnerabilityClient

NewVulnerabilityClient returns a client for the Vulnerability from the given config.

func (*VulnerabilityClient) Create

Create returns a create builder for Vulnerability.

func (*VulnerabilityClient) CreateBulk

CreateBulk returns a builder for creating a bulk of Vulnerability entities.

func (*VulnerabilityClient) Delete

Delete returns a delete builder for Vulnerability.

func (*VulnerabilityClient) DeleteOne

DeleteOne returns a delete builder for the given entity.

func (*VulnerabilityClient) DeleteOneID

DeleteOneID returns a delete builder for the given id.

func (*VulnerabilityClient) Get

Get returns a Vulnerability entity by its id.

func (*VulnerabilityClient) GetX

GetX is like Get, but panics if an error occurs.

func (*VulnerabilityClient) Hooks

func (c *VulnerabilityClient) Hooks() []Hook

Hooks returns the client hooks.

func (*VulnerabilityClient) Query

Query returns a query builder for Vulnerability.

func (*VulnerabilityClient) QueryCustomSeverity added in v0.1.1

func (c *VulnerabilityClient) QueryCustomSeverity(v *Vulnerability) *SeverityQuery

QueryCustomSeverity queries the custom_severity edge of a Vulnerability.

func (*VulnerabilityClient) QueryPackages

QueryPackages queries the packages edge of a Vulnerability.

func (*VulnerabilityClient) Update

Update returns an update builder for Vulnerability.

func (*VulnerabilityClient) UpdateOne

UpdateOne returns an update builder for the given entity.

func (*VulnerabilityClient) UpdateOneID

UpdateOneID returns an update builder for the given id.

func (*VulnerabilityClient) Use

func (c *VulnerabilityClient) Use(hooks ...Hook)

Use adds a list of mutation hooks to the hooks stack. A call to `Use(f, g, h)` equals to `vulnerability.Hooks(f(g(h())))`.

type VulnerabilityCreate

type VulnerabilityCreate struct {
	// contains filtered or unexported fields
}

VulnerabilityCreate is the builder for creating a Vulnerability entity.

func (*VulnerabilityCreate) AddPackageIDs

func (vc *VulnerabilityCreate) AddPackageIDs(ids ...int) *VulnerabilityCreate

AddPackageIDs adds the "packages" edge to the PackageRecord entity by IDs.

func (*VulnerabilityCreate) AddPackages

func (vc *VulnerabilityCreate) AddPackages(p ...*PackageRecord) *VulnerabilityCreate

AddPackages adds the "packages" edges to the PackageRecord entity.

func (*VulnerabilityCreate) Exec

func (vc *VulnerabilityCreate) Exec(ctx context.Context) error

Exec executes the query.

func (*VulnerabilityCreate) ExecX

func (vc *VulnerabilityCreate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityCreate) Mutation

Mutation returns the VulnerabilityMutation object of the builder.

func (*VulnerabilityCreate) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Vulnerability.Create().
	SetFirstSeenAt(v).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VulnerabilityUpsert) {
		SetFirstSeenAt(v+v).
	}).
	Exec(ctx)

func (*VulnerabilityCreate) OnConflictColumns

func (vc *VulnerabilityCreate) OnConflictColumns(columns ...string) *VulnerabilityUpsertOne

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Vulnerability.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*VulnerabilityCreate) Save

Save creates the Vulnerability in the database.

func (*VulnerabilityCreate) SaveX

SaveX calls Save and panics if Save returns an error.

func (*VulnerabilityCreate) SetCustomSeverity added in v0.1.1

func (vc *VulnerabilityCreate) SetCustomSeverity(s *Severity) *VulnerabilityCreate

SetCustomSeverity sets the "custom_severity" edge to the Severity entity.

func (*VulnerabilityCreate) SetCustomSeverityID added in v0.1.1

func (vc *VulnerabilityCreate) SetCustomSeverityID(id int) *VulnerabilityCreate

SetCustomSeverityID sets the "custom_severity" edge to the Severity entity by ID.

func (*VulnerabilityCreate) SetCvss

SetCvss sets the "cvss" field.

func (*VulnerabilityCreate) SetCweID

func (vc *VulnerabilityCreate) SetCweID(s []string) *VulnerabilityCreate

SetCweID sets the "cwe_id" field.

func (*VulnerabilityCreate) SetDescription

func (vc *VulnerabilityCreate) SetDescription(s string) *VulnerabilityCreate

SetDescription sets the "description" field.

func (*VulnerabilityCreate) SetFirstSeenAt

func (vc *VulnerabilityCreate) SetFirstSeenAt(i int64) *VulnerabilityCreate

SetFirstSeenAt sets the "first_seen_at" field.

func (*VulnerabilityCreate) SetID

SetID sets the "id" field.

func (*VulnerabilityCreate) SetLastModifiedAt

func (vc *VulnerabilityCreate) SetLastModifiedAt(i int64) *VulnerabilityCreate

SetLastModifiedAt sets the "last_modified_at" field.

func (*VulnerabilityCreate) SetNillableCustomSeverityID added in v0.1.1

func (vc *VulnerabilityCreate) SetNillableCustomSeverityID(id *int) *VulnerabilityCreate

SetNillableCustomSeverityID sets the "custom_severity" edge to the Severity entity by ID if the given value is not nil.

func (*VulnerabilityCreate) SetNillableDescription

func (vc *VulnerabilityCreate) SetNillableDescription(s *string) *VulnerabilityCreate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*VulnerabilityCreate) SetNillableSeverity

func (vc *VulnerabilityCreate) SetNillableSeverity(s *string) *VulnerabilityCreate

SetNillableSeverity sets the "severity" field if the given value is not nil.

func (*VulnerabilityCreate) SetNillableTitle

func (vc *VulnerabilityCreate) SetNillableTitle(s *string) *VulnerabilityCreate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*VulnerabilityCreate) SetReferences

func (vc *VulnerabilityCreate) SetReferences(s []string) *VulnerabilityCreate

SetReferences sets the "references" field.

func (*VulnerabilityCreate) SetSeverity

func (vc *VulnerabilityCreate) SetSeverity(s string) *VulnerabilityCreate

SetSeverity sets the "severity" field.

func (*VulnerabilityCreate) SetTitle

SetTitle sets the "title" field.

type VulnerabilityCreateBulk

type VulnerabilityCreateBulk struct {
	// contains filtered or unexported fields
}

VulnerabilityCreateBulk is the builder for creating many Vulnerability entities in bulk.

func (*VulnerabilityCreateBulk) Exec

Exec executes the query.

func (*VulnerabilityCreateBulk) ExecX

func (vcb *VulnerabilityCreateBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityCreateBulk) OnConflict

OnConflict allows configuring the `ON CONFLICT` / `ON DUPLICATE KEY` clause of the `INSERT` statement. For example:

client.Vulnerability.CreateBulk(builders...).
	OnConflict(
		// Update the row with the new values
		// the was proposed for insertion.
		sql.ResolveWithNewValues(),
	).
	// Override some of the fields with custom
	// update values.
	Update(func(u *ent.VulnerabilityUpsert) {
		SetFirstSeenAt(v+v).
	}).
	Exec(ctx)

func (*VulnerabilityCreateBulk) OnConflictColumns

func (vcb *VulnerabilityCreateBulk) OnConflictColumns(columns ...string) *VulnerabilityUpsertBulk

OnConflictColumns calls `OnConflict` and configures the columns as conflict target. Using this option is equivalent to using:

client.Vulnerability.Create().
    OnConflict(sql.ConflictColumns(columns...)).
    Exec(ctx)

func (*VulnerabilityCreateBulk) Save

Save creates the Vulnerability entities in the database.

func (*VulnerabilityCreateBulk) SaveX

SaveX is like Save, but panics if an error occurs.

type VulnerabilityDelete

type VulnerabilityDelete struct {
	// contains filtered or unexported fields
}

VulnerabilityDelete is the builder for deleting a Vulnerability entity.

func (*VulnerabilityDelete) Exec

func (vd *VulnerabilityDelete) Exec(ctx context.Context) (int, error)

Exec executes the deletion query and returns how many vertices were deleted.

func (*VulnerabilityDelete) ExecX

func (vd *VulnerabilityDelete) ExecX(ctx context.Context) int

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityDelete) Where

Where appends a list predicates to the VulnerabilityDelete builder.

type VulnerabilityDeleteOne

type VulnerabilityDeleteOne struct {
	// contains filtered or unexported fields
}

VulnerabilityDeleteOne is the builder for deleting a single Vulnerability entity.

func (*VulnerabilityDeleteOne) Exec

Exec executes the deletion query.

func (*VulnerabilityDeleteOne) ExecX

func (vdo *VulnerabilityDeleteOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

type VulnerabilityEdges

type VulnerabilityEdges struct {
	// Packages holds the value of the packages edge.
	Packages []*PackageRecord `json:"packages,omitempty"`
	// CustomSeverity holds the value of the custom_severity edge.
	CustomSeverity *Severity `json:"custom_severity,omitempty"`
	// contains filtered or unexported fields
}

VulnerabilityEdges holds the relations/edges for other nodes in the graph.

func (VulnerabilityEdges) CustomSeverityOrErr added in v0.1.1

func (e VulnerabilityEdges) CustomSeverityOrErr() (*Severity, error)

CustomSeverityOrErr returns the CustomSeverity value or an error if the edge was not loaded in eager-loading, or loaded but was not found.

func (VulnerabilityEdges) PackagesOrErr

func (e VulnerabilityEdges) PackagesOrErr() ([]*PackageRecord, error)

PackagesOrErr returns the Packages value or an error if the edge was not loaded in eager-loading.

type VulnerabilityGroupBy

type VulnerabilityGroupBy struct {
	// contains filtered or unexported fields
}

VulnerabilityGroupBy is the group-by builder for Vulnerability entities.

func (*VulnerabilityGroupBy) Aggregate

Aggregate adds the given aggregation functions to the group-by query.

func (*VulnerabilityGroupBy) Bool

func (vgb *VulnerabilityGroupBy) 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 (*VulnerabilityGroupBy) BoolX

func (vgb *VulnerabilityGroupBy) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VulnerabilityGroupBy) Bools

func (vgb *VulnerabilityGroupBy) 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 (*VulnerabilityGroupBy) BoolsX

func (vgb *VulnerabilityGroupBy) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VulnerabilityGroupBy) Float64

func (vgb *VulnerabilityGroupBy) 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 (*VulnerabilityGroupBy) Float64X

func (vgb *VulnerabilityGroupBy) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VulnerabilityGroupBy) Float64s

func (vgb *VulnerabilityGroupBy) 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 (*VulnerabilityGroupBy) Float64sX

func (vgb *VulnerabilityGroupBy) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VulnerabilityGroupBy) Int

func (vgb *VulnerabilityGroupBy) 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 (*VulnerabilityGroupBy) IntX

func (vgb *VulnerabilityGroupBy) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VulnerabilityGroupBy) Ints

func (vgb *VulnerabilityGroupBy) 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 (*VulnerabilityGroupBy) IntsX

func (vgb *VulnerabilityGroupBy) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VulnerabilityGroupBy) Scan

func (vgb *VulnerabilityGroupBy) Scan(ctx context.Context, v interface{}) error

Scan applies the group-by query and scans the result into the given value.

func (*VulnerabilityGroupBy) ScanX

func (vgb *VulnerabilityGroupBy) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*VulnerabilityGroupBy) String

func (vgb *VulnerabilityGroupBy) 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 (*VulnerabilityGroupBy) StringX

func (vgb *VulnerabilityGroupBy) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VulnerabilityGroupBy) Strings

func (vgb *VulnerabilityGroupBy) 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 (*VulnerabilityGroupBy) StringsX

func (vgb *VulnerabilityGroupBy) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VulnerabilityMutation

type VulnerabilityMutation struct {
	// contains filtered or unexported fields
}

VulnerabilityMutation represents an operation that mutates the Vulnerability nodes in the graph.

func (*VulnerabilityMutation) AddField

func (m *VulnerabilityMutation) 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 (*VulnerabilityMutation) AddFirstSeenAt

func (m *VulnerabilityMutation) AddFirstSeenAt(i int64)

AddFirstSeenAt adds i to the "first_seen_at" field.

func (*VulnerabilityMutation) AddLastModifiedAt

func (m *VulnerabilityMutation) AddLastModifiedAt(i int64)

AddLastModifiedAt adds i to the "last_modified_at" field.

func (*VulnerabilityMutation) AddPackageIDs

func (m *VulnerabilityMutation) AddPackageIDs(ids ...int)

AddPackageIDs adds the "packages" edge to the PackageRecord entity by ids.

func (*VulnerabilityMutation) AddedEdges

func (m *VulnerabilityMutation) AddedEdges() []string

AddedEdges returns all edge names that were set/added in this mutation.

func (*VulnerabilityMutation) AddedField

func (m *VulnerabilityMutation) 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 (*VulnerabilityMutation) AddedFields

func (m *VulnerabilityMutation) AddedFields() []string

AddedFields returns all numeric fields that were incremented/decremented during this mutation.

func (*VulnerabilityMutation) AddedFirstSeenAt

func (m *VulnerabilityMutation) AddedFirstSeenAt() (r int64, exists bool)

AddedFirstSeenAt returns the value that was added to the "first_seen_at" field in this mutation.

func (*VulnerabilityMutation) AddedIDs

func (m *VulnerabilityMutation) AddedIDs(name string) []ent.Value

AddedIDs returns all IDs (to other nodes) that were added for the given edge name in this mutation.

func (*VulnerabilityMutation) AddedLastModifiedAt

func (m *VulnerabilityMutation) AddedLastModifiedAt() (r int64, exists bool)

AddedLastModifiedAt returns the value that was added to the "last_modified_at" field in this mutation.

func (*VulnerabilityMutation) ClearCustomSeverity added in v0.1.1

func (m *VulnerabilityMutation) ClearCustomSeverity()

ClearCustomSeverity clears the "custom_severity" edge to the Severity entity.

func (*VulnerabilityMutation) ClearCvss

func (m *VulnerabilityMutation) ClearCvss()

ClearCvss clears the value of the "cvss" field.

func (*VulnerabilityMutation) ClearCweID

func (m *VulnerabilityMutation) ClearCweID()

ClearCweID clears the value of the "cwe_id" field.

func (*VulnerabilityMutation) ClearDescription

func (m *VulnerabilityMutation) ClearDescription()

ClearDescription clears the value of the "description" field.

func (*VulnerabilityMutation) ClearEdge

func (m *VulnerabilityMutation) 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 (*VulnerabilityMutation) ClearField

func (m *VulnerabilityMutation) 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 (*VulnerabilityMutation) ClearPackages

func (m *VulnerabilityMutation) ClearPackages()

ClearPackages clears the "packages" edge to the PackageRecord entity.

func (*VulnerabilityMutation) ClearReferences

func (m *VulnerabilityMutation) ClearReferences()

ClearReferences clears the value of the "references" field.

func (*VulnerabilityMutation) ClearSeverity

func (m *VulnerabilityMutation) ClearSeverity()

ClearSeverity clears the value of the "severity" field.

func (*VulnerabilityMutation) ClearTitle

func (m *VulnerabilityMutation) ClearTitle()

ClearTitle clears the value of the "title" field.

func (*VulnerabilityMutation) ClearedEdges

func (m *VulnerabilityMutation) ClearedEdges() []string

ClearedEdges returns all edge names that were cleared in this mutation.

func (*VulnerabilityMutation) ClearedFields

func (m *VulnerabilityMutation) ClearedFields() []string

ClearedFields returns all nullable fields that were cleared during this mutation.

func (VulnerabilityMutation) Client

func (m VulnerabilityMutation) 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 (*VulnerabilityMutation) CustomSeverityCleared added in v0.1.1

func (m *VulnerabilityMutation) CustomSeverityCleared() bool

CustomSeverityCleared reports if the "custom_severity" edge to the Severity entity was cleared.

func (*VulnerabilityMutation) CustomSeverityID added in v0.1.1

func (m *VulnerabilityMutation) CustomSeverityID() (id int, exists bool)

CustomSeverityID returns the "custom_severity" edge ID in the mutation.

func (*VulnerabilityMutation) CustomSeverityIDs added in v0.1.1

func (m *VulnerabilityMutation) CustomSeverityIDs() (ids []int)

CustomSeverityIDs returns the "custom_severity" edge IDs in the mutation. Note that IDs always returns len(IDs) <= 1 for unique edges, and you should use CustomSeverityID instead. It exists only for internal usage by the builders.

func (*VulnerabilityMutation) Cvss

func (m *VulnerabilityMutation) Cvss() (r []string, exists bool)

Cvss returns the value of the "cvss" field in the mutation.

func (*VulnerabilityMutation) CvssCleared

func (m *VulnerabilityMutation) CvssCleared() bool

CvssCleared returns if the "cvss" field was cleared in this mutation.

func (*VulnerabilityMutation) CweID

func (m *VulnerabilityMutation) CweID() (r []string, exists bool)

CweID returns the value of the "cwe_id" field in the mutation.

func (*VulnerabilityMutation) CweIDCleared

func (m *VulnerabilityMutation) CweIDCleared() bool

CweIDCleared returns if the "cwe_id" field was cleared in this mutation.

func (*VulnerabilityMutation) Description

func (m *VulnerabilityMutation) Description() (r string, exists bool)

Description returns the value of the "description" field in the mutation.

func (*VulnerabilityMutation) DescriptionCleared

func (m *VulnerabilityMutation) DescriptionCleared() bool

DescriptionCleared returns if the "description" field was cleared in this mutation.

func (*VulnerabilityMutation) EdgeCleared

func (m *VulnerabilityMutation) EdgeCleared(name string) bool

EdgeCleared returns a boolean which indicates if the edge with the given name was cleared in this mutation.

func (*VulnerabilityMutation) Field

func (m *VulnerabilityMutation) 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 (*VulnerabilityMutation) FieldCleared

func (m *VulnerabilityMutation) FieldCleared(name string) bool

FieldCleared returns a boolean indicating if a field with the given name was cleared in this mutation.

func (*VulnerabilityMutation) Fields

func (m *VulnerabilityMutation) 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 (*VulnerabilityMutation) FirstSeenAt

func (m *VulnerabilityMutation) FirstSeenAt() (r int64, exists bool)

FirstSeenAt returns the value of the "first_seen_at" field in the mutation.

func (*VulnerabilityMutation) ID

func (m *VulnerabilityMutation) 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 (*VulnerabilityMutation) LastModifiedAt

func (m *VulnerabilityMutation) LastModifiedAt() (r int64, exists bool)

LastModifiedAt returns the value of the "last_modified_at" field in the mutation.

func (*VulnerabilityMutation) OldCvss

func (m *VulnerabilityMutation) OldCvss(ctx context.Context) (v []string, err error)

OldCvss returns the old "cvss" field's value of the Vulnerability entity. If the Vulnerability 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 (*VulnerabilityMutation) OldCweID

func (m *VulnerabilityMutation) OldCweID(ctx context.Context) (v []string, err error)

OldCweID returns the old "cwe_id" field's value of the Vulnerability entity. If the Vulnerability 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 (*VulnerabilityMutation) OldDescription

func (m *VulnerabilityMutation) OldDescription(ctx context.Context) (v string, err error)

OldDescription returns the old "description" field's value of the Vulnerability entity. If the Vulnerability 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 (*VulnerabilityMutation) OldField

func (m *VulnerabilityMutation) 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 (*VulnerabilityMutation) OldFirstSeenAt

func (m *VulnerabilityMutation) OldFirstSeenAt(ctx context.Context) (v int64, err error)

OldFirstSeenAt returns the old "first_seen_at" field's value of the Vulnerability entity. If the Vulnerability 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 (*VulnerabilityMutation) OldLastModifiedAt

func (m *VulnerabilityMutation) OldLastModifiedAt(ctx context.Context) (v int64, err error)

OldLastModifiedAt returns the old "last_modified_at" field's value of the Vulnerability entity. If the Vulnerability 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 (*VulnerabilityMutation) OldReferences

func (m *VulnerabilityMutation) OldReferences(ctx context.Context) (v []string, err error)

OldReferences returns the old "references" field's value of the Vulnerability entity. If the Vulnerability 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 (*VulnerabilityMutation) OldSeverity

func (m *VulnerabilityMutation) OldSeverity(ctx context.Context) (v string, err error)

OldSeverity returns the old "severity" field's value of the Vulnerability entity. If the Vulnerability 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 (*VulnerabilityMutation) OldTitle

func (m *VulnerabilityMutation) OldTitle(ctx context.Context) (v string, err error)

OldTitle returns the old "title" field's value of the Vulnerability entity. If the Vulnerability 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 (*VulnerabilityMutation) Op

func (m *VulnerabilityMutation) Op() Op

Op returns the operation name.

func (*VulnerabilityMutation) PackagesCleared

func (m *VulnerabilityMutation) PackagesCleared() bool

PackagesCleared reports if the "packages" edge to the PackageRecord entity was cleared.

func (*VulnerabilityMutation) PackagesIDs

func (m *VulnerabilityMutation) PackagesIDs() (ids []int)

PackagesIDs returns the "packages" edge IDs in the mutation.

func (*VulnerabilityMutation) References

func (m *VulnerabilityMutation) References() (r []string, exists bool)

References returns the value of the "references" field in the mutation.

func (*VulnerabilityMutation) ReferencesCleared

func (m *VulnerabilityMutation) ReferencesCleared() bool

ReferencesCleared returns if the "references" field was cleared in this mutation.

func (*VulnerabilityMutation) RemovePackageIDs

func (m *VulnerabilityMutation) RemovePackageIDs(ids ...int)

RemovePackageIDs removes the "packages" edge to the PackageRecord entity by IDs.

func (*VulnerabilityMutation) RemovedEdges

func (m *VulnerabilityMutation) RemovedEdges() []string

RemovedEdges returns all edge names that were removed in this mutation.

func (*VulnerabilityMutation) RemovedIDs

func (m *VulnerabilityMutation) 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 (*VulnerabilityMutation) RemovedPackagesIDs

func (m *VulnerabilityMutation) RemovedPackagesIDs() (ids []int)

RemovedPackages returns the removed IDs of the "packages" edge to the PackageRecord entity.

func (*VulnerabilityMutation) ResetCustomSeverity added in v0.1.1

func (m *VulnerabilityMutation) ResetCustomSeverity()

ResetCustomSeverity resets all changes to the "custom_severity" edge.

func (*VulnerabilityMutation) ResetCvss

func (m *VulnerabilityMutation) ResetCvss()

ResetCvss resets all changes to the "cvss" field.

func (*VulnerabilityMutation) ResetCweID

func (m *VulnerabilityMutation) ResetCweID()

ResetCweID resets all changes to the "cwe_id" field.

func (*VulnerabilityMutation) ResetDescription

func (m *VulnerabilityMutation) ResetDescription()

ResetDescription resets all changes to the "description" field.

func (*VulnerabilityMutation) ResetEdge

func (m *VulnerabilityMutation) 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 (*VulnerabilityMutation) ResetField

func (m *VulnerabilityMutation) 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 (*VulnerabilityMutation) ResetFirstSeenAt

func (m *VulnerabilityMutation) ResetFirstSeenAt()

ResetFirstSeenAt resets all changes to the "first_seen_at" field.

func (*VulnerabilityMutation) ResetLastModifiedAt

func (m *VulnerabilityMutation) ResetLastModifiedAt()

ResetLastModifiedAt resets all changes to the "last_modified_at" field.

func (*VulnerabilityMutation) ResetPackages

func (m *VulnerabilityMutation) ResetPackages()

ResetPackages resets all changes to the "packages" edge.

func (*VulnerabilityMutation) ResetReferences

func (m *VulnerabilityMutation) ResetReferences()

ResetReferences resets all changes to the "references" field.

func (*VulnerabilityMutation) ResetSeverity

func (m *VulnerabilityMutation) ResetSeverity()

ResetSeverity resets all changes to the "severity" field.

func (*VulnerabilityMutation) ResetTitle

func (m *VulnerabilityMutation) ResetTitle()

ResetTitle resets all changes to the "title" field.

func (*VulnerabilityMutation) SetCustomSeverityID added in v0.1.1

func (m *VulnerabilityMutation) SetCustomSeverityID(id int)

SetCustomSeverityID sets the "custom_severity" edge to the Severity entity by id.

func (*VulnerabilityMutation) SetCvss

func (m *VulnerabilityMutation) SetCvss(s []string)

SetCvss sets the "cvss" field.

func (*VulnerabilityMutation) SetCweID

func (m *VulnerabilityMutation) SetCweID(s []string)

SetCweID sets the "cwe_id" field.

func (*VulnerabilityMutation) SetDescription

func (m *VulnerabilityMutation) SetDescription(s string)

SetDescription sets the "description" field.

func (*VulnerabilityMutation) SetField

func (m *VulnerabilityMutation) 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 (*VulnerabilityMutation) SetFirstSeenAt

func (m *VulnerabilityMutation) SetFirstSeenAt(i int64)

SetFirstSeenAt sets the "first_seen_at" field.

func (*VulnerabilityMutation) SetID

func (m *VulnerabilityMutation) SetID(id string)

SetID sets the value of the id field. Note that this operation is only accepted on creation of Vulnerability entities.

func (*VulnerabilityMutation) SetLastModifiedAt

func (m *VulnerabilityMutation) SetLastModifiedAt(i int64)

SetLastModifiedAt sets the "last_modified_at" field.

func (*VulnerabilityMutation) SetReferences

func (m *VulnerabilityMutation) SetReferences(s []string)

SetReferences sets the "references" field.

func (*VulnerabilityMutation) SetSeverity

func (m *VulnerabilityMutation) SetSeverity(s string)

SetSeverity sets the "severity" field.

func (*VulnerabilityMutation) SetTitle

func (m *VulnerabilityMutation) SetTitle(s string)

SetTitle sets the "title" field.

func (*VulnerabilityMutation) Severity

func (m *VulnerabilityMutation) Severity() (r string, exists bool)

Severity returns the value of the "severity" field in the mutation.

func (*VulnerabilityMutation) SeverityCleared

func (m *VulnerabilityMutation) SeverityCleared() bool

SeverityCleared returns if the "severity" field was cleared in this mutation.

func (*VulnerabilityMutation) Title

func (m *VulnerabilityMutation) Title() (r string, exists bool)

Title returns the value of the "title" field in the mutation.

func (*VulnerabilityMutation) TitleCleared

func (m *VulnerabilityMutation) TitleCleared() bool

TitleCleared returns if the "title" field was cleared in this mutation.

func (VulnerabilityMutation) Tx

func (m VulnerabilityMutation) Tx() (*Tx, error)

Tx returns an `ent.Tx` for mutations that were executed in transactions; it returns an error otherwise.

func (*VulnerabilityMutation) Type

func (m *VulnerabilityMutation) Type() string

Type returns the node type of this mutation (Vulnerability).

func (*VulnerabilityMutation) Where

Where appends a list predicates to the VulnerabilityMutation builder.

type VulnerabilityQuery

type VulnerabilityQuery struct {
	// contains filtered or unexported fields
}

VulnerabilityQuery is the builder for querying Vulnerability entities.

func (*VulnerabilityQuery) All

All executes the query and returns a list of Vulnerabilities.

func (*VulnerabilityQuery) AllX

AllX is like All, but panics if an error occurs.

func (*VulnerabilityQuery) Clone

Clone returns a duplicate of the VulnerabilityQuery builder, including all associated steps. It can be used to prepare common query builders and use them differently after the clone is made.

func (*VulnerabilityQuery) Count

func (vq *VulnerabilityQuery) Count(ctx context.Context) (int, error)

Count returns the count of the given query.

func (*VulnerabilityQuery) CountX

func (vq *VulnerabilityQuery) CountX(ctx context.Context) int

CountX is like Count, but panics if an error occurs.

func (*VulnerabilityQuery) Exist

func (vq *VulnerabilityQuery) Exist(ctx context.Context) (bool, error)

Exist returns true if the query has elements in the graph.

func (*VulnerabilityQuery) ExistX

func (vq *VulnerabilityQuery) ExistX(ctx context.Context) bool

ExistX is like Exist, but panics if an error occurs.

func (*VulnerabilityQuery) First

First returns the first Vulnerability entity from the query. Returns a *NotFoundError when no Vulnerability was found.

func (*VulnerabilityQuery) FirstID

func (vq *VulnerabilityQuery) FirstID(ctx context.Context) (id string, err error)

FirstID returns the first Vulnerability ID from the query. Returns a *NotFoundError when no Vulnerability ID was found.

func (*VulnerabilityQuery) FirstIDX

func (vq *VulnerabilityQuery) FirstIDX(ctx context.Context) string

FirstIDX is like FirstID, but panics if an error occurs.

func (*VulnerabilityQuery) FirstX

FirstX is like First, but panics if an error occurs.

func (*VulnerabilityQuery) GroupBy

func (vq *VulnerabilityQuery) GroupBy(field string, fields ...string) *VulnerabilityGroupBy

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 {
	FirstSeenAt int64 `json:"first_seen_at,omitempty"`
	Count int `json:"count,omitempty"`
}

client.Vulnerability.Query().
	GroupBy(vulnerability.FieldFirstSeenAt).
	Aggregate(ent.Count()).
	Scan(ctx, &v)

func (*VulnerabilityQuery) IDs

func (vq *VulnerabilityQuery) IDs(ctx context.Context) ([]string, error)

IDs executes the query and returns a list of Vulnerability IDs.

func (*VulnerabilityQuery) IDsX

func (vq *VulnerabilityQuery) IDsX(ctx context.Context) []string

IDsX is like IDs, but panics if an error occurs.

func (*VulnerabilityQuery) Limit

func (vq *VulnerabilityQuery) Limit(limit int) *VulnerabilityQuery

Limit adds a limit step to the query.

func (*VulnerabilityQuery) Offset

func (vq *VulnerabilityQuery) Offset(offset int) *VulnerabilityQuery

Offset adds an offset step to the query.

func (*VulnerabilityQuery) Only

Only returns a single Vulnerability entity found by the query, ensuring it only returns one. Returns a *NotSingularError when exactly one Vulnerability entity is not found. Returns a *NotFoundError when no Vulnerability entities are found.

func (*VulnerabilityQuery) OnlyID

func (vq *VulnerabilityQuery) OnlyID(ctx context.Context) (id string, err error)

OnlyID is like Only, but returns the only Vulnerability ID in the query. Returns a *NotSingularError when exactly one Vulnerability ID is not found. Returns a *NotFoundError when no entities are found.

func (*VulnerabilityQuery) OnlyIDX

func (vq *VulnerabilityQuery) OnlyIDX(ctx context.Context) string

OnlyIDX is like OnlyID, but panics if an error occurs.

func (*VulnerabilityQuery) OnlyX

OnlyX is like Only, but panics if an error occurs.

func (*VulnerabilityQuery) Order

Order adds an order step to the query.

func (*VulnerabilityQuery) QueryCustomSeverity added in v0.1.1

func (vq *VulnerabilityQuery) QueryCustomSeverity() *SeverityQuery

QueryCustomSeverity chains the current query on the "custom_severity" edge.

func (*VulnerabilityQuery) QueryPackages

func (vq *VulnerabilityQuery) QueryPackages() *PackageRecordQuery

QueryPackages chains the current query on the "packages" edge.

func (*VulnerabilityQuery) Select

func (vq *VulnerabilityQuery) Select(fields ...string) *VulnerabilitySelect

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 {
	FirstSeenAt int64 `json:"first_seen_at,omitempty"`
}

client.Vulnerability.Query().
	Select(vulnerability.FieldFirstSeenAt).
	Scan(ctx, &v)

func (*VulnerabilityQuery) Unique

func (vq *VulnerabilityQuery) Unique(unique bool) *VulnerabilityQuery

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 (*VulnerabilityQuery) Where

Where adds a new predicate for the VulnerabilityQuery builder.

func (*VulnerabilityQuery) WithCustomSeverity added in v0.1.1

func (vq *VulnerabilityQuery) WithCustomSeverity(opts ...func(*SeverityQuery)) *VulnerabilityQuery

WithCustomSeverity tells the query-builder to eager-load the nodes that are connected to the "custom_severity" edge. The optional arguments are used to configure the query builder of the edge.

func (*VulnerabilityQuery) WithPackages

func (vq *VulnerabilityQuery) WithPackages(opts ...func(*PackageRecordQuery)) *VulnerabilityQuery

WithPackages tells the query-builder to eager-load the nodes that are connected to the "packages" edge. The optional arguments are used to configure the query builder of the edge.

type VulnerabilitySelect

type VulnerabilitySelect struct {
	*VulnerabilityQuery
	// contains filtered or unexported fields
}

VulnerabilitySelect is the builder for selecting fields of Vulnerability entities.

func (*VulnerabilitySelect) Bool

func (vs *VulnerabilitySelect) Bool(ctx context.Context) (_ bool, err error)

Bool returns a single bool from a selector. It is only allowed when selecting one field.

func (*VulnerabilitySelect) BoolX

func (vs *VulnerabilitySelect) BoolX(ctx context.Context) bool

BoolX is like Bool, but panics if an error occurs.

func (*VulnerabilitySelect) Bools

func (vs *VulnerabilitySelect) Bools(ctx context.Context) ([]bool, error)

Bools returns list of bools from a selector. It is only allowed when selecting one field.

func (*VulnerabilitySelect) BoolsX

func (vs *VulnerabilitySelect) BoolsX(ctx context.Context) []bool

BoolsX is like Bools, but panics if an error occurs.

func (*VulnerabilitySelect) Float64

func (vs *VulnerabilitySelect) Float64(ctx context.Context) (_ float64, err error)

Float64 returns a single float64 from a selector. It is only allowed when selecting one field.

func (*VulnerabilitySelect) Float64X

func (vs *VulnerabilitySelect) Float64X(ctx context.Context) float64

Float64X is like Float64, but panics if an error occurs.

func (*VulnerabilitySelect) Float64s

func (vs *VulnerabilitySelect) Float64s(ctx context.Context) ([]float64, error)

Float64s returns list of float64s from a selector. It is only allowed when selecting one field.

func (*VulnerabilitySelect) Float64sX

func (vs *VulnerabilitySelect) Float64sX(ctx context.Context) []float64

Float64sX is like Float64s, but panics if an error occurs.

func (*VulnerabilitySelect) Int

func (vs *VulnerabilitySelect) Int(ctx context.Context) (_ int, err error)

Int returns a single int from a selector. It is only allowed when selecting one field.

func (*VulnerabilitySelect) IntX

func (vs *VulnerabilitySelect) IntX(ctx context.Context) int

IntX is like Int, but panics if an error occurs.

func (*VulnerabilitySelect) Ints

func (vs *VulnerabilitySelect) Ints(ctx context.Context) ([]int, error)

Ints returns list of ints from a selector. It is only allowed when selecting one field.

func (*VulnerabilitySelect) IntsX

func (vs *VulnerabilitySelect) IntsX(ctx context.Context) []int

IntsX is like Ints, but panics if an error occurs.

func (*VulnerabilitySelect) Scan

func (vs *VulnerabilitySelect) Scan(ctx context.Context, v interface{}) error

Scan applies the selector query and scans the result into the given value.

func (*VulnerabilitySelect) ScanX

func (vs *VulnerabilitySelect) ScanX(ctx context.Context, v interface{})

ScanX is like Scan, but panics if an error occurs.

func (*VulnerabilitySelect) String

func (vs *VulnerabilitySelect) String(ctx context.Context) (_ string, err error)

String returns a single string from a selector. It is only allowed when selecting one field.

func (*VulnerabilitySelect) StringX

func (vs *VulnerabilitySelect) StringX(ctx context.Context) string

StringX is like String, but panics if an error occurs.

func (*VulnerabilitySelect) Strings

func (vs *VulnerabilitySelect) Strings(ctx context.Context) ([]string, error)

Strings returns list of strings from a selector. It is only allowed when selecting one field.

func (*VulnerabilitySelect) StringsX

func (vs *VulnerabilitySelect) StringsX(ctx context.Context) []string

StringsX is like Strings, but panics if an error occurs.

type VulnerabilityUpdate

type VulnerabilityUpdate struct {
	// contains filtered or unexported fields
}

VulnerabilityUpdate is the builder for updating Vulnerability entities.

func (*VulnerabilityUpdate) AddFirstSeenAt

func (vu *VulnerabilityUpdate) AddFirstSeenAt(i int64) *VulnerabilityUpdate

AddFirstSeenAt adds i to the "first_seen_at" field.

func (*VulnerabilityUpdate) AddLastModifiedAt

func (vu *VulnerabilityUpdate) AddLastModifiedAt(i int64) *VulnerabilityUpdate

AddLastModifiedAt adds i to the "last_modified_at" field.

func (*VulnerabilityUpdate) AddPackageIDs

func (vu *VulnerabilityUpdate) AddPackageIDs(ids ...int) *VulnerabilityUpdate

AddPackageIDs adds the "packages" edge to the PackageRecord entity by IDs.

func (*VulnerabilityUpdate) AddPackages

func (vu *VulnerabilityUpdate) AddPackages(p ...*PackageRecord) *VulnerabilityUpdate

AddPackages adds the "packages" edges to the PackageRecord entity.

func (*VulnerabilityUpdate) ClearCustomSeverity added in v0.1.1

func (vu *VulnerabilityUpdate) ClearCustomSeverity() *VulnerabilityUpdate

ClearCustomSeverity clears the "custom_severity" edge to the Severity entity.

func (*VulnerabilityUpdate) ClearCvss

func (vu *VulnerabilityUpdate) ClearCvss() *VulnerabilityUpdate

ClearCvss clears the value of the "cvss" field.

func (*VulnerabilityUpdate) ClearCweID

func (vu *VulnerabilityUpdate) ClearCweID() *VulnerabilityUpdate

ClearCweID clears the value of the "cwe_id" field.

func (*VulnerabilityUpdate) ClearDescription

func (vu *VulnerabilityUpdate) ClearDescription() *VulnerabilityUpdate

ClearDescription clears the value of the "description" field.

func (*VulnerabilityUpdate) ClearPackages

func (vu *VulnerabilityUpdate) ClearPackages() *VulnerabilityUpdate

ClearPackages clears all "packages" edges to the PackageRecord entity.

func (*VulnerabilityUpdate) ClearReferences

func (vu *VulnerabilityUpdate) ClearReferences() *VulnerabilityUpdate

ClearReferences clears the value of the "references" field.

func (*VulnerabilityUpdate) ClearSeverity

func (vu *VulnerabilityUpdate) ClearSeverity() *VulnerabilityUpdate

ClearSeverity clears the value of the "severity" field.

func (*VulnerabilityUpdate) ClearTitle

func (vu *VulnerabilityUpdate) ClearTitle() *VulnerabilityUpdate

ClearTitle clears the value of the "title" field.

func (*VulnerabilityUpdate) Exec

func (vu *VulnerabilityUpdate) Exec(ctx context.Context) error

Exec executes the query.

func (*VulnerabilityUpdate) ExecX

func (vu *VulnerabilityUpdate) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityUpdate) Mutation

Mutation returns the VulnerabilityMutation object of the builder.

func (*VulnerabilityUpdate) RemovePackageIDs

func (vu *VulnerabilityUpdate) RemovePackageIDs(ids ...int) *VulnerabilityUpdate

RemovePackageIDs removes the "packages" edge to PackageRecord entities by IDs.

func (*VulnerabilityUpdate) RemovePackages

func (vu *VulnerabilityUpdate) RemovePackages(p ...*PackageRecord) *VulnerabilityUpdate

RemovePackages removes "packages" edges to PackageRecord entities.

func (*VulnerabilityUpdate) Save

func (vu *VulnerabilityUpdate) Save(ctx context.Context) (int, error)

Save executes the query and returns the number of nodes affected by the update operation.

func (*VulnerabilityUpdate) SaveX

func (vu *VulnerabilityUpdate) SaveX(ctx context.Context) int

SaveX is like Save, but panics if an error occurs.

func (*VulnerabilityUpdate) SetCustomSeverity added in v0.1.1

func (vu *VulnerabilityUpdate) SetCustomSeverity(s *Severity) *VulnerabilityUpdate

SetCustomSeverity sets the "custom_severity" edge to the Severity entity.

func (*VulnerabilityUpdate) SetCustomSeverityID added in v0.1.1

func (vu *VulnerabilityUpdate) SetCustomSeverityID(id int) *VulnerabilityUpdate

SetCustomSeverityID sets the "custom_severity" edge to the Severity entity by ID.

func (*VulnerabilityUpdate) SetCvss

SetCvss sets the "cvss" field.

func (*VulnerabilityUpdate) SetCweID

func (vu *VulnerabilityUpdate) SetCweID(s []string) *VulnerabilityUpdate

SetCweID sets the "cwe_id" field.

func (*VulnerabilityUpdate) SetDescription

func (vu *VulnerabilityUpdate) SetDescription(s string) *VulnerabilityUpdate

SetDescription sets the "description" field.

func (*VulnerabilityUpdate) SetFirstSeenAt

func (vu *VulnerabilityUpdate) SetFirstSeenAt(i int64) *VulnerabilityUpdate

SetFirstSeenAt sets the "first_seen_at" field.

func (*VulnerabilityUpdate) SetLastModifiedAt

func (vu *VulnerabilityUpdate) SetLastModifiedAt(i int64) *VulnerabilityUpdate

SetLastModifiedAt sets the "last_modified_at" field.

func (*VulnerabilityUpdate) SetNillableCustomSeverityID added in v0.1.1

func (vu *VulnerabilityUpdate) SetNillableCustomSeverityID(id *int) *VulnerabilityUpdate

SetNillableCustomSeverityID sets the "custom_severity" edge to the Severity entity by ID if the given value is not nil.

func (*VulnerabilityUpdate) SetNillableDescription

func (vu *VulnerabilityUpdate) SetNillableDescription(s *string) *VulnerabilityUpdate

SetNillableDescription sets the "description" field if the given value is not nil.

func (*VulnerabilityUpdate) SetNillableSeverity

func (vu *VulnerabilityUpdate) SetNillableSeverity(s *string) *VulnerabilityUpdate

SetNillableSeverity sets the "severity" field if the given value is not nil.

func (*VulnerabilityUpdate) SetNillableTitle

func (vu *VulnerabilityUpdate) SetNillableTitle(s *string) *VulnerabilityUpdate

SetNillableTitle sets the "title" field if the given value is not nil.

func (*VulnerabilityUpdate) SetReferences

func (vu *VulnerabilityUpdate) SetReferences(s []string) *VulnerabilityUpdate

SetReferences sets the "references" field.

func (*VulnerabilityUpdate) SetSeverity

func (vu *VulnerabilityUpdate) SetSeverity(s string) *VulnerabilityUpdate

SetSeverity sets the "severity" field.

func (*VulnerabilityUpdate) SetTitle

SetTitle sets the "title" field.

func (*VulnerabilityUpdate) Where

Where appends a list predicates to the VulnerabilityUpdate builder.

type VulnerabilityUpdateOne

type VulnerabilityUpdateOne struct {
	// contains filtered or unexported fields
}

VulnerabilityUpdateOne is the builder for updating a single Vulnerability entity.

func (*VulnerabilityUpdateOne) AddFirstSeenAt

func (vuo *VulnerabilityUpdateOne) AddFirstSeenAt(i int64) *VulnerabilityUpdateOne

AddFirstSeenAt adds i to the "first_seen_at" field.

func (*VulnerabilityUpdateOne) AddLastModifiedAt

func (vuo *VulnerabilityUpdateOne) AddLastModifiedAt(i int64) *VulnerabilityUpdateOne

AddLastModifiedAt adds i to the "last_modified_at" field.

func (*VulnerabilityUpdateOne) AddPackageIDs

func (vuo *VulnerabilityUpdateOne) AddPackageIDs(ids ...int) *VulnerabilityUpdateOne

AddPackageIDs adds the "packages" edge to the PackageRecord entity by IDs.

func (*VulnerabilityUpdateOne) AddPackages

AddPackages adds the "packages" edges to the PackageRecord entity.

func (*VulnerabilityUpdateOne) ClearCustomSeverity added in v0.1.1

func (vuo *VulnerabilityUpdateOne) ClearCustomSeverity() *VulnerabilityUpdateOne

ClearCustomSeverity clears the "custom_severity" edge to the Severity entity.

func (*VulnerabilityUpdateOne) ClearCvss

ClearCvss clears the value of the "cvss" field.

func (*VulnerabilityUpdateOne) ClearCweID

ClearCweID clears the value of the "cwe_id" field.

func (*VulnerabilityUpdateOne) ClearDescription

func (vuo *VulnerabilityUpdateOne) ClearDescription() *VulnerabilityUpdateOne

ClearDescription clears the value of the "description" field.

func (*VulnerabilityUpdateOne) ClearPackages

func (vuo *VulnerabilityUpdateOne) ClearPackages() *VulnerabilityUpdateOne

ClearPackages clears all "packages" edges to the PackageRecord entity.

func (*VulnerabilityUpdateOne) ClearReferences

func (vuo *VulnerabilityUpdateOne) ClearReferences() *VulnerabilityUpdateOne

ClearReferences clears the value of the "references" field.

func (*VulnerabilityUpdateOne) ClearSeverity

func (vuo *VulnerabilityUpdateOne) ClearSeverity() *VulnerabilityUpdateOne

ClearSeverity clears the value of the "severity" field.

func (*VulnerabilityUpdateOne) ClearTitle

ClearTitle clears the value of the "title" field.

func (*VulnerabilityUpdateOne) Exec

Exec executes the query on the entity.

func (*VulnerabilityUpdateOne) ExecX

func (vuo *VulnerabilityUpdateOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityUpdateOne) Mutation

Mutation returns the VulnerabilityMutation object of the builder.

func (*VulnerabilityUpdateOne) RemovePackageIDs

func (vuo *VulnerabilityUpdateOne) RemovePackageIDs(ids ...int) *VulnerabilityUpdateOne

RemovePackageIDs removes the "packages" edge to PackageRecord entities by IDs.

func (*VulnerabilityUpdateOne) RemovePackages

func (vuo *VulnerabilityUpdateOne) RemovePackages(p ...*PackageRecord) *VulnerabilityUpdateOne

RemovePackages removes "packages" edges to PackageRecord entities.

func (*VulnerabilityUpdateOne) Save

Save executes the query and returns the updated Vulnerability entity.

func (*VulnerabilityUpdateOne) SaveX

SaveX is like Save, but panics if an error occurs.

func (*VulnerabilityUpdateOne) Select

func (vuo *VulnerabilityUpdateOne) Select(field string, fields ...string) *VulnerabilityUpdateOne

Select allows selecting one or more fields (columns) of the returned entity. The default is selecting all fields defined in the entity schema.

func (*VulnerabilityUpdateOne) SetCustomSeverity added in v0.1.1

func (vuo *VulnerabilityUpdateOne) SetCustomSeverity(s *Severity) *VulnerabilityUpdateOne

SetCustomSeverity sets the "custom_severity" edge to the Severity entity.

func (*VulnerabilityUpdateOne) SetCustomSeverityID added in v0.1.1

func (vuo *VulnerabilityUpdateOne) SetCustomSeverityID(id int) *VulnerabilityUpdateOne

SetCustomSeverityID sets the "custom_severity" edge to the Severity entity by ID.

func (*VulnerabilityUpdateOne) SetCvss

SetCvss sets the "cvss" field.

func (*VulnerabilityUpdateOne) SetCweID

SetCweID sets the "cwe_id" field.

func (*VulnerabilityUpdateOne) SetDescription

func (vuo *VulnerabilityUpdateOne) SetDescription(s string) *VulnerabilityUpdateOne

SetDescription sets the "description" field.

func (*VulnerabilityUpdateOne) SetFirstSeenAt

func (vuo *VulnerabilityUpdateOne) SetFirstSeenAt(i int64) *VulnerabilityUpdateOne

SetFirstSeenAt sets the "first_seen_at" field.

func (*VulnerabilityUpdateOne) SetLastModifiedAt

func (vuo *VulnerabilityUpdateOne) SetLastModifiedAt(i int64) *VulnerabilityUpdateOne

SetLastModifiedAt sets the "last_modified_at" field.

func (*VulnerabilityUpdateOne) SetNillableCustomSeverityID added in v0.1.1

func (vuo *VulnerabilityUpdateOne) SetNillableCustomSeverityID(id *int) *VulnerabilityUpdateOne

SetNillableCustomSeverityID sets the "custom_severity" edge to the Severity entity by ID if the given value is not nil.

func (*VulnerabilityUpdateOne) SetNillableDescription

func (vuo *VulnerabilityUpdateOne) SetNillableDescription(s *string) *VulnerabilityUpdateOne

SetNillableDescription sets the "description" field if the given value is not nil.

func (*VulnerabilityUpdateOne) SetNillableSeverity

func (vuo *VulnerabilityUpdateOne) SetNillableSeverity(s *string) *VulnerabilityUpdateOne

SetNillableSeverity sets the "severity" field if the given value is not nil.

func (*VulnerabilityUpdateOne) SetNillableTitle

func (vuo *VulnerabilityUpdateOne) SetNillableTitle(s *string) *VulnerabilityUpdateOne

SetNillableTitle sets the "title" field if the given value is not nil.

func (*VulnerabilityUpdateOne) SetReferences

func (vuo *VulnerabilityUpdateOne) SetReferences(s []string) *VulnerabilityUpdateOne

SetReferences sets the "references" field.

func (*VulnerabilityUpdateOne) SetSeverity

SetSeverity sets the "severity" field.

func (*VulnerabilityUpdateOne) SetTitle

SetTitle sets the "title" field.

type VulnerabilityUpsert

type VulnerabilityUpsert struct {
	*sql.UpdateSet
}

VulnerabilityUpsert is the "OnConflict" setter.

func (*VulnerabilityUpsert) ClearCvss

func (u *VulnerabilityUpsert) ClearCvss() *VulnerabilityUpsert

ClearCvss clears the value of the "cvss" field.

func (*VulnerabilityUpsert) ClearCweID

func (u *VulnerabilityUpsert) ClearCweID() *VulnerabilityUpsert

ClearCweID clears the value of the "cwe_id" field.

func (*VulnerabilityUpsert) ClearDescription

func (u *VulnerabilityUpsert) ClearDescription() *VulnerabilityUpsert

ClearDescription clears the value of the "description" field.

func (*VulnerabilityUpsert) ClearReferences

func (u *VulnerabilityUpsert) ClearReferences() *VulnerabilityUpsert

ClearReferences clears the value of the "references" field.

func (*VulnerabilityUpsert) ClearSeverity

func (u *VulnerabilityUpsert) ClearSeverity() *VulnerabilityUpsert

ClearSeverity clears the value of the "severity" field.

func (*VulnerabilityUpsert) ClearTitle

func (u *VulnerabilityUpsert) ClearTitle() *VulnerabilityUpsert

ClearTitle clears the value of the "title" field.

func (*VulnerabilityUpsert) SetCvss

SetCvss sets the "cvss" field.

func (*VulnerabilityUpsert) SetCweID

SetCweID sets the "cwe_id" field.

func (*VulnerabilityUpsert) SetDescription

func (u *VulnerabilityUpsert) SetDescription(v string) *VulnerabilityUpsert

SetDescription sets the "description" field.

func (*VulnerabilityUpsert) SetFirstSeenAt

func (u *VulnerabilityUpsert) SetFirstSeenAt(v int64) *VulnerabilityUpsert

SetFirstSeenAt sets the "first_seen_at" field.

func (*VulnerabilityUpsert) SetLastModifiedAt

func (u *VulnerabilityUpsert) SetLastModifiedAt(v int64) *VulnerabilityUpsert

SetLastModifiedAt sets the "last_modified_at" field.

func (*VulnerabilityUpsert) SetReferences

func (u *VulnerabilityUpsert) SetReferences(v []string) *VulnerabilityUpsert

SetReferences sets the "references" field.

func (*VulnerabilityUpsert) SetSeverity

func (u *VulnerabilityUpsert) SetSeverity(v string) *VulnerabilityUpsert

SetSeverity sets the "severity" field.

func (*VulnerabilityUpsert) SetTitle

SetTitle sets the "title" field.

func (*VulnerabilityUpsert) UpdateCvss

func (u *VulnerabilityUpsert) UpdateCvss() *VulnerabilityUpsert

UpdateCvss sets the "cvss" field to the value that was provided on create.

func (*VulnerabilityUpsert) UpdateCweID

func (u *VulnerabilityUpsert) UpdateCweID() *VulnerabilityUpsert

UpdateCweID sets the "cwe_id" field to the value that was provided on create.

func (*VulnerabilityUpsert) UpdateDescription

func (u *VulnerabilityUpsert) UpdateDescription() *VulnerabilityUpsert

UpdateDescription sets the "description" field to the value that was provided on create.

func (*VulnerabilityUpsert) UpdateFirstSeenAt

func (u *VulnerabilityUpsert) UpdateFirstSeenAt() *VulnerabilityUpsert

UpdateFirstSeenAt sets the "first_seen_at" field to the value that was provided on create.

func (*VulnerabilityUpsert) UpdateLastModifiedAt

func (u *VulnerabilityUpsert) UpdateLastModifiedAt() *VulnerabilityUpsert

UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.

func (*VulnerabilityUpsert) UpdateReferences

func (u *VulnerabilityUpsert) UpdateReferences() *VulnerabilityUpsert

UpdateReferences sets the "references" field to the value that was provided on create.

func (*VulnerabilityUpsert) UpdateSeverity

func (u *VulnerabilityUpsert) UpdateSeverity() *VulnerabilityUpsert

UpdateSeverity sets the "severity" field to the value that was provided on create.

func (*VulnerabilityUpsert) UpdateTitle

func (u *VulnerabilityUpsert) UpdateTitle() *VulnerabilityUpsert

UpdateTitle sets the "title" field to the value that was provided on create.

type VulnerabilityUpsertBulk

type VulnerabilityUpsertBulk struct {
	// contains filtered or unexported fields
}

VulnerabilityUpsertBulk is the builder for "upsert"-ing a bulk of Vulnerability nodes.

func (*VulnerabilityUpsertBulk) ClearCvss

ClearCvss clears the value of the "cvss" field.

func (*VulnerabilityUpsertBulk) ClearCweID

ClearCweID clears the value of the "cwe_id" field.

func (*VulnerabilityUpsertBulk) ClearDescription

func (u *VulnerabilityUpsertBulk) ClearDescription() *VulnerabilityUpsertBulk

ClearDescription clears the value of the "description" field.

func (*VulnerabilityUpsertBulk) ClearReferences

func (u *VulnerabilityUpsertBulk) ClearReferences() *VulnerabilityUpsertBulk

ClearReferences clears the value of the "references" field.

func (*VulnerabilityUpsertBulk) ClearSeverity

ClearSeverity clears the value of the "severity" field.

func (*VulnerabilityUpsertBulk) ClearTitle

ClearTitle clears the value of the "title" field.

func (*VulnerabilityUpsertBulk) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnerabilityUpsertBulk) Exec

Exec executes the query.

func (*VulnerabilityUpsertBulk) ExecX

func (u *VulnerabilityUpsertBulk) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityUpsertBulk) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Vulnerability.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VulnerabilityUpsertBulk) SetCvss

SetCvss sets the "cvss" field.

func (*VulnerabilityUpsertBulk) SetCweID

SetCweID sets the "cwe_id" field.

func (*VulnerabilityUpsertBulk) SetDescription

SetDescription sets the "description" field.

func (*VulnerabilityUpsertBulk) SetFirstSeenAt

SetFirstSeenAt sets the "first_seen_at" field.

func (*VulnerabilityUpsertBulk) SetLastModifiedAt

func (u *VulnerabilityUpsertBulk) SetLastModifiedAt(v int64) *VulnerabilityUpsertBulk

SetLastModifiedAt sets the "last_modified_at" field.

func (*VulnerabilityUpsertBulk) SetReferences

SetReferences sets the "references" field.

func (*VulnerabilityUpsertBulk) SetSeverity

SetSeverity sets the "severity" field.

func (*VulnerabilityUpsertBulk) SetTitle

SetTitle sets the "title" field.

func (*VulnerabilityUpsertBulk) Update

Update allows overriding fields `UPDATE` values. See the VulnerabilityCreateBulk.OnConflict documentation for more info.

func (*VulnerabilityUpsertBulk) UpdateCvss

UpdateCvss sets the "cvss" field to the value that was provided on create.

func (*VulnerabilityUpsertBulk) UpdateCweID

UpdateCweID sets the "cwe_id" field to the value that was provided on create.

func (*VulnerabilityUpsertBulk) UpdateDescription

func (u *VulnerabilityUpsertBulk) UpdateDescription() *VulnerabilityUpsertBulk

UpdateDescription sets the "description" field to the value that was provided on create.

func (*VulnerabilityUpsertBulk) UpdateFirstSeenAt

func (u *VulnerabilityUpsertBulk) UpdateFirstSeenAt() *VulnerabilityUpsertBulk

UpdateFirstSeenAt sets the "first_seen_at" field to the value that was provided on create.

func (*VulnerabilityUpsertBulk) UpdateLastModifiedAt

func (u *VulnerabilityUpsertBulk) UpdateLastModifiedAt() *VulnerabilityUpsertBulk

UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.

func (*VulnerabilityUpsertBulk) UpdateNewValues

func (u *VulnerabilityUpsertBulk) UpdateNewValues() *VulnerabilityUpsertBulk

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.Vulnerability.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

func (*VulnerabilityUpsertBulk) UpdateReferences

func (u *VulnerabilityUpsertBulk) UpdateReferences() *VulnerabilityUpsertBulk

UpdateReferences sets the "references" field to the value that was provided on create.

func (*VulnerabilityUpsertBulk) UpdateSeverity

func (u *VulnerabilityUpsertBulk) UpdateSeverity() *VulnerabilityUpsertBulk

UpdateSeverity sets the "severity" field to the value that was provided on create.

func (*VulnerabilityUpsertBulk) UpdateTitle

UpdateTitle sets the "title" field to the value that was provided on create.

type VulnerabilityUpsertOne

type VulnerabilityUpsertOne struct {
	// contains filtered or unexported fields
}

VulnerabilityUpsertOne is the builder for "upsert"-ing

one Vulnerability node.

func (*VulnerabilityUpsertOne) ClearCvss

ClearCvss clears the value of the "cvss" field.

func (*VulnerabilityUpsertOne) ClearCweID

ClearCweID clears the value of the "cwe_id" field.

func (*VulnerabilityUpsertOne) ClearDescription

func (u *VulnerabilityUpsertOne) ClearDescription() *VulnerabilityUpsertOne

ClearDescription clears the value of the "description" field.

func (*VulnerabilityUpsertOne) ClearReferences

func (u *VulnerabilityUpsertOne) ClearReferences() *VulnerabilityUpsertOne

ClearReferences clears the value of the "references" field.

func (*VulnerabilityUpsertOne) ClearSeverity

func (u *VulnerabilityUpsertOne) ClearSeverity() *VulnerabilityUpsertOne

ClearSeverity clears the value of the "severity" field.

func (*VulnerabilityUpsertOne) ClearTitle

ClearTitle clears the value of the "title" field.

func (*VulnerabilityUpsertOne) DoNothing

DoNothing configures the conflict_action to `DO NOTHING`. Supported only by SQLite and PostgreSQL.

func (*VulnerabilityUpsertOne) Exec

Exec executes the query.

func (*VulnerabilityUpsertOne) ExecX

func (u *VulnerabilityUpsertOne) ExecX(ctx context.Context)

ExecX is like Exec, but panics if an error occurs.

func (*VulnerabilityUpsertOne) ID

func (u *VulnerabilityUpsertOne) ID(ctx context.Context) (id string, err error)

Exec executes the UPSERT query and returns the inserted/updated ID.

func (*VulnerabilityUpsertOne) IDX

IDX is like ID, but panics if an error occurs.

func (*VulnerabilityUpsertOne) Ignore

Ignore sets each column to itself in case of conflict. Using this option is equivalent to using:

client.Vulnerability.Create().
    OnConflict(sql.ResolveWithIgnore()).
    Exec(ctx)

func (*VulnerabilityUpsertOne) SetCvss

SetCvss sets the "cvss" field.

func (*VulnerabilityUpsertOne) SetCweID

SetCweID sets the "cwe_id" field.

func (*VulnerabilityUpsertOne) SetDescription

SetDescription sets the "description" field.

func (*VulnerabilityUpsertOne) SetFirstSeenAt

func (u *VulnerabilityUpsertOne) SetFirstSeenAt(v int64) *VulnerabilityUpsertOne

SetFirstSeenAt sets the "first_seen_at" field.

func (*VulnerabilityUpsertOne) SetLastModifiedAt

func (u *VulnerabilityUpsertOne) SetLastModifiedAt(v int64) *VulnerabilityUpsertOne

SetLastModifiedAt sets the "last_modified_at" field.

func (*VulnerabilityUpsertOne) SetReferences

func (u *VulnerabilityUpsertOne) SetReferences(v []string) *VulnerabilityUpsertOne

SetReferences sets the "references" field.

func (*VulnerabilityUpsertOne) SetSeverity

SetSeverity sets the "severity" field.

func (*VulnerabilityUpsertOne) SetTitle

SetTitle sets the "title" field.

func (*VulnerabilityUpsertOne) Update

Update allows overriding fields `UPDATE` values. See the VulnerabilityCreate.OnConflict documentation for more info.

func (*VulnerabilityUpsertOne) UpdateCvss

UpdateCvss sets the "cvss" field to the value that was provided on create.

func (*VulnerabilityUpsertOne) UpdateCweID

UpdateCweID sets the "cwe_id" field to the value that was provided on create.

func (*VulnerabilityUpsertOne) UpdateDescription

func (u *VulnerabilityUpsertOne) UpdateDescription() *VulnerabilityUpsertOne

UpdateDescription sets the "description" field to the value that was provided on create.

func (*VulnerabilityUpsertOne) UpdateFirstSeenAt

func (u *VulnerabilityUpsertOne) UpdateFirstSeenAt() *VulnerabilityUpsertOne

UpdateFirstSeenAt sets the "first_seen_at" field to the value that was provided on create.

func (*VulnerabilityUpsertOne) UpdateLastModifiedAt

func (u *VulnerabilityUpsertOne) UpdateLastModifiedAt() *VulnerabilityUpsertOne

UpdateLastModifiedAt sets the "last_modified_at" field to the value that was provided on create.

func (*VulnerabilityUpsertOne) UpdateNewValues

func (u *VulnerabilityUpsertOne) UpdateNewValues() *VulnerabilityUpsertOne

UpdateNewValues updates the fields using the new values that were set on create. Using this option is equivalent to using:

client.Vulnerability.Create().
    OnConflict(sql.ResolveWithNewValues()).
    Exec(ctx)

func (*VulnerabilityUpsertOne) UpdateReferences

func (u *VulnerabilityUpsertOne) UpdateReferences() *VulnerabilityUpsertOne

UpdateReferences sets the "references" field to the value that was provided on create.

func (*VulnerabilityUpsertOne) UpdateSeverity

func (u *VulnerabilityUpsertOne) UpdateSeverity() *VulnerabilityUpsertOne

UpdateSeverity sets the "severity" field to the value that was provided on create.

func (*VulnerabilityUpsertOne) UpdateTitle

UpdateTitle sets the "title" field to the value that was provided on create.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL