sqlc

package
v0.15.1-alpha.rc1 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 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 Account

type Account struct {
	ID                 int64
	Alias              int64
	Label              sql.NullString
	Type               int16
	InitialBalanceMsat int64
	CurrentBalanceMsat int64
	LastUpdated        time.Time
	Expiration         time.Time
}

type AccountIndex

type AccountIndex struct {
	Name  string
	Value int64
}

type AccountInvoice

type AccountInvoice struct {
	AccountID int64
	Hash      []byte
}

type AccountPayment

type AccountPayment struct {
	AccountID      int64
	Hash           []byte
	Status         int16
	FullAmountMsat int64
}

type Action

type Action struct {
	ID                 int64
	SessionID          sql.NullInt64
	AccountID          sql.NullInt64
	MacaroonIdentifier []byte
	ActorName          sql.NullString
	FeatureName        sql.NullString
	ActionTrigger      sql.NullString
	Intent             sql.NullString
	StructuredJsonData []byte
	RpcMethod          string
	RpcParamsJson      []byte
	CreatedAt          time.Time
	ActionState        int16
	ErrorReason        sql.NullString
}

type ActionQueryParams

type ActionQueryParams struct {
	SessionID   sql.NullInt64
	AccountID   sql.NullInt64
	FeatureName sql.NullString
	ActorName   sql.NullString
	RpcMethod   sql.NullString
	State       sql.NullInt16
	EndTime     sql.NullTime
	StartTime   sql.NullTime
	GroupID     sql.NullInt64
}

ActionQueryParams defines the parameters for querying actions.

type AddAccountInvoiceParams

type AddAccountInvoiceParams struct {
	AccountID int64
	Hash      []byte
}

type BackendType

type BackendType uint8

BackendType is an enum that represents the type of database backend we're using.

const (
	// BackendTypeUnknown indicates we're using an unknown backend.
	BackendTypeUnknown BackendType = iota

	// BackendTypeSqlite indicates we're using a SQLite backend.
	BackendTypeSqlite

	// BackendTypePostgres indicates we're using a Postgres backend.
	BackendTypePostgres
)

type CustomQueries

type CustomQueries interface {
	// CountActions returns the number of actions that match the provided
	// ActionQueryParams.
	CountActions(ctx context.Context, arg ActionQueryParams) (int64, error)

	// ListActions retrieves a list of actions based on the provided
	// ListActionsParams.
	ListActions(ctx context.Context,
		arg ListActionsParams) ([]Action, error)

	// Backend returns the type of the database backend used.
	Backend() BackendType
}

CustomQueries defines a set of custom queries that we define in addition to the ones generated by sqlc.

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type DeleteAccountPaymentParams

type DeleteAccountPaymentParams struct {
	Hash      []byte
	AccountID int64
}

type DeleteFeatureKVStoreRecordParams

type DeleteFeatureKVStoreRecordParams struct {
	Key       string
	RuleID    int64
	Perm      bool
	SessionID sql.NullInt64
	FeatureID sql.NullInt64
}

type DeleteGlobalKVStoreRecordParams

type DeleteGlobalKVStoreRecordParams struct {
	Key    string
	RuleID int64
	Perm   bool
}

type DeleteSessionKVStoreRecordParams

type DeleteSessionKVStoreRecordParams struct {
	Key       string
	RuleID    int64
	Perm      bool
	SessionID sql.NullInt64
}

type Feature

type Feature struct {
	ID   int64
	Name string
}

type GetAccountInvoiceParams

type GetAccountInvoiceParams struct {
	AccountID int64
	Hash      []byte
}

type GetAccountPaymentParams

type GetAccountPaymentParams struct {
	Hash      []byte
	AccountID int64
}

type GetAllPrivacyPairsRow

type GetAllPrivacyPairsRow struct {
	RealVal   string
	PseudoVal string
}

type GetFeatureKVStoreRecordParams

type GetFeatureKVStoreRecordParams struct {
	Key       string
	RuleID    int64
	Perm      bool
	SessionID sql.NullInt64
	FeatureID sql.NullInt64
}

