agent

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the agent type in the database.
	Label = "agent"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldTenantID holds the string denoting the tenant_id field in the database.
	FieldTenantID = "tenant_id"
	// FieldType holds the string denoting the type field in the database.
	FieldType = "type"
	// FieldConfig holds the string denoting the config field in the database.
	FieldConfig = "config"
	// FieldChannelID holds the string denoting the channel_id field in the database.
	FieldChannelID = "channel_id"
	// FieldStatus holds the string denoting the status field in the database.
	FieldStatus = "status"
	// Table holds the table name of the agent in the database.
	Table = "agents"
)
View Source
const DefaultStatus = StatusOffline

StatusOffline is the default value of the Status enum.

Variables

Columns holds all SQL columns for agent fields.

View Source
var (
	// DefaultTenantID holds the default value on creation for the "tenant_id" field.
	DefaultTenantID string
)

Functions

func And

func And(predicates ...predicate.Agent) predicate.Agent

And groups predicates with the AND operator between them.

func ChannelID

func ChannelID(v string) predicate.Agent

ChannelID applies equality check predicate on the "channel_id" field. It's identical to ChannelIDEQ.

func ChannelIDContains

func ChannelIDContains(v string) predicate.Agent

ChannelIDContains applies the Contains predicate on the "channel_id" field.

func ChannelIDContainsFold

func ChannelIDContainsFold(v string) predicate.Agent

ChannelIDContainsFold applies the ContainsFold predicate on the "channel_id" field.

func ChannelIDEQ

func ChannelIDEQ(v string) predicate.Agent

ChannelIDEQ applies the EQ predicate on the "channel_id" field.

func ChannelIDEqualFold

func ChannelIDEqualFold(v string) predicate.Agent

ChannelIDEqualFold applies the EqualFold predicate on the "channel_id" field.

func ChannelIDGT

func ChannelIDGT(v string) predicate.Agent

ChannelIDGT applies the GT predicate on the "channel_id" field.

func ChannelIDGTE

func ChannelIDGTE(v string) predicate.Agent

ChannelIDGTE applies the GTE predicate on the "channel_id" field.

func ChannelIDHasPrefix

func ChannelIDHasPrefix(v string) predicate.Agent

ChannelIDHasPrefix applies the HasPrefix predicate on the "channel_id" field.

func ChannelIDHasSuffix

func ChannelIDHasSuffix(v string) predicate.Agent

ChannelIDHasSuffix applies the HasSuffix predicate on the "channel_id" field.

func ChannelIDIn

func ChannelIDIn(vs ...string) predicate.Agent

ChannelIDIn applies the In predicate on the "channel_id" field.

func ChannelIDLT

func ChannelIDLT(v string) predicate.Agent

ChannelIDLT applies the LT predicate on the "channel_id" field.

func ChannelIDLTE

func ChannelIDLTE(v string) predicate.Agent

ChannelIDLTE applies the LTE predicate on the "channel_id" field.

func ChannelIDNEQ

func ChannelIDNEQ(v string) predicate.Agent

ChannelIDNEQ applies the NEQ predicate on the "channel_id" field.

func ChannelIDNotIn

func ChannelIDNotIn(vs ...string) predicate.Agent

ChannelIDNotIn applies the NotIn predicate on the "channel_id" field.

func ID

func ID(id string) predicate.Agent

ID filters vertices based on their ID field.

func IDContainsFold

func IDContainsFold(id string) predicate.Agent

IDContainsFold applies the ContainsFold predicate on the ID field.

func IDEQ

func IDEQ(id string) predicate.Agent

IDEQ applies the EQ predicate on the ID field.

func IDEqualFold

func IDEqualFold(id string) predicate.Agent

IDEqualFold applies the EqualFold predicate on the ID field.

func IDGT

func IDGT(id string) predicate.Agent

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id string) predicate.Agent

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...string) predicate.Agent

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id string) predicate.Agent

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id string) predicate.Agent

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id string) predicate.Agent

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...string) predicate.Agent

IDNotIn applies the NotIn predicate on the ID field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Agent) predicate.Agent

Or groups predicates with the OR operator between them.

func StatusEQ

func StatusEQ(v Status) predicate.Agent

