store

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const Unlimited = -1

Variables

View Source
var ErrAccountNotFound = stderrors.New("account not found")

Functions

This section is empty.

Types

type AccessGrant

type AccessGrant struct {
	Model
	ShareId   int
	AccountId int
}

type Account

type Account struct {
	Model
	Email     string
	Salt      string
	Password  string
	Token     string
	Limitless bool
	Deleted   bool
}

type AccountRequest

type AccountRequest struct {
	Model
	Token         string
	Email         string
	SourceAddress string
	Deleted       bool
}

type AgentEnrollment

type AgentEnrollment struct {
	Model
	EnvironmentId int
	Token         string
}

type AppliedLimitClass

type AppliedLimitClass struct {
	Model
	AccountId    int
	LimitClassId int
}

type BandwidthClass

type BandwidthClass interface {
	BaseLimitClass
	IsScoped() bool
	GetBackendMode() sdk.BackendMode
	GetPeriodMinutes() int
	GetRxBytes() int64
	GetTxBytes() int64
	GetTotalBytes() int64
	GetLimitAction() LimitAction
}

type BandwidthLimitJournalEntry

type BandwidthLimitJournalEntry struct {
	Model
	AccountId    int
	LimitClassId *int
	Action       LimitAction
	RxBytes      int64
	TxBytes      int64
}

type BaseLimitClass

type BaseLimitClass interface {
	IsGlobal() bool
	GetLimitClassId() int
	String() string
}

type Config

type Config struct {
	Path                 string `dd:"+secret"`
	Type                 string
	EnableLocking        bool
	DisableAutoMigration bool
}

type Environment

type Environment struct {
	Model
	AccountId   *int
	Description string
	Host        string
	Address     string
	ZId         string
	Deleted     bool
}

type EnvironmentFilter

type EnvironmentFilter struct {
	Description   *string
	Host          *string
	Address       *string
	ShareCount    *string
	AccessCount   *string
	CreatedAfter  *time.Time
	CreatedBefore *time.Time
	UpdatedAfter  *time.Time
	UpdatedBefore *time.Time
	HasShares     *bool
	HasAccesses   *bool
}

type EnvironmentWithCounts

type EnvironmentWithCounts struct {
	Environment
	ShareCount  int
	AccessCount int
}

type Frontend

type Frontend struct {
	Model
	EnvironmentId  *int
	PrivateShareId *int
	Token          string
	ZId            string
	PublicName     *string
	UrlTemplate    *string
	Dynamic        bool
	BindAddress    *string
	Reserved       bool
	PermissionMode PermissionMode
	Description    *string
}

type FrontendFilter

type FrontendFilter struct {
	EnvZId        *string
	ShareToken    *string
	BindAddress   *string
	Description   *string
	Reserved      *bool
	CreatedAfter  *time.Time
	CreatedBefore *time.Time
	UpdatedAfter  *time.Time
	UpdatedBefore *time.Time
}

type FrontendMapping

type FrontendMapping struct {
	Id            int64
	FrontendToken string
	Name          string
	ShareToken    string
	CreatedAt     time.Time
}

type FrontendMappingWithShareState added in v2.0.1

type FrontendMappingWithShareState struct {
	FrontendMapping
	ShareDeleted *bool `db:"share_deleted"`
}

type FrontendWithEnvironment

type FrontendWithEnvironment struct {
	Frontend
	EnvZId      *string
	ShareToken  *string
	BackendMode *string
}

type InviteToken

type InviteToken struct {
	Model
	Token   string
	Deleted bool
}

type LimitAction

type LimitAction string
const (
	LimitLimitAction   LimitAction = "limit"
	WarningLimitAction LimitAction = "warning"
)

type LimitClass

type LimitClass struct {
	Model
	Label          *string
	BackendMode    *sdk.BackendMode
	Environments   int
	Shares         int
	ReservedShares int
	UniqueNames    int
	ShareFrontends int
	PeriodMinutes  int
	RxBytes        int64
	TxBytes        int64
	TotalBytes     int64
	LimitAction    LimitAction
}

func (LimitClass) GetBackendMode

func (lc LimitClass) GetBackendMode() sdk.BackendMode

func (LimitClass) GetEnvironments

func (lc LimitClass) GetEnvironments() int