type GetGlobalKVStoreRecordParams

type GetGlobalKVStoreRecordParams struct {
	Key    string
	RuleID int64
	Perm   bool
}

type GetPseudoForRealParams

type GetPseudoForRealParams struct {
	GroupID int64
	RealVal string
}

type GetRealForPseudoParams

type GetRealForPseudoParams struct {
	GroupID   int64
	PseudoVal string
}

type GetSessionKVStoreRecordParams

type GetSessionKVStoreRecordParams struct {
	Key       string
	RuleID    int64
	Perm      bool
	SessionID sql.NullInt64
}

type InsertAccountParams

type InsertAccountParams struct {
	Type               int16
	InitialBalanceMsat int64
	CurrentBalanceMsat int64
	LastUpdated        time.Time
	Label              sql.NullString
	Alias              int64
	Expiration         time.Time
}

type InsertActionParams

type InsertActionParams struct {
	SessionID          sql.NullInt64
	AccountID          sql.NullInt64
	MacaroonIdentifier []byte
	ActorName          sql.NullString
	FeatureName        sql.NullString
	ActionTrigger      sql.NullString
	Intent             sql.NullString
	StructuredJsonData []byte
	RpcMethod          string
	RpcParamsJson      []byte
	CreatedAt          time.Time
	ActionState        int16
	ErrorReason        sql.NullString
}

type InsertKVStoreRecordParams

type InsertKVStoreRecordParams struct {
	Perm      bool
	RuleID    int64
	SessionID sql.NullInt64
	FeatureID sql.NullInt64
	EntryKey  string
	Value     []byte
}

type InsertPrivacyPairParams

type InsertPrivacyPairParams struct {
	GroupID   int64
	RealVal   string
	PseudoVal string
}

type InsertSessionFeatureConfigParams

type InsertSessionFeatureConfigParams struct {
	SessionID   int64
	FeatureName string
	Config      []byte
}

type InsertSessionMacaroonCaveatParams

type InsertSessionMacaroonCaveatParams struct {
	SessionID      int64
	CaveatID       []byte
	VerificationID []byte
	Location       sql.NullString
}

type InsertSessionMacaroonPermissionParams

type InsertSessionMacaroonPermissionParams struct {
	SessionID int64
	Entity    string
	Action    string
}

type InsertSessionParams

type InsertSessionParams struct {
	Alias           []byte
	Label           string
	State           int16
	Type            int16
	Expiry          time.Time
	CreatedAt       time.Time
	ServerAddress   string
	DevServer       bool
	MacaroonRootKey int64
	PairingSecret   []byte
	LocalPrivateKey []byte
	LocalPublicKey  []byte
	RemotePublicKey []byte
	Privacy         bool
	GroupID         sql.NullInt64
	AccountID       sql.NullInt64
}

type InsertSessionPrivacyFlagParams

type InsertSessionPrivacyFlagParams struct {
	SessionID int64
	Flag      int32
}

type Kvstore

type Kvstore struct {
	ID        int64
	Perm      bool
	RuleID    int64
	SessionID sql.NullInt64
	FeatureID sql.NullInt64
	EntryKey  string
	Value     []byte
}

type ListActionsParams

type ListActionsParams struct {
	ActionQueryParams
	Reversed bool
	*Pagination
}

ListActionsParams defines the parameters for listing actions, including the ActionQueryParams for filtering and a Pagination struct for pagination. The Reversed field indicates whether the results should be returned in reverse order based on the created_at timestamp.

type Pagination

type Pagination struct {
	NumOffset int32
	NumLimit  int32
}

Pagination defines the pagination parameters for listing actions.

type PrivacyPair

type PrivacyPair struct {
	GroupID   int64
	RealVal   string
	PseudoVal string
}

type Querier