StatusEQ applies the EQ predicate on the "status" field.

func StatusIn

func StatusIn(vs ...Status) predicate.Agent

StatusIn applies the In predicate on the "status" field.

func StatusNEQ

func StatusNEQ(v Status) predicate.Agent

StatusNEQ applies the NEQ predicate on the "status" field.

func StatusNotIn

func StatusNotIn(vs ...Status) predicate.Agent

StatusNotIn applies the NotIn predicate on the "status" field.

func StatusValidator

func StatusValidator(s Status) error

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

func TenantID

func TenantID(v string) predicate.Agent

TenantID applies equality check predicate on the "tenant_id" field. It's identical to TenantIDEQ.

func TenantIDContains

func TenantIDContains(v string) predicate.Agent

TenantIDContains applies the Contains predicate on the "tenant_id" field.

func TenantIDContainsFold

func TenantIDContainsFold(v string) predicate.Agent

TenantIDContainsFold applies the ContainsFold predicate on the "tenant_id" field.

func TenantIDEQ

func TenantIDEQ(v string) predicate.Agent

TenantIDEQ applies the EQ predicate on the "tenant_id" field.

func TenantIDEqualFold

func TenantIDEqualFold(v string) predicate.Agent

TenantIDEqualFold applies the EqualFold predicate on the "tenant_id" field.

func TenantIDGT

func TenantIDGT(v string) predicate.Agent

TenantIDGT applies the GT predicate on the "tenant_id" field.

func TenantIDGTE

func TenantIDGTE(v string) predicate.Agent

TenantIDGTE applies the GTE predicate on the "tenant_id" field.

func TenantIDHasPrefix

func TenantIDHasPrefix(v string) predicate.Agent

TenantIDHasPrefix applies the HasPrefix predicate on the "tenant_id" field.

func TenantIDHasSuffix

func TenantIDHasSuffix(v string) predicate.Agent

TenantIDHasSuffix applies the HasSuffix predicate on the "tenant_id" field.

func TenantIDIn

func TenantIDIn(vs ...string) predicate.Agent

TenantIDIn applies the In predicate on the "tenant_id" field.

func TenantIDLT

func TenantIDLT(v string) predicate.Agent

TenantIDLT applies the LT predicate on the "tenant_id" field.

func TenantIDLTE

func TenantIDLTE(v string) predicate.Agent

TenantIDLTE applies the LTE predicate on the "tenant_id" field.

func TenantIDNEQ

func TenantIDNEQ(v string) predicate.Agent

TenantIDNEQ applies the NEQ predicate on the "tenant_id" field.

func TenantIDNotIn

func TenantIDNotIn(vs ...string) predicate.Agent

TenantIDNotIn applies the NotIn predicate on the "tenant_id" field.

func TypeEQ

func TypeEQ(v Type) predicate.Agent

TypeEQ applies the EQ predicate on the "type" field.

func TypeIn

func TypeIn(vs ...Type) predicate.Agent

TypeIn applies the In predicate on the "type" field.

func TypeNEQ

func TypeNEQ(v Type) predicate.Agent

TypeNEQ applies the NEQ predicate on the "type" field.

func TypeNotIn

func TypeNotIn(vs ...Type) predicate.Agent

TypeNotIn applies the NotIn predicate on the "type" field.

func TypeValidator

func TypeValidator(_type Type) error

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

func ValidColumn

func ValidColumn(column string) bool

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

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Agent queries.

func ByChannelID

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

ByChannelID orders the results by the channel_id field.

func ByID

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

ByID orders the results by the id field.

func ByStatus

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

ByStatus orders the results by the status field.

func ByTenantID

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

ByTenantID orders the results by the tenant_id field.

func ByType

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

ByType orders the results by the type field.

type Status

type Status string

Status defines the type for the "status" enum field.

const (
	StatusOnline  Status = "online"
	StatusOffline Status = "offline"
)

Status values.

func (Status) String

func (s Status) String() string

type Type

type Type string

Type defines the type for the "type" enum field.

const (
	TypeTmux    Type = "tmux"
	TypeProcess Type = "process"
)

Type values.

func (Type) String

func (_type Type) String() string

Jump to

Keyboard shortcuts

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