func (LimitClass) GetLimitAction

func (lc LimitClass) GetLimitAction() LimitAction

func (LimitClass) GetLimitClassId

func (lc LimitClass) GetLimitClassId() int

func (LimitClass) GetPeriodMinutes

func (lc LimitClass) GetPeriodMinutes() int

func (LimitClass) GetReservedShares

func (lc LimitClass) GetReservedShares() int

func (LimitClass) GetRxBytes

func (lc LimitClass) GetRxBytes() int64

func (LimitClass) GetShareFrontends

func (lc LimitClass) GetShareFrontends() int

func (LimitClass) GetShares

func (lc LimitClass) GetShares() int

func (LimitClass) GetTotalBytes

func (lc LimitClass) GetTotalBytes() int64

func (LimitClass) GetTxBytes

func (lc LimitClass) GetTxBytes() int64

func (LimitClass) GetUniqueNames

func (lc LimitClass) GetUniqueNames() int

func (LimitClass) IsGlobal

func (lc LimitClass) IsGlobal() bool

func (LimitClass) IsResourceCountClass added in v2.0.1

func (lc LimitClass) IsResourceCountClass() bool

func (LimitClass) IsScoped

func (lc LimitClass) IsScoped() bool

func (LimitClass) IsScopedBandwidthClass added in v2.0.1

func (lc LimitClass) IsScopedBandwidthClass() bool

func (LimitClass) IsUnscopedBandwidthClass added in v2.0.1

func (lc LimitClass) IsUnscopedBandwidthClass() bool

func (LimitClass) String

func (lc LimitClass) String() string

type Model

type Model struct {
	Id        int
	CreatedAt time.Time
	UpdatedAt time.Time
	Deleted   bool
}

type Name

type Name struct {
	Model
	NamespaceId int
	Name        string
	AccountId   int
	Reserved    bool
}

type NameWithNamespace

type NameWithNamespace struct {
	Name
	NamespaceName string
}

type NameWithShareToken

type NameWithShareToken struct {
	Name
	ShareToken *string
}

type Namespace

type Namespace struct {
	Model
	Token       string
	Name        string
	Description string
	Open        bool
}

type NamespaceFrontendMapping

type NamespaceFrontendMapping struct {
	Model
	NamespaceId int
	FrontendId  int
	IsDefault   bool
}

type NamespaceGrant

type NamespaceGrant struct {
	Model
	NamespaceId int
	AccountId   int
}

type Organization

type Organization struct {
	Model
	Token       string
	Description string
}

type OrganizationMember

type OrganizationMember struct {
	Email string
	Admin bool
}

type OrganizationMembership

type OrganizationMembership struct {
	Token       string
	Description string
	Admin       bool
}

type PasswordResetRequest

type PasswordResetRequest struct {
	Model
	Token     string
	AccountId int
	Deleted   bool
}

type PermissionMode

type PermissionMode string
const (
	OpenPermissionMode   PermissionMode = "open"
	ClosedPermissionMode PermissionMode = "closed"
)

type ResourceCountClass

type ResourceCountClass interface {
	BaseLimitClass
	GetEnvironments() int
	GetShares() int
	GetReservedShares() int
	GetUniqueNames() int
	GetShareFrontends() int
}

type Share

type Share struct {
	Model
	EnvironmentId        int
	ZId                  string
	Token                string
	ShareMode            string
	BackendMode          string
	FrontendSelection    *string
	FrontendEndpoint     *string
	BackendProxyEndpoint *string
	PermissionMode       PermissionMode
}

type ShareFilter

type ShareFilter struct {
	EnvZId         *string
	ShareMode      *string
	BackendMode    *string
	ShareToken     *string
	Target         *string
	PermissionMode *string
	CreatedAfter   *time.Time
	CreatedBefore  *time.Time
	UpdatedAfter   *time.Time
	UpdatedBefore  *time.Time
}

type ShareNameCleanupDetail added in v2.0.1

type ShareNameCleanupDetail struct {
	MappingId        int    `db:"mapping_id"`
	NameId           int    `db:"name_id"`
	Name             string `db:"name"`
	NameDeleted      bool   `db:"name_deleted"`
	Reserved         bool   `db:"reserved"`
	NamespaceID      int    `db:"namespace_id"`
	NamespaceName    string `db:"namespace_name"`
	NamespaceDeleted bool   `db:"namespace_deleted"`
}