type Querier interface {
	AddAccountInvoice(ctx context.Context, arg AddAccountInvoiceParams) error
	DeleteAccount(ctx context.Context, id int64) error
	DeleteAccountPayment(ctx context.Context, arg DeleteAccountPaymentParams) error
	DeleteAllTempKVStores(ctx context.Context) error
	DeleteFeatureKVStoreRecord(ctx context.Context, arg DeleteFeatureKVStoreRecordParams) error
	DeleteGlobalKVStoreRecord(ctx context.Context, arg DeleteGlobalKVStoreRecordParams) error
	DeleteSessionKVStoreRecord(ctx context.Context, arg DeleteSessionKVStoreRecordParams) error
	DeleteSessionsWithState(ctx context.Context, state int16) error
	GetAccount(ctx context.Context, id int64) (Account, error)
	GetAccountByLabel(ctx context.Context, label sql.NullString) (Account, error)
	GetAccountIDByAlias(ctx context.Context, alias int64) (int64, error)
	GetAccountIndex(ctx context.Context, name string) (int64, error)
	GetAccountInvoice(ctx context.Context, arg GetAccountInvoiceParams) (AccountInvoice, error)
	GetAccountPayment(ctx context.Context, arg GetAccountPaymentParams) (AccountPayment, error)
	GetAliasBySessionID(ctx context.Context, id int64) ([]byte, error)
	GetAllPrivacyPairs(ctx context.Context, groupID int64) ([]GetAllPrivacyPairsRow, error)
	GetFeatureID(ctx context.Context, name string) (int64, error)
	GetFeatureKVStoreRecord(ctx context.Context, arg GetFeatureKVStoreRecordParams) ([]byte, error)
	GetGlobalKVStoreRecord(ctx context.Context, arg GetGlobalKVStoreRecordParams) ([]byte, error)
	GetOrInsertFeatureID(ctx context.Context, name string) (int64, error)
	GetOrInsertRuleID(ctx context.Context, name string) (int64, error)
	GetPseudoForReal(ctx context.Context, arg GetPseudoForRealParams) (string, error)
	GetRealForPseudo(ctx context.Context, arg GetRealForPseudoParams) (string, error)
	GetRuleID(ctx context.Context, name string) (int64, error)
	GetSessionAliasesInGroup(ctx context.Context, groupID sql.NullInt64) ([][]byte, error)
	GetSessionByAlias(ctx context.Context, alias []byte) (Session, error)
	GetSessionByID(ctx context.Context, id int64) (Session, error)
	GetSessionByLocalPublicKey(ctx context.Context, localPublicKey []byte) (Session, error)
	GetSessionFeatureConfigs(ctx context.Context, sessionID int64) ([]SessionFeatureConfig, error)
	GetSessionIDByAlias(ctx context.Context, alias []byte) (int64, error)
	GetSessionKVStoreRecord(ctx context.Context, arg GetSessionKVStoreRecordParams) ([]byte, error)
	GetSessionMacaroonCaveats(ctx context.Context, sessionID int64) ([]SessionMacaroonCaveat, error)
	GetSessionMacaroonPermissions(ctx context.Context, sessionID int64) ([]SessionMacaroonPermission, error)
	GetSessionPrivacyFlags(ctx context.Context, sessionID int64) ([]SessionPrivacyFlag, error)
	GetSessionsInGroup(ctx context.Context, groupID sql.NullInt64) ([]Session, error)
	InsertAccount(ctx context.Context, arg InsertAccountParams) (int64, error)
	InsertAction(ctx context.Context, arg InsertActionParams) (int64, error)
	InsertKVStoreRecord(ctx context.Context, arg InsertKVStoreRecordParams) error
	InsertPrivacyPair(ctx context.Context, arg InsertPrivacyPairParams) error
	InsertSession(ctx context.Context, arg InsertSessionParams) (int64, error)
	InsertSessionFeatureConfig(ctx context.Context, arg InsertSessionFeatureConfigParams) error
	InsertSessionMacaroonCaveat(ctx context.Context, arg InsertSessionMacaroonCaveatParams) error
	InsertSessionMacaroonPermission(ctx context.Context, arg InsertSessionMacaroonPermissionParams) error
	InsertSessionPrivacyFlag(ctx context.Context, arg InsertSessionPrivacyFlagParams) error
	ListAccountInvoices(ctx context.Context, accountID int64) ([]AccountInvoice, error)
	ListAccountPayments(ctx context.Context, accountID int64) ([]AccountPayment, error)
	ListAllAccounts(ctx context.Context) ([]Account, error)
	ListSessions(ctx context.Context) ([]Session, error)
	ListSessionsByState(ctx context.Context, state int16) ([]Session, error)
	ListSessionsByType(ctx context.Context, type_ int16) ([]Session, error)
	SetAccountIndex(ctx context.Context, arg SetAccountIndexParams) error
	SetActionState(ctx context.Context, arg SetActionStateParams) error
	SetSessionGroupID(ctx context.Context, arg SetSessionGroupIDParams) error
	SetSessionRemotePublicKey(ctx context.Context, arg SetSessionRemotePublicKeyParams) error
	SetSessionRevokedAt(ctx context.Context, arg SetSessionRevokedAtParams) error
	UpdateAccountBalance(ctx context.Context, arg UpdateAccountBalanceParams) (int64, error)
	UpdateAccountExpiry(ctx context.Context, arg UpdateAccountExpiryParams) (int64, error)
	UpdateAccountLastUpdate(ctx context.Context, arg UpdateAccountLastUpdateParams) (int64, error)
	UpdateFeatureKVStoreRecord(ctx context.Context, arg UpdateFeatureKVStoreRecordParams) error
	UpdateGlobalKVStoreRecord(ctx context.Context, arg UpdateGlobalKVStoreRecordParams) error
	UpdateSessionKVStoreRecord(ctx context.Context, arg UpdateSessionKVStoreRecordParams) error
	UpdateSessionState(ctx context.Context, arg UpdateSessionStateParams) error
	UpsertAccountPayment(ctx context.Context, arg UpsertAccountPaymentParams) error
}

