db

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditLog

type AuditLog struct {
	ID            pgtype.UUID        `db:"id" json:"id"`
	ActorUserID   pgtype.UUID        `db:"actor_user_id" json:"actor_user_id"`
	ActorUsername string             `db:"actor_username" json:"actor_username"`
	Action        string             `db:"action" json:"action"`
	ResourceType  string             `db:"resource_type" json:"resource_type"`
	ResourceID    string             `db:"resource_id" json:"resource_id"`
	Metadata      []byte             `db:"metadata" json:"metadata"`
	CreatedAt     pgtype.Timestamptz `db:"created_at" json:"created_at"`
}

type AuthDeviceAuthorization

type AuthDeviceAuthorization struct {
	ID               pgtype.UUID        `db:"id" json:"id"`
	DeviceCode       string             `db:"device_code" json:"device_code"`
	UserCode         string             `db:"user_code" json:"user_code"`
	ClientName       string             `db:"client_name" json:"client_name"`
	RequestedScopes  []string           `db:"requested_scopes" json:"requested_scopes"`
	ApprovedByUserID pgtype.UUID        `db:"approved_by_user_id" json:"approved_by_user_id"`
	ApprovedAt       pgtype.Timestamptz `db:"approved_at" json:"approved_at"`
	LastPolledAt     pgtype.Timestamptz `db:"last_polled_at" json:"last_polled_at"`
	ExpiresAt        pgtype.Timestamptz `db:"expires_at" json:"expires_at"`
	Status           string             `db:"status" json:"status"`
	CreatedAt        pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt        pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type AuthSession

type AuthSession struct {
	ID                   pgtype.UUID        `db:"id" json:"id"`
	UserID               pgtype.UUID        `db:"user_id" json:"user_id"`
	ClientName           string             `db:"client_name" json:"client_name"`
	UserAgent            string             `db:"user_agent" json:"user_agent"`
	RefreshTokenHash     string             `db:"refresh_token_hash" json:"refresh_token_hash"`
	RefreshTokenFamilyID pgtype.UUID        `db:"refresh_token_family_id" json:"refresh_token_family_id"`
	LastUsedAt           pgtype.Timestamptz `db:"last_used_at" json:"last_used_at"`
	ExpiresAt            pgtype.Timestamptz `db:"expires_at" json:"expires_at"`
	IdleExpiresAt        pgtype.Timestamptz `db:"idle_expires_at" json:"idle_expires_at"`
	RevokedAt            pgtype.Timestamptz `db:"revoked_at" json:"revoked_at"`
	RevokeReason         string             `db:"revoke_reason" json:"revoke_reason"`
	CreatedAt            pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt            pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type CountActiveAuthSessionsByUserIDParams

type CountActiveAuthSessionsByUserIDParams struct {
	UserID pgtype.UUID `db:"user_id" json:"user_id"`
}

type CountAuditLogsParams

type CountAuditLogsParams struct {
	Action        interface{} `db:"action" json:"action"`
	ResourceType  interface{} `db:"resource_type" json:"resource_type"`
	ResourceID    interface{} `db:"resource_id" json:"resource_id"`
	ActorUsername interface{} `db:"actor_username" json:"actor_username"`
}

type CreateAuditLogParams

type CreateAuditLogParams struct {
	ActorUserID   pgtype.UUID `db:"actor_user_id" json:"actor_user_id"`
	ActorUsername string      `db:"actor_username" json:"actor_username"`
	Action        string      `db:"action" json:"action"`
	ResourceType  string      `db:"resource_type" json:"resource_type"`
	ResourceID    string      `db:"resource_id" json:"resource_id"`
	Metadata      []byte      `db:"metadata" json:"metadata"`
}

type CreateAuthDeviceAuthorizationParams

type CreateAuthDeviceAuthorizationParams struct {
	DeviceCode      string             `db:"device_code" json:"device_code"`
	UserCode        string             `db:"user_code" json:"user_code"`
	ClientName      string             `db:"client_name" json:"client_name"`
	RequestedScopes []string           `db:"requested_scopes" json:"requested_scopes"`
	ExpiresAt       pgtype.Timestamptz `db:"expires_at" json:"expires_at"`
	Status          string             `db:"status" json:"status"`
}

type CreateAuthSessionParams

type CreateAuthSessionParams struct {
	UserID               pgtype.UUID        `db:"user_id" json:"user_id"`
	ClientName           string             `db:"client_name" json:"client_name"`
	UserAgent            string             `db:"user_agent" json:"user_agent"`
	RefreshTokenHash     string             `db:"refresh_token_hash" json:"refresh_token_hash"`
	RefreshTokenFamilyID pgtype.UUID        `db:"refresh_token_family_id" json:"refresh_token_family_id"`
	LastUsedAt           pgtype.Timestamptz `db:"last_used_at" json:"last_used_at"`
	ExpiresAt            pgtype.Timestamptz `db:"expires_at" json:"expires_at"`
	IdleExpiresAt        pgtype.Timestamptz `db:"idle_expires_at" json:"idle_expires_at"`
}

type CreateNetworkDeviceParams

type CreateNetworkDeviceParams struct {
	MacAddress      string      `db:"mac_address" json:"mac_address"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	Disabled        bool        `db:"disabled" json:"disabled"`
	VlanID          int32       `db:"vlan_id" json:"vlan_id"`
	CreatedByUserID pgtype.UUID `db:"created_by_user_id" json:"created_by_user_id"`
	UpdatedByUserID pgtype.UUID `db:"updated_by_user_id" json:"updated_by_user_id"`
}

type CreateVlanParams

type CreateVlanParams struct {
	VlanID      int32  `db:"vlan_id" json:"vlan_id"`
	Name        string `db:"name" json:"name"`
	Description string `db:"description" json:"description"`
}

type DBTX

type DBTX interface {
	Exec(context.Context, string, ...interface{}) (pgconn.CommandTag, error)
	Query(context.Context, string, ...interface{}) (pgx.Rows, error)
	QueryRow(context.Context, string, ...interface{}) pgx.Row
}

type DeleteNetworkDeviceParams

type DeleteNetworkDeviceParams struct {
	ID pgtype.UUID `db:"id" json:"id"`
}

type DeleteRadcheckCleartextPasswordByUsernameParams

type DeleteRadcheckCleartextPasswordByUsernameParams struct {
	Username string `db:"username" json:"username"`
}

type DeleteRadgrouprepliesByGroupnameParams

type DeleteRadgrouprepliesByGroupnameParams struct {
	Groupname string `db:"groupname" json:"groupname"`
}

type DeleteRadusergroupsByUsernameParams

type DeleteRadusergroupsByUsernameParams struct {
	Username string `db:"username" json:"username"`
}

type DeleteVlanParams

type DeleteVlanParams struct {
	VlanID int32 `db:"vlan_id" json:"vlan_id"`
}

type GetAuthDeviceAuthorizationByDeviceCodeParams

type GetAuthDeviceAuthorizationByDeviceCodeParams struct {
	DeviceCode string `db:"device_code" json:"device_code"`
}

type GetAuthDeviceAuthorizationByUserCodeParams

type GetAuthDeviceAuthorizationByUserCodeParams struct {
	UserCode string `db:"user_code" json:"user_code"`
}

type GetAuthSessionByIDParams

type GetAuthSessionByIDParams struct {
	ID pgtype.UUID `db:"id" json:"id"`
}

type GetAuthSessionByRefreshTokenHashParams

type GetAuthSessionByRefreshTokenHashParams struct {
	RefreshTokenHash string `db:"refresh_token_hash" json:"refresh_token_hash"`
}

type GetNetworkDeviceByIDParams

type GetNetworkDeviceByIDParams struct {
	ID pgtype.UUID `db:"id" json:"id"`
}

type GetNetworkDeviceByMACAddressParams

type GetNetworkDeviceByMACAddressParams struct {
	MacAddress string `db:"mac_address" json:"mac_address"`
}

type GetUserByIDParams

type GetUserByIDParams struct {
	ID pgtype.UUID `db:"id" json:"id"`
}

type GetUserByUsernameParams

type GetUserByUsernameParams struct {
	Username string `db:"username" json:"username"`
}

type GetVlanByNameParams

type GetVlanByNameParams struct {
	Name string `db:"name" json:"name"`
}

type GetVlanByVlanIDParams

type GetVlanByVlanIDParams struct {
	VlanID int32 `db:"vlan_id" json:"vlan_id"`
}

type InsertRadgroupreplyParams

type InsertRadgroupreplyParams struct {
	Groupname string `db:"groupname" json:"groupname"`
	Attribute string `db:"attribute" json:"attribute"`
	Op        string `db:"op" json:"op"`
	Value     string `db:"value" json:"value"`
}

type InsertRadusergroupParams

type InsertRadusergroupParams struct {
	Username  string `db:"username" json:"username"`
	Groupname string `db:"groupname" json:"groupname"`
	Priority  int32  `db:"priority" json:"priority"`
}

type ListActiveAuthSessionsByUserPageParams

type ListActiveAuthSessionsByUserPageParams struct {
	UserID      pgtype.UUID `db:"user_id" json:"user_id"`
	OffsetCount int32       `db:"offset_count" json:"offset_count"`
	LimitCount  int32       `db:"limit_count" json:"limit_count"`
}

type ListActiveAuthSessionsPageParams

type ListActiveAuthSessionsPageParams struct {
	OffsetCount int32 `db:"offset_count" json:"offset_count"`
	LimitCount  int32 `db:"limit_count" json:"limit_count"`
}

type ListAuditLogsParams

type ListAuditLogsParams struct {
	Action        interface{} `db:"action" json:"action"`
	ResourceType  interface{} `db:"resource_type" json:"resource_type"`
	ResourceID    interface{} `db:"resource_id" json:"resource_id"`
	ActorUsername interface{} `db:"actor_username" json:"actor_username"`
	OffsetCount   int32       `db:"offset_count" json:"offset_count"`
	LimitCount    int32       `db:"limit_count" json:"limit_count"`
}

type ListAuthSessionsByUserIDParams

type ListAuthSessionsByUserIDParams struct {
	UserID pgtype.UUID `db:"user_id" json:"user_id"`
}

type Nas

type Nas struct {
	ID              int64   `db:"id" json:"id"`
	Nasname         string  `db:"nasname" json:"nasname"`
	Shortname       string  `db:"shortname" json:"shortname"`
	Type            string  `db:"type" json:"type"`
	Ports           *int32  `db:"ports" json:"ports"`
	Secret          string  `db:"secret" json:"secret"`
	Server          *string `db:"server" json:"server"`
	Community       *string `db:"community" json:"community"`
	Description     *string `db:"description" json:"description"`
	RequireMa       string  `db:"require_ma" json:"require_ma"`
	LimitProxyState string  `db:"limit_proxy_state" json:"limit_proxy_state"`
}

type Nasreload

type Nasreload struct {
	Nasipaddress netip.Addr         `db:"nasipaddress" json:"nasipaddress"`
	Reloadtime   pgtype.Timestamptz `db:"reloadtime" json:"reloadtime"`
}

type NetworkDevice

type NetworkDevice struct {
	ID              pgtype.UUID        `db:"id" json:"id"`
	MacAddress      string             `db:"mac_address" json:"mac_address"`
	DisplayName     string             `db:"display_name" json:"display_name"`
	VlanID          int32              `db:"vlan_id" json:"vlan_id"`
	CreatedByUserID pgtype.UUID        `db:"created_by_user_id" json:"created_by_user_id"`
	UpdatedByUserID pgtype.UUID        `db:"updated_by_user_id" json:"updated_by_user_id"`
	CreatedAt       pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt       pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
	Disabled        bool               `db:"disabled" json:"disabled"`
}

type Querier

type Querier interface {
	CountActiveAuthSessions(ctx context.Context) (int64, error)
	CountActiveAuthSessionsByUserID(ctx context.Context, arg CountActiveAuthSessionsByUserIDParams) (int64, error)
	CountAuditLogs(ctx context.Context, arg CountAuditLogsParams) (int64, error)
	CountNetworkDevices(ctx context.Context) (int64, error)
	CountVlans(ctx context.Context) (int64, error)
	CreateAuditLog(ctx context.Context, arg CreateAuditLogParams) (AuditLog, error)
	CreateAuthDeviceAuthorization(ctx context.Context, arg CreateAuthDeviceAuthorizationParams) (AuthDeviceAuthorization, error)
	CreateAuthSession(ctx context.Context, arg CreateAuthSessionParams) (AuthSession, error)
	CreateNetworkDevice(ctx context.Context, arg CreateNetworkDeviceParams) (NetworkDevice, error)
	CreateVlan(ctx context.Context, arg CreateVlanParams) (Vlan, error)
	DeleteNetworkDevice(ctx context.Context, arg DeleteNetworkDeviceParams) error
	DeleteRadcheckCleartextPasswordByUsername(ctx context.Context, arg DeleteRadcheckCleartextPasswordByUsernameParams) error
	DeleteRadgrouprepliesByGroupname(ctx context.Context, arg DeleteRadgrouprepliesByGroupnameParams) error
	DeleteRadusergroupsByUsername(ctx context.Context, arg DeleteRadusergroupsByUsernameParams) error
	DeleteVlan(ctx context.Context, arg DeleteVlanParams) error
	GetAuthDeviceAuthorizationByDeviceCode(ctx context.Context, arg GetAuthDeviceAuthorizationByDeviceCodeParams) (AuthDeviceAuthorization, error)
	GetAuthDeviceAuthorizationByUserCode(ctx context.Context, arg GetAuthDeviceAuthorizationByUserCodeParams) (AuthDeviceAuthorization, error)
	GetAuthSessionByID(ctx context.Context, arg GetAuthSessionByIDParams) (AuthSession, error)
	GetAuthSessionByRefreshTokenHash(ctx context.Context, arg GetAuthSessionByRefreshTokenHashParams) (AuthSession, error)
	GetNetworkDeviceByID(ctx context.Context, arg GetNetworkDeviceByIDParams) (NetworkDevice, error)
	GetNetworkDeviceByMACAddress(ctx context.Context, arg GetNetworkDeviceByMACAddressParams) (NetworkDevice, error)
	GetUserByID(ctx context.Context, arg GetUserByIDParams) (User, error)
	GetUserByUsername(ctx context.Context, arg GetUserByUsernameParams) (User, error)
	GetVlanByName(ctx context.Context, arg GetVlanByNameParams) (Vlan, error)
	GetVlanByVlanID(ctx context.Context, arg GetVlanByVlanIDParams) (Vlan, error)
	InsertRadgroupreply(ctx context.Context, arg InsertRadgroupreplyParams) error
	InsertRadusergroup(ctx context.Context, arg InsertRadusergroupParams) error
	ListActiveAuthSessionsByUserPage(ctx context.Context, arg ListActiveAuthSessionsByUserPageParams) ([]AuthSession, error)
	ListActiveAuthSessionsPage(ctx context.Context, arg ListActiveAuthSessionsPageParams) ([]AuthSession, error)
	ListAuditLogs(ctx context.Context, arg ListAuditLogsParams) ([]AuditLog, error)
	ListAuthSessions(ctx context.Context) ([]AuthSession, error)
	ListAuthSessionsByUserID(ctx context.Context, arg ListAuthSessionsByUserIDParams) ([]AuthSession, error)
	ListNetworkDevices(ctx context.Context) ([]NetworkDevice, error)
	ListVlans(ctx context.Context) ([]Vlan, error)
	RevokeAllActiveAuthSessions(ctx context.Context, arg RevokeAllActiveAuthSessionsParams) (int64, error)
	RevokeAuthSession(ctx context.Context, arg RevokeAuthSessionParams) (AuthSession, error)
	RevokeAuthSessionFamily(ctx context.Context, arg RevokeAuthSessionFamilyParams) (int64, error)
	RevokeOtherAuthSessionsForUser(ctx context.Context, arg RevokeOtherAuthSessionsForUserParams) (int64, error)
	TouchAuthSession(ctx context.Context, arg TouchAuthSessionParams) (AuthSession, error)
	UpdateAuthDeviceAuthorizationStatus(ctx context.Context, arg UpdateAuthDeviceAuthorizationStatusParams) (AuthDeviceAuthorization, error)
	UpdateNetworkDevice(ctx context.Context, arg UpdateNetworkDeviceParams) (NetworkDevice, error)
	UpdateRadusergroupsGroupname(ctx context.Context, arg UpdateRadusergroupsGroupnameParams) error
	UpdateVlan(ctx context.Context, arg UpdateVlanParams) (Vlan, error)
	UpsertRadcheckCleartextPassword(ctx context.Context, arg UpsertRadcheckCleartextPasswordParams) error
	UpsertUserByUsername(ctx context.Context, arg UpsertUserByUsernameParams) (User, error)
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) CountActiveAuthSessions

func (q *Queries) CountActiveAuthSessions(ctx context.Context) (int64, error)

func (*Queries) CountActiveAuthSessionsByUserID

func (q *Queries) CountActiveAuthSessionsByUserID(ctx context.Context, arg CountActiveAuthSessionsByUserIDParams) (int64, error)

func (*Queries) CountAuditLogs

func (q *Queries) CountAuditLogs(ctx context.Context, arg CountAuditLogsParams) (int64, error)

func (*Queries) CountNetworkDevices

func (q *Queries) CountNetworkDevices(ctx context.Context) (int64, error)

func (*Queries) CountVlans

func (q *Queries) CountVlans(ctx context.Context) (int64, error)

func (*Queries) CreateAuditLog

func (q *Queries) CreateAuditLog(ctx context.Context, arg CreateAuditLogParams) (AuditLog, error)

func (*Queries) CreateAuthDeviceAuthorization

func (q *Queries) CreateAuthDeviceAuthorization(ctx context.Context, arg CreateAuthDeviceAuthorizationParams) (AuthDeviceAuthorization, error)

func (*Queries) CreateAuthSession

func (q *Queries) CreateAuthSession(ctx context.Context, arg CreateAuthSessionParams) (AuthSession, error)

func (*Queries) CreateNetworkDevice

func (q *Queries) CreateNetworkDevice(ctx context.Context, arg CreateNetworkDeviceParams) (NetworkDevice, error)

func (*Queries) CreateVlan

func (q *Queries) CreateVlan(ctx context.Context, arg CreateVlanParams) (Vlan, error)

func (*Queries) DeleteNetworkDevice

func (q *Queries) DeleteNetworkDevice(ctx context.Context, arg DeleteNetworkDeviceParams) error

func (*Queries) DeleteRadcheckCleartextPasswordByUsername

func (q *Queries) DeleteRadcheckCleartextPasswordByUsername(ctx context.Context, arg DeleteRadcheckCleartextPasswordByUsernameParams) error

func (*Queries) DeleteRadgrouprepliesByGroupname

func (q *Queries) DeleteRadgrouprepliesByGroupname(ctx context.Context, arg DeleteRadgrouprepliesByGroupnameParams) error

func (*Queries) DeleteRadusergroupsByUsername

func (q *Queries) DeleteRadusergroupsByUsername(ctx context.Context, arg DeleteRadusergroupsByUsernameParams) error

func (*Queries) DeleteVlan

func (q *Queries) DeleteVlan(ctx context.Context, arg DeleteVlanParams) error

func (*Queries) GetAuthSessionByID

func (q *Queries) GetAuthSessionByID(ctx context.Context, arg GetAuthSessionByIDParams) (AuthSession, error)

func (*Queries) GetAuthSessionByRefreshTokenHash

func (q *Queries) GetAuthSessionByRefreshTokenHash(ctx context.Context, arg GetAuthSessionByRefreshTokenHashParams) (AuthSession, error)

func (*Queries) GetNetworkDeviceByID

func (q *Queries) GetNetworkDeviceByID(ctx context.Context, arg GetNetworkDeviceByIDParams) (NetworkDevice, error)

func (*Queries) GetNetworkDeviceByMACAddress

func (q *Queries) GetNetworkDeviceByMACAddress(ctx context.Context, arg GetNetworkDeviceByMACAddressParams) (NetworkDevice, error)

func (*Queries) GetUserByID

func (q *Queries) GetUserByID(ctx context.Context, arg GetUserByIDParams) (User, error)

func (*Queries) GetUserByUsername

func (q *Queries) GetUserByUsername(ctx context.Context, arg GetUserByUsernameParams) (User, error)

func (*Queries) GetVlanByName

func (q *Queries) GetVlanByName(ctx context.Context, arg GetVlanByNameParams) (Vlan, error)

func (*Queries) GetVlanByVlanID

func (q *Queries) GetVlanByVlanID(ctx context.Context, arg GetVlanByVlanIDParams) (Vlan, error)

func (*Queries) InsertRadgroupreply

func (q *Queries) InsertRadgroupreply(ctx context.Context, arg InsertRadgroupreplyParams) error

func (*Queries) InsertRadusergroup

func (q *Queries) InsertRadusergroup(ctx context.Context, arg InsertRadusergroupParams) error

func (*Queries) ListActiveAuthSessionsByUserPage

func (q *Queries) ListActiveAuthSessionsByUserPage(ctx context.Context, arg ListActiveAuthSessionsByUserPageParams) ([]AuthSession, error)

func (*Queries) ListActiveAuthSessionsPage

func (q *Queries) ListActiveAuthSessionsPage(ctx context.Context, arg ListActiveAuthSessionsPageParams) ([]AuthSession, error)

func (*Queries) ListAuditLogs

func (q *Queries) ListAuditLogs(ctx context.Context, arg ListAuditLogsParams) ([]AuditLog, error)

func (*Queries) ListAuthSessions

func (q *Queries) ListAuthSessions(ctx context.Context) ([]AuthSession, error)

func (*Queries) ListAuthSessionsByUserID

func (q *Queries) ListAuthSessionsByUserID(ctx context.Context, arg ListAuthSessionsByUserIDParams) ([]AuthSession, error)

func (*Queries) ListNetworkDevices

func (q *Queries) ListNetworkDevices(ctx context.Context) ([]NetworkDevice, error)

func (*Queries) ListVlans

func (q *Queries) ListVlans(ctx context.Context) ([]Vlan, error)

func (*Queries) RevokeAllActiveAuthSessions

func (q *Queries) RevokeAllActiveAuthSessions(ctx context.Context, arg RevokeAllActiveAuthSessionsParams) (int64, error)

func (*Queries) RevokeAuthSession

func (q *Queries) RevokeAuthSession(ctx context.Context, arg RevokeAuthSessionParams) (AuthSession, error)

func (*Queries) RevokeAuthSessionFamily

func (q *Queries) RevokeAuthSessionFamily(ctx context.Context, arg RevokeAuthSessionFamilyParams) (int64, error)

func (*Queries) RevokeOtherAuthSessionsForUser

func (q *Queries) RevokeOtherAuthSessionsForUser(ctx context.Context, arg RevokeOtherAuthSessionsForUserParams) (int64, error)

func (*Queries) TouchAuthSession

func (q *Queries) TouchAuthSession(ctx context.Context, arg TouchAuthSessionParams) (AuthSession, error)

func (*Queries) UpdateNetworkDevice

func (q *Queries) UpdateNetworkDevice(ctx context.Context, arg UpdateNetworkDeviceParams) (NetworkDevice, error)

func (*Queries) UpdateRadusergroupsGroupname

func (q *Queries) UpdateRadusergroupsGroupname(ctx context.Context, arg UpdateRadusergroupsGroupnameParams) error

func (*Queries) UpdateVlan

func (q *Queries) UpdateVlan(ctx context.Context, arg UpdateVlanParams) (Vlan, error)

func (*Queries) UpsertRadcheckCleartextPassword

func (q *Queries) UpsertRadcheckCleartextPassword(ctx context.Context, arg UpsertRadcheckCleartextPasswordParams) error

func (*Queries) UpsertUserByUsername

func (q *Queries) UpsertUserByUsername(ctx context.Context, arg UpsertUserByUsernameParams) (User, error)

func (*Queries) WithTx

func (q *Queries) WithTx(tx pgx.Tx) *Queries

type Radacct

type Radacct struct {
	Radacctid           int64              `db:"radacctid" json:"radacctid"`
	Acctsessionid       string             `db:"acctsessionid" json:"acctsessionid"`
	Acctuniqueid        string             `db:"acctuniqueid" json:"acctuniqueid"`
	Username            *string            `db:"username" json:"username"`
	Groupname           *string            `db:"groupname" json:"groupname"`
	Realm               *string            `db:"realm" json:"realm"`
	Nasipaddress        netip.Addr         `db:"nasipaddress" json:"nasipaddress"`
	Nasportid           *string            `db:"nasportid" json:"nasportid"`
	Nasporttype         *string            `db:"nasporttype" json:"nasporttype"`
	Acctstarttime       pgtype.Timestamptz `db:"acctstarttime" json:"acctstarttime"`
	Acctupdatetime      pgtype.Timestamptz `db:"acctupdatetime" json:"acctupdatetime"`
	Acctstoptime        pgtype.Timestamptz `db:"acctstoptime" json:"acctstoptime"`
	Acctinterval        *int64             `db:"acctinterval" json:"acctinterval"`
	Acctsessiontime     *int64             `db:"acctsessiontime" json:"acctsessiontime"`
	Acctauthentic       *string            `db:"acctauthentic" json:"acctauthentic"`
	ConnectinfoStart    *string            `db:"connectinfo_start" json:"connectinfo_start"`
	ConnectinfoStop     *string            `db:"connectinfo_stop" json:"connectinfo_stop"`
	Acctinputoctets     *int64             `db:"acctinputoctets" json:"acctinputoctets"`
	Acctoutputoctets    *int64             `db:"acctoutputoctets" json:"acctoutputoctets"`
	Calledstationid     *string            `db:"calledstationid" json:"calledstationid"`
	Callingstationid    *string            `db:"callingstationid" json:"callingstationid"`
	Acctterminatecause  *string            `db:"acctterminatecause" json:"acctterminatecause"`
	Servicetype         *string            `db:"servicetype" json:"servicetype"`
	Framedprotocol      *string            `db:"framedprotocol" json:"framedprotocol"`
	Framedipaddress     *netip.Addr        `db:"framedipaddress" json:"framedipaddress"`
	Framedipv6address   *netip.Addr        `db:"framedipv6address" json:"framedipv6address"`
	Framedipv6prefix    *netip.Addr        `db:"framedipv6prefix" json:"framedipv6prefix"`
	Framedinterfaceid   *string            `db:"framedinterfaceid" json:"framedinterfaceid"`
	Delegatedipv6prefix *netip.Addr        `db:"delegatedipv6prefix" json:"delegatedipv6prefix"`
	Class               *string            `db:"class" json:"class"`
}

type Radcheck

type Radcheck struct {
	ID        int64  `db:"id" json:"id"`
	Username  string `db:"username" json:"username"`
	Attribute string `db:"attribute" json:"attribute"`
	Op        string `db:"op" json:"op"`
	Value     string `db:"value" json:"value"`
}

type Radgroupcheck

type Radgroupcheck struct {
	ID        int64  `db:"id" json:"id"`
	Groupname string `db:"groupname" json:"groupname"`
	Attribute string `db:"attribute" json:"attribute"`
	Op        string `db:"op" json:"op"`
	Value     string `db:"value" json:"value"`
}

type Radgroupreply

type Radgroupreply struct {
	ID        int64  `db:"id" json:"id"`
	Groupname string `db:"groupname" json:"groupname"`
	Attribute string `db:"attribute" json:"attribute"`
	Op        string `db:"op" json:"op"`
	Value     string `db:"value" json:"value"`
}

type Radpostauth

type Radpostauth struct {
	ID               int64              `db:"id" json:"id"`
	Username         string             `db:"username" json:"username"`
	Pass             *string            `db:"pass" json:"pass"`
	Reply            *string            `db:"reply" json:"reply"`
	Calledstationid  *string            `db:"calledstationid" json:"calledstationid"`
	Callingstationid *string            `db:"callingstationid" json:"callingstationid"`
	Authdate         pgtype.Timestamptz `db:"authdate" json:"authdate"`
	Class            *string            `db:"class" json:"class"`
}

type Radreply

type Radreply struct {
	ID        int64  `db:"id" json:"id"`
	Username  string `db:"username" json:"username"`
	Attribute string `db:"attribute" json:"attribute"`
	Op        string `db:"op" json:"op"`
	Value     string `db:"value" json:"value"`
}

type Radusergroup

type Radusergroup struct {
	ID        int64  `db:"id" json:"id"`
	Username  string `db:"username" json:"username"`
	Groupname string `db:"groupname" json:"groupname"`
	Priority  int32  `db:"priority" json:"priority"`
}

type RevokeAllActiveAuthSessionsParams

type RevokeAllActiveAuthSessionsParams struct {
	RevokeReason string `db:"revoke_reason" json:"revoke_reason"`
}

type RevokeAuthSessionFamilyParams

type RevokeAuthSessionFamilyParams struct {
	RevokeReason         string      `db:"revoke_reason" json:"revoke_reason"`
	RefreshTokenFamilyID pgtype.UUID `db:"refresh_token_family_id" json:"refresh_token_family_id"`
}

type RevokeAuthSessionParams

type RevokeAuthSessionParams struct {
	RevokeReason string      `db:"revoke_reason" json:"revoke_reason"`
	ID           pgtype.UUID `db:"id" json:"id"`
}

type RevokeOtherAuthSessionsForUserParams

type RevokeOtherAuthSessionsForUserParams struct {
	RevokeReason string      `db:"revoke_reason" json:"revoke_reason"`
	UserID       pgtype.UUID `db:"user_id" json:"user_id"`
	ID           pgtype.UUID `db:"id" json:"id"`
}

type TouchAuthSessionParams

type TouchAuthSessionParams struct {
	LastUsedAt    pgtype.Timestamptz `db:"last_used_at" json:"last_used_at"`
	IdleExpiresAt pgtype.Timestamptz `db:"idle_expires_at" json:"idle_expires_at"`
	ID            pgtype.UUID        `db:"id" json:"id"`
}

type UpdateAuthDeviceAuthorizationStatusParams

type UpdateAuthDeviceAuthorizationStatusParams struct {
	Status           string             `db:"status" json:"status"`
	ApprovedByUserID pgtype.UUID        `db:"approved_by_user_id" json:"approved_by_user_id"`
	ApprovedAt       pgtype.Timestamptz `db:"approved_at" json:"approved_at"`
	LastPolledAt     pgtype.Timestamptz `db:"last_polled_at" json:"last_polled_at"`
	ID               pgtype.UUID        `db:"id" json:"id"`
}

type UpdateNetworkDeviceParams

type UpdateNetworkDeviceParams struct {
	MacAddress      string      `db:"mac_address" json:"mac_address"`
	DisplayName     string      `db:"display_name" json:"display_name"`
	Disabled        bool        `db:"disabled" json:"disabled"`
	VlanID          int32       `db:"vlan_id" json:"vlan_id"`
	UpdatedByUserID pgtype.UUID `db:"updated_by_user_id" json:"updated_by_user_id"`
	ID              pgtype.UUID `db:"id" json:"id"`
}

type UpdateRadusergroupsGroupnameParams

type UpdateRadusergroupsGroupnameParams struct {
	NewGroupname string `db:"new_groupname" json:"new_groupname"`
	OldGroupname string `db:"old_groupname" json:"old_groupname"`
}

type UpdateVlanParams

type UpdateVlanParams struct {
	VlanID        int32  `db:"vlan_id" json:"vlan_id"`
	Name          string `db:"name" json:"name"`
	Description   string `db:"description" json:"description"`
	CurrentVlanID int32  `db:"current_vlan_id" json:"current_vlan_id"`
}

type UpsertRadcheckCleartextPasswordParams

type UpsertRadcheckCleartextPasswordParams struct {
	Username string `db:"username" json:"username"`
	Value    string `db:"value" json:"value"`
}

type UpsertUserByUsernameParams

type UpsertUserByUsernameParams struct {
	Username string   `db:"username" json:"username"`
	Name     string   `db:"name" json:"name"`
	Email    string   `db:"email" json:"email"`
	Groups   []string `db:"groups" json:"groups"`
}

type User

type User struct {
	ID        pgtype.UUID        `db:"id" json:"id"`
	Username  string             `db:"username" json:"username"`
	Name      string             `db:"name" json:"name"`
	Email     string             `db:"email" json:"email"`
	Groups    []string           `db:"groups" json:"groups"`
	CreatedAt pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

type Vlan

type Vlan struct {
	VlanID      int32              `db:"vlan_id" json:"vlan_id"`
	Name        string             `db:"name" json:"name"`
	Description string             `db:"description" json:"description"`
	CreatedAt   pgtype.Timestamptz `db:"created_at" json:"created_at"`
	UpdatedAt   pgtype.Timestamptz `db:"updated_at" json:"updated_at"`
}

Jump to

Keyboard shortcuts

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