type ShareNameMapping

type ShareNameMapping struct {
	Model
	ShareId int
	NameId  int
}

type ShareNameMappingWithShare added in v2.0.1

type ShareNameMappingWithShare struct {
	ShareNameMapping
	ShareToken   string `db:"share_token"`
	ShareDeleted bool   `db:"share_deleted"`
}

type Store

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

func Open

func Open(cfg *Config) (*Store, error)

func (*Store) AddAccountToOrganization

func (str *Store) AddAccountToOrganization(acctId, orgId int, admin bool, trx *sqlx.Tx) error

func (*Store) ApplyLimitClass

func (str *Store) ApplyLimitClass(lc *AppliedLimitClass, trx *sqlx.Tx) (int, error)

func (*Store) Begin

func (str *Store) Begin() (*sqlx.Tx, error)

func (*Store) CheckNameAvailability

func (str *Store) CheckNameAvailability(namespaceId int, name string, trx *sqlx.Tx) (bool, error)

func (*Store) CheckNamespaceGrant

func (str *Store) CheckNamespaceGrant(namespaceId, accountId int, trx *sqlx.Tx) (bool, error)

func (*Store) Close

func (str *Store) Close() error

func (*Store) CreateAccessGrant

func (str *Store) CreateAccessGrant(shareId, accountId int, trx *sqlx.Tx) (int, error)

func (*Store) CreateAccount

func (str *Store) CreateAccount(a *Account, trx *sqlx.Tx) (int, error)

func (*Store) CreateAccountRequest

func (str *Store) CreateAccountRequest(ar *AccountRequest, trx *sqlx.Tx) (int, error)

func (*Store) CreateAgentEnrollment

func (str *Store) CreateAgentEnrollment(envId int, token string, trx *sqlx.Tx) (int, error)

func (*Store) CreateBandwidthLimitJournalEntry

func (str *Store) CreateBandwidthLimitJournalEntry(j *BandwidthLimitJournalEntry, trx *sqlx.Tx) (int, error)

func (*Store) CreateEnvironment

func (str *Store) CreateEnvironment(accountId int, i *Environment, trx *sqlx.Tx) (int, error)

func (*Store) CreateEphemeralEnvironment

func (str *Store) CreateEphemeralEnvironment(i *Environment, trx *sqlx.Tx) (int, error)

func (*Store) CreateFrontend

func (str *Store) CreateFrontend(envId int, f *Frontend, trx *sqlx.Tx) (int, error)

func (*Store) CreateFrontendGrant

func (str *Store) CreateFrontendGrant(frontendId, accountId int, trx *sqlx.Tx) (int, error)

func (*Store) CreateFrontendMapping

func (str *Store) CreateFrontendMapping(fm *FrontendMapping, trx *sqlx.Tx) (int, error)

func (*Store) CreateGlobalFrontend

func (str *Store) CreateGlobalFrontend(f *Frontend, trx *sqlx.Tx) (int, error)

func (*Store) CreateInviteTokens

func (str *Store) CreateInviteTokens(inviteTokens []*InviteToken, trx *sqlx.Tx) error

func (*Store) CreateLimitClass

func (str *Store) CreateLimitClass(lc *LimitClass, trx *sqlx.Tx) (int, error)

func (*Store) CreateName

func (str *Store) CreateName(an *Name, trx *sqlx.Tx) (int, error)

func (*Store) CreateNamespace

func (str *Store) CreateNamespace(ns *Namespace, trx *sqlx.Tx) (int, error)

func (*Store) CreateNamespaceFrontendMapping

func (str *Store) CreateNamespaceFrontendMapping(nsId, feId int, isDefault bool, trx *sqlx.Tx) (int, error)

func (*Store) CreateNamespaceGrant

func (str *Store) CreateNamespaceGrant(ng *NamespaceGrant, trx *sqlx.Tx) (int, error)

func (*Store) CreateOrganization

func (str *Store) CreateOrganization(org *Organization, trx *sqlx.Tx) (int, error)

func (*Store) CreatePasswordResetRequest

func (str *Store) CreatePasswordResetRequest(prr *PasswordResetRequest, trx *sqlx.Tx) (int, error)