type Queries

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

func New

func New(db DBTX) *Queries

func NewPostgres

func NewPostgres(db DBTX) *Queries

NewPostgres creates a new Queries instance for a Postgres database.

func NewSqlite

func NewSqlite(db DBTX) *Queries

NewSqlite creates a new Queries instance for a SQLite database.

func (*Queries) AddAccountInvoice

func (q *Queries) AddAccountInvoice(ctx context.Context, arg AddAccountInvoiceParams) error

func (*Queries) Backend

func (q *Queries) Backend() BackendType

Backend returns the type of database backend we're using.

func (*Queries) CountActions

func (q *Queries) CountActions(ctx context.Context,
	arg ActionQueryParams) (int64, error)

CountActions returns the number of actions that match the provided ActionQueryParams.

func (*Queries) DeleteAccount

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

func (*Queries) DeleteAccountPayment

func (q *Queries) DeleteAccountPayment(ctx context.Context, arg DeleteAccountPaymentParams) error

func (*Queries) DeleteAllTempKVStores

func (q *Queries) DeleteAllTempKVStores(ctx context.Context) error

func (*Queries) DeleteFeatureKVStoreRecord

func (q *Queries) DeleteFeatureKVStoreRecord(ctx context.Context, arg DeleteFeatureKVStoreRecordParams) error

func (*Queries) DeleteGlobalKVStoreRecord

func (q *Queries) DeleteGlobalKVStoreRecord(ctx context.Context, arg DeleteGlobalKVStoreRecordParams) error

func (*Queries) DeleteSessionKVStoreRecord

func (q *Queries) DeleteSessionKVStoreRecord(ctx context.Context, arg DeleteSessionKVStoreRecordParams) error

func (*Queries) DeleteSessionsWithState

func (q *Queries) DeleteSessionsWithState(ctx context.Context, state int16) error

func (*Queries) GetAccount

func (q *Queries) GetAccount(ctx context.Context, id int64) (Account, error)

func (*Queries) GetAccountByLabel

func (q *Queries) GetAccountByLabel(ctx context.Context, label sql.NullString) (Account, error)

func (*Queries) GetAccountIDByAlias

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

func (*Queries) GetAccountIndex

func (q *Queries) GetAccountIndex(ctx context.Context, name string) (int64, error)

func (*Queries) GetAccountInvoice

func (q *Queries) GetAccountInvoice(ctx context.Context, arg GetAccountInvoiceParams) (AccountInvoice, error)

func (*Queries) GetAccountPayment

func (q *Queries) GetAccountPayment(ctx context.Context, arg GetAccountPaymentParams) (AccountPayment, error)

func (*Queries) GetAliasBySessionID

func (q *Queries) GetAliasBySessionID(ctx context.Context, id int64) ([]byte, error)

func (*Queries) GetAllPrivacyPairs

func (q *Queries) GetAllPrivacyPairs(ctx context.Context, groupID int64) ([]GetAllPrivacyPairsRow, error)

func (*Queries) GetFeatureID

func (q *Queries) GetFeatureID(ctx context.Context, name string) (int64, error)

func (*Queries) GetFeatureKVStoreRecord

func (q *Queries) GetFeatureKVStoreRecord(ctx context.Context, arg GetFeatureKVStoreRecordParams) ([]byte, error)

func (*Queries) GetGlobalKVStoreRecord

func (q *Queries) GetGlobalKVStoreRecord(ctx context.Context, arg GetGlobalKVStoreRecordParams) ([]byte, error)

func (*Queries) GetOrInsertFeatureID

func (q *Queries) GetOrInsertFeatureID(ctx context.Context, name string) (int64, error)

func (*Queries) GetOrInsertRuleID

func (q *Queries) GetOrInsertRuleID(ctx context.Context, name string) (int64, error)

func (*Queries) GetPseudoForReal

func (q *Queries) GetPseudoForReal(ctx context.Context, arg GetPseudoForRealParams) (string, error)

func (*Queries) GetRealForPseudo

func (q *Queries) GetRealForPseudo(ctx context.Context, arg GetRealForPseudoParams) (string, error)

func (*Queries) GetRuleID

func (q *Queries) GetRuleID(ctx context.Context, name string) (int64, error)

func (*Queries) GetSessionAliasesInGroup

func (q *Queries) GetSessionAliasesInGroup(ctx context.Context, groupID sql.NullInt64) ([][]byte, error)

func (*Queries) GetSessionByAlias

func (q *Queries) GetSessionByAlias(ctx context.Context, alias []byte) (Session, error)

func (*Queries) GetSessionByID

func (q *Queries) GetSessionByID(ctx context.Context, id int64) (Session, error)

func (*Queries) GetSessionByLocalPublicKey

func (q *Queries) GetSessionByLocalPublicKey(ctx context.Context, localPublicKey []byte) (Session, error)

func (*Queries) GetSessionFeatureConfigs

func (q *Queries) GetSessionFeatureConfigs(ctx context.Context, sessionID int64) ([]SessionFeatureConfig, error)

func (*Queries) GetSessionIDByAlias

func (q *Queries) GetSessionIDByAlias(ctx context.Context, alias []byte) (int64, error)

func (*Queries) GetSessionKVStoreRecord

func (q *Queries) GetSessionKVStoreRecord(ctx context.Context, arg GetSessionKVStoreRecordParams) ([]byte, error)

func (*Queries) GetSessionMacaroonCaveats

func (q *Queries) GetSessionMacaroonCaveats(ctx context.Context, sessionID int64) ([]SessionMacaroonCaveat, error)

func (*Queries) GetSessionMacaroonPermissions

func (q *Queries) GetSessionMacaroonPermissions(ctx context.Context, sessionID int64) ([]SessionMacaroonPermission, error)

func (*Queries) GetSessionPrivacyFlags

func (q *Queries) GetSessionPrivacyFlags(ctx context.Context, sessionID int64) ([]SessionPrivacyFlag, error)

func (*Queries) GetSessionsInGroup

func (q *Queries) GetSessionsInGroup(ctx context.Context, groupID sql.NullInt64) ([]Session, error)