func (*Store) CreateShare

func (str *Store) CreateShare(envId int, shr *Share, trx *sqlx.Tx) (int, error)

func (*Store) CreateShareNameMapping

func (str *Store) CreateShareNameMapping(snm *ShareNameMapping, trx *sqlx.Tx) (int, error)

func (*Store) DeleteAccessGrantsForShare

func (str *Store) DeleteAccessGrantsForShare(shrId int, trx *sqlx.Tx) error

func (*Store) DeleteAccessGrantsForShareAndAccount

func (str *Store) DeleteAccessGrantsForShareAndAccount(shrId, acctId int, trx *sqlx.Tx) error

func (*Store) DeleteAccount

func (str *Store) DeleteAccount(id int, trx *sqlx.Tx) error

func (*Store) DeleteAccountRequest

func (str *Store) DeleteAccountRequest(id int, trx *sqlx.Tx) error

func (*Store) DeleteAgentEnrollment

func (str *Store) DeleteAgentEnrollment(id int, trx *sqlx.Tx) error

func (*Store) DeleteBandwidthLimitJournalEntryForGlobal

func (str *Store) DeleteBandwidthLimitJournalEntryForGlobal(acctId int, trx *sqlx.Tx) error

func (*Store) DeleteBandwidthLimitJournalEntryForLimitClass

func (str *Store) DeleteBandwidthLimitJournalEntryForLimitClass(acctId int, lcId int, trx *sqlx.Tx) error

func (*Store) DeleteEnvironment

func (str *Store) DeleteEnvironment(id int, trx *sqlx.Tx) error

func (*Store) DeleteFrontend

func (str *Store) DeleteFrontend(id int, trx *sqlx.Tx) error

func (*Store) DeleteFrontendGrant

func (str *Store) DeleteFrontendGrant(frontendId, accountId int, trx *sqlx.Tx) error

func (*Store) DeleteFrontendMappingsByFrontendTokenAndName

func (str *Store) DeleteFrontendMappingsByFrontendTokenAndName(frontendToken, name string, trx *sqlx.Tx) error

func (*Store) DeleteInviteToken

func (str *Store) DeleteInviteToken(id int, trx *sqlx.Tx) error

func (*Store) DeleteMultipleAccountRequests

func (str *Store) DeleteMultipleAccountRequests(ids []int, trx *sqlx.Tx) error

func (*Store) DeleteMultiplePasswordResetRequests

func (str *Store) DeleteMultiplePasswordResetRequests(ids []int, trx *sqlx.Tx) error

func (*Store) DeleteName

func (str *Store) DeleteName(id int, trx *sqlx.Tx) error

func (*Store) DeleteNamespace

func (str *Store) DeleteNamespace(id int, trx *sqlx.Tx) error

func (*Store) DeleteNamespaceFrontendMapping

func (str *Store) DeleteNamespaceFrontendMapping(nsId, feId int, trx *sqlx.Tx) error

func (*Store) DeleteNamespaceGrant

func (str *Store) DeleteNamespaceGrant(id int, trx *sqlx.Tx) error

func (*Store) DeleteOrganization

func (str *Store) DeleteOrganization(id int, trx *sqlx.Tx) error

func (*Store) DeletePasswordResetRequest

func (str *Store) DeletePasswordResetRequest(id int, trx *sqlx.Tx) error

func (*Store) DeletePasswordResetRequestsByAccountId

func (str *Store) DeletePasswordResetRequestsByAccountId(accountId int, trx *sqlx.Tx) error

func (*Store) DeleteShare

func (str *Store) DeleteShare(id int, trx *sqlx.Tx) error

func (*Store) DeleteShareNameMapping

func (str *Store) DeleteShareNameMapping(id int, trx *sqlx.Tx) error

func (*Store) FindAccountRequestWithEmail

func (str *Store) FindAccountRequestWithEmail(email string, trx *sqlx.Tx) (*AccountRequest, error)

func (*Store) FindAccountRequestWithToken

func (str *Store) FindAccountRequestWithToken(token string, trx *sqlx.Tx) (*AccountRequest, error)

func (*Store) FindAccountWithEmail

func (str *Store) FindAccountWithEmail(email string, trx *sqlx.Tx) (*Account, error)