func (*Queries) InsertAccount

func (q *Queries) InsertAccount(ctx context.Context, arg InsertAccountParams) (int64, error)

func (*Queries) InsertAction

func (q *Queries) InsertAction(ctx context.Context, arg InsertActionParams) (int64, error)

func (*Queries) InsertKVStoreRecord

func (q *Queries) InsertKVStoreRecord(ctx context.Context, arg InsertKVStoreRecordParams) error

func (*Queries) InsertPrivacyPair

func (q *Queries) InsertPrivacyPair(ctx context.Context, arg InsertPrivacyPairParams) error

func (*Queries) InsertSession

func (q *Queries) InsertSession(ctx context.Context, arg InsertSessionParams) (int64, error)

func (*Queries) InsertSessionFeatureConfig

func (q *Queries) InsertSessionFeatureConfig(ctx context.Context, arg InsertSessionFeatureConfigParams) error

func (*Queries) InsertSessionMacaroonCaveat

func (q *Queries) InsertSessionMacaroonCaveat(ctx context.Context, arg InsertSessionMacaroonCaveatParams) error

func (*Queries) InsertSessionMacaroonPermission

func (q *Queries) InsertSessionMacaroonPermission(ctx context.Context, arg InsertSessionMacaroonPermissionParams) error

func (*Queries) InsertSessionPrivacyFlag

func (q *Queries) InsertSessionPrivacyFlag(ctx context.Context, arg InsertSessionPrivacyFlagParams) error

func (*Queries) ListAccountInvoices

func (q *Queries) ListAccountInvoices(ctx context.Context, accountID int64) ([]AccountInvoice, error)

func (*Queries) ListAccountPayments

func (q *Queries) ListAccountPayments(ctx context.Context, accountID int64) ([]AccountPayment, error)

func (*Queries) ListActions

func (q *Queries) ListActions(ctx context.Context,
	arg ListActionsParams) ([]Action, error)

ListActions retrieves a list of actions based on the provided ListActionsParams.

func (*Queries) ListAllAccounts

func (q *Queries) ListAllAccounts(ctx context.Context) ([]Account, error)

func (*Queries) ListSessions

func (q *Queries) ListSessions(ctx context.Context) ([]Session, error)

func (*Queries) ListSessionsByState

func (q *Queries) ListSessionsByState(ctx context.Context, state int16) ([]Session, error)

func (*Queries) ListSessionsByType

func (q *Queries) ListSessionsByType(ctx context.Context, type_ int16) ([]Session, error)

func (*Queries) SetAccountIndex

func (q *Queries) SetAccountIndex(ctx context.Context, arg SetAccountIndexParams) error

func (*Queries) SetActionState

func (q *Queries) SetActionState(ctx context.Context, arg SetActionStateParams) error

func (*Queries) SetSessionGroupID

func (q *Queries) SetSessionGroupID(ctx context.Context, arg SetSessionGroupIDParams) error

func (*Queries) SetSessionRemotePublicKey

func (q *Queries) SetSessionRemotePublicKey(ctx context.Context, arg SetSessionRemotePublicKeyParams) error

func (*Queries) SetSessionRevokedAt

func (q *Queries) SetSessionRevokedAt(ctx context.Context, arg SetSessionRevokedAtParams) error

func (*Queries) UpdateAccountBalance

func (q *Queries) UpdateAccountBalance(ctx context.Context, arg UpdateAccountBalanceParams) (int64, error)

func (*Queries) UpdateAccountExpiry

func (q *Queries) UpdateAccountExpiry(ctx context.Context, arg UpdateAccountExpiryParams) (int64, error)

func (*Queries) UpdateAccountLastUpdate

func (q *Queries) UpdateAccountLastUpdate(ctx context.Context, arg UpdateAccountLastUpdateParams) (int64, error)

func (*Queries) UpdateFeatureKVStoreRecord

func (q *Queries) UpdateFeatureKVStoreRecord(ctx context.Context, arg UpdateFeatureKVStoreRecordParams) error