func (*Store) FindAccountWithEmailAndDeleted

func (str *Store) FindAccountWithEmailAndDeleted(email string, trx *sqlx.Tx) (*Account, error)

func (*Store) FindAccountWithToken

func (str *Store) FindAccountWithToken(token string, trx *sqlx.Tx) (*Account, error)

func (*Store) FindAccountsForOrganization

func (str *Store) FindAccountsForOrganization(orgId int, trx *sqlx.Tx) ([]*OrganizationMember, error)

func (*Store) FindAgentEnrollmentForEnvironment

func (str *Store) FindAgentEnrollmentForEnvironment(envId int, trx *sqlx.Tx) (*AgentEnrollment, error)

func (*Store) FindAllBandwidthLimitJournal

func (str *Store) FindAllBandwidthLimitJournal(trx *sqlx.Tx) ([]*BandwidthLimitJournalEntry, error)

func (*Store) FindAllLatestBandwidthLimitJournal

func (str *Store) FindAllLatestBandwidthLimitJournal(trx *sqlx.Tx) ([]*BandwidthLimitJournalEntry, error)

func (*Store) FindAllLatestBandwidthLimitJournalForAccount

func (str *Store) FindAllLatestBandwidthLimitJournalForAccount(acctId int, trx *sqlx.Tx) ([]*BandwidthLimitJournalEntry, error)

func (*Store) FindAllShares

func (str *Store) FindAllShares(trx *sqlx.Tx) ([]*Share, error)

func (*Store) FindAllSharesForAccount

func (str *Store) FindAllSharesForAccount(accountId int, trx *sqlx.Tx) ([]*Share, error)

func (*Store) FindAppliedLimitClassesForAccount

func (str *Store) FindAppliedLimitClassesForAccount(acctId int, trx *sqlx.Tx) ([]*LimitClass, error)

func (*Store) FindClosedPublicFrontendsGrantedToAccount

func (str *Store) FindClosedPublicFrontendsGrantedToAccount(accountId int, trx *sqlx.Tx) ([]*Frontend, error)

func (*Store) FindDynamicFrontendsForNamespace

func (str *Store) FindDynamicFrontendsForNamespace(namespaceId int, trx *sqlx.Tx) ([]*Frontend, error)

func (*Store) FindEnvironmentForAccount

func (str *Store) FindEnvironmentForAccount(envZId string, accountId int, trx *sqlx.Tx) (*Environment, error)

func (*Store) FindEnvironmentsForAccount

func (str *Store) FindEnvironmentsForAccount(accountId int, trx *sqlx.Tx) ([]*Environment, error)

func (*Store) FindEnvironmentsForAccountWithFilter

func (str *Store) FindEnvironmentsForAccountWithFilter(accountId int, filter *EnvironmentFilter, trx *sqlx.Tx) ([]*EnvironmentWithCounts, error)

func (*Store) FindExpiredAccountRequests

func (str *Store) FindExpiredAccountRequests(before time.Time, limit int, trx *sqlx.Tx) ([]*AccountRequest, error)

func (*Store) FindExpiredPasswordResetRequests

func (str *Store) FindExpiredPasswordResetRequests(before time.Time, limit int, trx *sqlx.Tx) ([]*PasswordResetRequest, error)

func (*Store) FindFrontendMappingByFrontendTokenAndNameWithShareState added in v2.0.1

func (str *Store) FindFrontendMappingByFrontendTokenAndNameWithShareState(frontendToken, name string, trx *sqlx.Tx) (*FrontendMappingWithShareState, error)

func (*Store) FindFrontendMappingsByFrontendTokenWithHigherId

func (str *Store) FindFrontendMappingsByFrontendTokenWithHigherId(frontendToken string, id int64, trx *sqlx.Tx) ([]*FrontendMapping, error)

func (*Store) FindFrontendMappingsWithHigherId

func (str *Store) FindFrontendMappingsWithHigherId(frontendToken, name string, id int64, trx *sqlx.Tx) ([]*FrontendMapping, error)

func (*Store) FindFrontendPubliclyNamed

func (str *Store) FindFrontendPubliclyNamed(publicName string, trx *sqlx.Tx) (*Frontend, error)

func (*Store) FindFrontendWithToken

func (str *Store) FindFrontendWithToken(token string, trx *sqlx.Tx) (*Frontend, error)

func (*Store) FindFrontendWithTokenAndEnvironment added in v2.0.1

func (str *Store) FindFrontendWithTokenAndEnvironment(token string, envId int, trx *sqlx.Tx) (*Frontend, error)

func (*Store) FindFrontendWithZId

func (str *Store) FindFrontendWithZId(zId string, trx *sqlx.Tx) (*Frontend, error)

func (*Store) FindFrontendsForAccountWithFilter

func (str *Store) FindFrontendsForAccountWithFilter(accountId int, filter *FrontendFilter, trx *sqlx.Tx) ([]*FrontendWithEnvironment, error)

func (*Store) FindFrontendsForEnvironment

func (str *Store) FindFrontendsForEnvironment(envId int, trx *sqlx.Tx) ([]*Frontend, error)

func (*Store) FindFrontendsForNamespace

func (str *Store) FindFrontendsForNamespace(namespaceId int, trx *sqlx.Tx) ([]*Frontend, error)

func (*Store) FindFrontendsForPrivateShare

func (str *Store) FindFrontendsForPrivateShare(shrId int, trx *sqlx.Tx) ([]*Frontend, error)

func (*Store) FindInviteTokenByToken

func (str *Store) FindInviteTokenByToken(token string, trx *sqlx.Tx) (*InviteToken, error)

func (*Store) FindLatestBandwidthLimitJournal

func (str *Store) FindLatestBandwidthLimitJournal(acctId int, trx *sqlx.Tx) (*BandwidthLimitJournalEntry, error)

func (*Store) FindLatestBandwidthLimitJournalForGlobal

func (str *Store) FindLatestBandwidthLimitJournalForGlobal(acctId int, trx *sqlx.Tx) (*BandwidthLimitJournalEntry, error)

func (*Store) FindLatestBandwidthLimitJournalForLimitClass

func (str *Store) FindLatestBandwidthLimitJournalForLimitClass(acctId, lcId int, trx *sqlx.Tx) (*BandwidthLimitJournalEntry, error)

func (*Store) FindLimitClassesByLabel added in v2.0.1

func (str *Store) FindLimitClassesByLabel(label string, trx *sqlx.Tx) ([]*LimitClass, error)

func (*Store) FindNameByNamespaceAndName

func (str *Store) FindNameByNamespaceAndName(namespaceId int, name string, trx *sqlx.Tx) (*Name, error)

func (*Store) FindNamesForAccount

func (str *Store) FindNamesForAccount(accountId int, trx *sqlx.Tx) ([]*Name, error)

func (*Store) FindNamesForAccountAndNamespace

func (str *Store) FindNamesForAccountAndNamespace(accountId, namespaceId int, trx *sqlx.Tx) ([]*Name, error)

func (*Store) FindNamesForNamespace

func (str *Store) FindNamesForNamespace(namespaceId int, trx *sqlx.Tx) ([]*Name, error)

func (*Store) FindNamesForShare

func (str *Store) FindNamesForShare(shareId int, trx *sqlx.Tx) ([]*NameWithNamespace, error)

func (*Store) FindNamesWithShareTokensForAccountAndNamespace

func (str *Store) FindNamesWithShareTokensForAccountAndNamespace(accountId, namespaceId int, trx *sqlx.Tx) ([]*NameWithShareToken, error)

func (*Store) FindNamespaceFrontendMappingsForFrontend

func (str *Store) FindNamespaceFrontendMappingsForFrontend(frontendId int, trx *sqlx.Tx) ([]*NamespaceFrontendMapping, error)

func (*Store) FindNamespaceFrontendMappingsForNamespace

func (str *Store) FindNamespaceFrontendMappingsForNamespace(namespaceId int, trx *sqlx.Tx) ([]*NamespaceFrontendMapping, error)

func (*Store) FindNamespaceGrantsForAccount

func (str *Store) FindNamespaceGrantsForAccount(accountId int, trx *sqlx.Tx) ([]*NamespaceGrant, error)

func (*Store) FindNamespaceGrantsForNamespace

func (str *Store) FindNamespaceGrantsForNamespace(namespaceId int, trx *sqlx.Tx) ([]*NamespaceGrant, error)