func (*Queries) UpdateGlobalKVStoreRecord

func (q *Queries) UpdateGlobalKVStoreRecord(ctx context.Context, arg UpdateGlobalKVStoreRecordParams) error

func (*Queries) UpdateSessionKVStoreRecord

func (q *Queries) UpdateSessionKVStoreRecord(ctx context.Context, arg UpdateSessionKVStoreRecordParams) error

func (*Queries) UpdateSessionState

func (q *Queries) UpdateSessionState(ctx context.Context, arg UpdateSessionStateParams) error

func (*Queries) UpsertAccountPayment

func (q *Queries) UpsertAccountPayment(ctx context.Context, arg UpsertAccountPaymentParams) error

func (*Queries) WithTx

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

type Rule

type Rule struct {
	ID   int64
	Name string
}

type Session

type Session struct {
	ID              int64
	Alias           []byte
	Label           string
	State           int16
	Type            int16
	Expiry          time.Time
	CreatedAt       time.Time
	RevokedAt       sql.NullTime
	ServerAddress   string
	DevServer       bool
	MacaroonRootKey int64
	PairingSecret   []byte
	LocalPrivateKey []byte
	LocalPublicKey  []byte
	RemotePublicKey []byte
	Privacy         bool
	AccountID       sql.NullInt64
	GroupID         sql.NullInt64
}

type SessionFeatureConfig

type SessionFeatureConfig struct {
	SessionID   int64
	FeatureName string
	Config      []byte
}

type SessionMacaroonCaveat

type SessionMacaroonCaveat struct {
	ID             int64
	SessionID      int64
	CaveatID       []byte
	VerificationID []byte
	Location       sql.NullString
}

type SessionMacaroonPermission

type SessionMacaroonPermission struct {
	ID        int64
	SessionID int64
	Entity    string
	Action    string
}

type SessionPrivacyFlag

type SessionPrivacyFlag struct {
	SessionID int64
	Flag      int32
}

type SetAccountIndexParams

type SetAccountIndexParams struct {
	Name  string
	Value int64
}

type SetActionStateParams

type SetActionStateParams struct {
	ActionState int16
	ErrorReason sql.NullString
	ID          int64
}

type SetSessionGroupIDParams

type SetSessionGroupIDParams struct {
	GroupID sql.NullInt64
	ID      int64
}

type SetSessionRemotePublicKeyParams

type SetSessionRemotePublicKeyParams struct {
	RemotePublicKey []byte
	ID              int64
}

type SetSessionRevokedAtParams

type SetSessionRevokedAtParams struct {
	RevokedAt sql.NullTime
	ID        int64
}

type UpdateAccountBalanceParams

type UpdateAccountBalanceParams struct {
	CurrentBalanceMsat int64
	ID                 int64
}

type UpdateAccountExpiryParams

type UpdateAccountExpiryParams struct {
	Expiration time.Time
	ID         int64
}

type UpdateAccountLastUpdateParams

type UpdateAccountLastUpdateParams struct {
	LastUpdated time.Time
	ID          int64
}

type UpdateFeatureKVStoreRecordParams

type UpdateFeatureKVStoreRecordParams struct {
	Value     []byte
	Key       string
	RuleID    int64
	Perm      bool
	SessionID sql.NullInt64
	FeatureID sql.NullInt64
}

type UpdateGlobalKVStoreRecordParams

type UpdateGlobalKVStoreRecordParams struct {
	Value  []byte
	Key    string
	RuleID int64
	Perm   bool
}

type UpdateSessionKVStoreRecordParams

type UpdateSessionKVStoreRecordParams struct {
	Value     []byte
	Key       string
	RuleID    int64
	Perm      bool
	SessionID sql.NullInt64
}

type UpdateSessionStateParams

type UpdateSessionStateParams struct {
	State int16
	ID    int64
}

type UpsertAccountPaymentParams

type UpsertAccountPaymentParams struct {
	AccountID      int64
	Hash           []byte
	Status         int16
	FullAmountMsat int64
}

Jump to

Keyboard shortcuts

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