func (*Store) FindNamespaceWithName

func (str *Store) FindNamespaceWithName(name string, trx *sqlx.Tx) (*Namespace, error)

func (*Store) FindNamespaceWithToken

func (str *Store) FindNamespaceWithToken(token string, trx *sqlx.Tx) (*Namespace, error)

func (*Store) FindNamespaces

func (str *Store) FindNamespaces(trx *sqlx.Tx) ([]*Namespace, error)

func (*Store) FindNamespacesForAccount

func (str *Store) FindNamespacesForAccount(accountId int, trx *sqlx.Tx) ([]*Namespace, error)

func (*Store) FindNamespacesForFrontend

func (str *Store) FindNamespacesForFrontend(frontendId int, trx *sqlx.Tx) ([]*Namespace, error)

func (*Store) FindOpenPublicFrontends

func (str *Store) FindOpenPublicFrontends(trx *sqlx.Tx) ([]*Frontend, error)

func (*Store) FindOrganizationByToken

func (str *Store) FindOrganizationByToken(token string, trx *sqlx.Tx) (*Organization, error)

func (*Store) FindOrganizations

func (str *Store) FindOrganizations(trx *sqlx.Tx) ([]*Organization, error)

func (*Store) FindOrganizationsForAccount

func (str *Store) FindOrganizationsForAccount(acctId int, trx *sqlx.Tx) ([]*OrganizationMembership, error)

func (*Store) FindPasswordResetRequestWithToken

func (str *Store) FindPasswordResetRequestWithToken(token string, trx *sqlx.Tx) (*PasswordResetRequest, error)

func (*Store) FindPublicFrontends

func (str *Store) FindPublicFrontends(trx *sqlx.Tx) ([]*Frontend, error)

func (*Store) FindShareNameCleanupDetailsByShareId added in v2.0.1

func (str *Store) FindShareNameCleanupDetailsByShareId(shareId int, trx *sqlx.Tx) ([]*ShareNameCleanupDetail, error)

func (*Store) FindShareNameMappingByShareIdAndNameId

func (str *Store) FindShareNameMappingByShareIdAndNameId(shareId, nameId int, trx *sqlx.Tx) (*ShareNameMapping, error)

func (*Store) FindShareNameMappingsByNameId

func (str *Store) FindShareNameMappingsByNameId(nameId int, trx *sqlx.Tx) ([]*ShareNameMapping, error)

func (*Store) FindShareNameMappingsByNameIdWithShare added in v2.0.1

func (str *Store) FindShareNameMappingsByNameIdWithShare(nameId int, trx *sqlx.Tx) ([]*ShareNameMappingWithShare, error)

func (*Store) FindShareNameMappingsByShareId

func (str *Store) FindShareNameMappingsByShareId(shareId int, trx *sqlx.Tx) ([]*ShareNameMapping, error)

func (*Store) FindShareWithToken

func (str *Store) FindShareWithToken(shrToken string, trx *sqlx.Tx) (*Share, error)

func (*Store) FindShareWithTokenEvenIfDeleted

func (str *Store) FindShareWithTokenEvenIfDeleted(shrToken string, trx *sqlx.Tx) (*Share, error)

func (*Store) FindShareWithZIdAndDeleted

func (str *Store) FindShareWithZIdAndDeleted(zId string, trx *sqlx.Tx) (*Share, error)

func (*Store) FindSharesForAccountWithFilter

func (str *Store) FindSharesForAccountWithFilter(accountId int, filter *ShareFilter, trx *sqlx.Tx) ([]*Share, error)

func (*Store) FindSharesForEnvironment

func (str *Store) FindSharesForEnvironment(envId int, trx *sqlx.Tx) ([]*Share, error)

func (*Store) GetAccount

func (str *Store) GetAccount(id int, trx *sqlx.Tx) (*Account, error)

func (*Store) GetAccountRequest

func (str *Store) GetAccountRequest(id int, trx *sqlx.Tx) (*AccountRequest, error)

func (*Store) GetEnvironment

func (str *Store) GetEnvironment(id int, trx *sqlx.Tx) (*Environment, error)

func (*Store) GetFrontend

func (str *Store) GetFrontend(id int, trx *sqlx.Tx) (*Frontend, error)

func (*Store) GetLimitClass

func (str *Store) GetLimitClass(lcId int, trx *sqlx.Tx) (*LimitClass, error)

func (*Store) GetName

func (str *Store) GetName(id int, trx *sqlx.Tx) (*Name, error)

func (*Store) GetNamespace

func (str *Store) GetNamespace(id int, trx *sqlx.Tx) (*Namespace, error)

func (*Store) GetNamespaceGrant

func (str *Store) GetNamespaceGrant(id int, trx *sqlx.Tx) (*NamespaceGrant, error)

func (*Store) GetShare

func (str *Store) GetShare(id int, trx *sqlx.Tx) (*Share, error)

func (*Store) GetShareNameMapping

func (str *Store) GetShareNameMapping(id int, trx *sqlx.Tx) (*ShareNameMapping, error)

func (*Store) GrantSkipInterstitial added in v2.0.1

func (str *Store) GrantSkipInterstitial(acctId int, trx *sqlx.Tx) error

func (*Store) IsAccessGrantedToAccountForShare

func (str *Store) IsAccessGrantedToAccountForShare(shrId, acctId int, trx *sqlx.Tx) (int, error)

func (*Store) IsAccountAdminOfOrganization

func (str *Store) IsAccountAdminOfOrganization(acctId, orgId int, trx *sqlx.Tx) (bool, error)

func (*Store) IsAccountGrantedSkipInterstitial

func (str *Store) IsAccountGrantedSkipInterstitial(acctId int, trx *sqlx.Tx) (bool, error)

func (*Store) IsAccountInOrganization

func (str *Store) IsAccountInOrganization(acctId, orgId int, trx *sqlx.Tx) (bool, error)

func (*Store) IsAgentEnrolledForEnvironment

func (str *Store) IsAgentEnrolledForEnvironment(envId int, trx *sqlx.Tx) (bool, error)

func (*Store) IsBandwidthLimitJournalEmpty

func (str *Store) IsBandwidthLimitJournalEmpty(acctId int, trx *sqlx.Tx) (bool, error)

func (*Store) IsBandwidthLimitJournalEmptyForGlobal

func (str *Store) IsBandwidthLimitJournalEmptyForGlobal(acctId int, trx *sqlx.Tx) (bool, error)

func (*Store) IsBandwidthLimitJournalEmptyForLimitClass

func (str *Store) IsBandwidthLimitJournalEmptyForLimitClass(acctId, lcId int, trx *sqlx.Tx) (bool, error)

func (*Store) IsFrontendGrantedToAccount

func (str *Store) IsFrontendGrantedToAccount(frontendId, accountId int, trx *sqlx.Tx) (bool, error)

func (*Store) LimitCheckLock

func (str *Store) LimitCheckLock(acctId int, trx *sqlx.Tx) error

func (*Store) MigrateDown

func (str *Store) MigrateDown(cfg *Config, max int) error

func (*Store) RemoveAccountFromOrganization

func (str *Store) RemoveAccountFromOrganization(acctId, orgId int, trx *sqlx.Tx) error

func (*Store) RemoveAppliedLimitClass added in v2.0.1

func (str *Store) RemoveAppliedLimitClass(acctId, lcId int, trx *sqlx.Tx) error

func (*Store) RevokeSkipInterstitial added in v2.0.1

func (str *Store) RevokeSkipInterstitial(acctId int, trx *sqlx.Tx) error

func (*Store) ShareWithTokenExists

func (str *Store) ShareWithTokenExists(shrToken string, trx *sqlx.Tx) (bool, error)

func (*Store) UpdateAccount

func (str *Store) UpdateAccount(a *Account, trx *sqlx.Tx) (int, error)

func (*Store) UpdateFrontend

func (str *Store) UpdateFrontend(fe *Frontend, trx *sqlx.Tx) error

func (*Store) UpdateName

func (str *Store) UpdateName(name *Name, trx *sqlx.Tx) error

func (*Store) UpdateNamespace

func (str *Store) UpdateNamespace(ns *Namespace, trx *sqlx.Tx) error

func (*Store) UpdateShare

func (str *Store) UpdateShare(shr *Share, trx *sqlx.Tx) error

Directories

Path Synopsis
sql

Jump to

Keyboard shortcuts

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