migration

package
v0.14.29 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LimitMax      = 500
	OffsetMax     = 100000
	SortMax       = 50
	LimitDefault  = 10
	OffsetDefault = 0
)
View Source
const (
	EventCreate events.EventName = "CREATE"
	EventDelete events.EventName = "DELETE"
	EventUpdate events.EventName = "UPDATE"
	EventPatch  events.EventName = "PATCH"
)
View Source
const (
	IdentityTypeUserId    = "577104f2-1e3a-4947-a927-7383baefbc9a"
	IdentityTypeServiceId = "c4d66f9d-fe18-4143-85d3-74329c54282b"
	IdentityTypeDeviceId  = "5b53fb49-51b1-4a87-a4e4-edda9716a970"
)
View Source
const IdentityDefaultAdminId = "da71c941-576b-4b2a-9af2-53867c6d1ec5"

Variables

View Source
var Offline = false
View Source
var Online = true

Functions

func IsErrNotFoundErr

func IsErrNotFoundErr(err error) bool

func NewId

func NewId() string

func NewIdPtr

func NewIdPtr() *string

Types

type AppWan

type AppWan struct {
	BaseDbEntity
	Name       *string
	Identities []*Identity `gorm:"many2many:app_wan_identities"`
	Services   []*Service  `gorm:"many2many:app_wan_services"`
}

func (*AppWan) BeforeDelete

func (e *AppWan) BeforeDelete(tx *gorm.DB) error

type AppWanGormStore

type AppWanGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewAppWanGormStore

func NewAppWanGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *AppWanGormStore

func (*AppWanGormStore) BaseCreate

func (igs *AppWanGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*AppWanGormStore) BaseDeleteById

func (igs *AppWanGormStore) BaseDeleteById(id string) error

func (*AppWanGormStore) BaseDeleteWhere

func (igs *AppWanGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*AppWanGormStore) BaseIdentifierMap

func (igs *AppWanGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*AppWanGormStore) BaseLoadList

func (igs *AppWanGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*AppWanGormStore) BaseLoadOne

func (igs *AppWanGormStore) BaseLoadOne(p *predicate.Predicate, pl *Preloads) (BaseDbModel, error)

func (*AppWanGormStore) BaseLoadOneById

func (igs *AppWanGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*AppWanGormStore) BasePatch

func (igs *AppWanGormStore) BasePatch(e BaseDbModel) error

func (*AppWanGormStore) BaseStatsList

func (igs *AppWanGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*AppWanGormStore) BaseUpdate

func (igs *AppWanGormStore) BaseUpdate(e BaseDbModel) error

func (*AppWanGormStore) Create

func (igs *AppWanGormStore) Create(e *AppWan) (string, error)

func (*AppWanGormStore) DeleteById

func (igs *AppWanGormStore) DeleteById(id string) error

func (*AppWanGormStore) DeleteWhere

func (igs *AppWanGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*AppWanGormStore) EntityName

func (igs *AppWanGormStore) EntityName() string

func (*AppWanGormStore) IdentifierMap

func (igs *AppWanGormStore) IdentifierMap() *predicate.IdentifierMap

func (*AppWanGormStore) LoadList

func (igs *AppWanGormStore) LoadList(qo *QueryOptions) ([]*AppWan, error)

func (*AppWanGormStore) LoadOne

func (igs *AppWanGormStore) LoadOne(p *predicate.Predicate, pl *Preloads) (*AppWan, error)

func (*AppWanGormStore) LoadOneById

func (igs *AppWanGormStore) LoadOneById(id string, pl *Preloads) (*AppWan, error)

func (*AppWanGormStore) LoadOneByName

func (igs *AppWanGormStore) LoadOneByName(name string, pl *Preloads) (*AppWan, error)

func (*AppWanGormStore) Patch

func (igs *AppWanGormStore) Patch(e *AppWan) error

func (*AppWanGormStore) PluralEntityName

func (igs *AppWanGormStore) PluralEntityName() string

func (*AppWanGormStore) StatsList

func (igs *AppWanGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*AppWanGormStore) Update

func (igs *AppWanGormStore) Update(e *AppWan) error

type AppWanStore

type AppWanStore interface {
	LoadOneById(id string, pl *Preloads) (*AppWan, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*AppWan, error)
	LoadOneByName(name string, pl *Preloads) (*AppWan, error)
	LoadList(qo *QueryOptions) ([]*AppWan, error)
	Create(e *AppWan) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *AppWan) error
	Patch(e *AppWan) error
	Store
}

type AuthStore

type AuthStore interface {
	LoadOneById(id string, pl *Preloads) (*AuthenticatorCert, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*AuthenticatorCert, error)
	LoadOneByName(name string, pl *Preloads) (*AuthenticatorCert, error)
	BaseLoadOneByAuthenticatorId(authId string, pl *Preloads) (BaseDbModel, error)
	LoadOneByAuthenticatorId(authId string, pl *Preloads) (*AuthenticatorCert, error)
	LoadList(qo *QueryOptions) ([]*AuthenticatorCert, error)
	Create(e *AuthenticatorCert) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	DeleteWhereWithTx(tx *gorm.DB, p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *AuthenticatorCert) error
	Patch(e *AuthenticatorCert) error
	Store
}

type Authenticator

type Authenticator struct {
	BaseDbEntity
	IdentityID *string
	Method     *string
}

func (*Authenticator) BeforeDelete

func (e *Authenticator) BeforeDelete(tx *gorm.DB) error

type AuthenticatorCert

type AuthenticatorCert struct {
	BaseDbEntity
	Fingerprint     *string
	AuthenticatorId *string
	Authenticator   *Authenticator
}

type AuthenticatorCertGormStore

type AuthenticatorCertGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewAuthenticatorCertGormStore

func NewAuthenticatorCertGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *AuthenticatorCertGormStore

func (*AuthenticatorCertGormStore) BaseCreate

func (igs *AuthenticatorCertGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*AuthenticatorCertGormStore) BaseDeleteById

func (igs *AuthenticatorCertGormStore) BaseDeleteById(id string) error

func (*AuthenticatorCertGormStore) BaseDeleteWhere

func (igs *AuthenticatorCertGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*AuthenticatorCertGormStore) BaseIdentifierMap

func (igs *AuthenticatorCertGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*AuthenticatorCertGormStore) BaseLoadList

func (igs *AuthenticatorCertGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*AuthenticatorCertGormStore) BaseLoadOne

func (*AuthenticatorCertGormStore) BaseLoadOneByAuthenticatorId

func (igs *AuthenticatorCertGormStore) BaseLoadOneByAuthenticatorId(authId string, pl *Preloads) (BaseDbModel, error)

func (*AuthenticatorCertGormStore) BaseLoadOneById

func (igs *AuthenticatorCertGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*AuthenticatorCertGormStore) BasePatch

func (igs *AuthenticatorCertGormStore) BasePatch(e BaseDbModel) error

func (*AuthenticatorCertGormStore) BaseStatsList

func (igs *AuthenticatorCertGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*AuthenticatorCertGormStore) BaseUpdate

func (igs *AuthenticatorCertGormStore) BaseUpdate(e BaseDbModel) error

func (*AuthenticatorCertGormStore) Create

func (*AuthenticatorCertGormStore) DeleteById

func (igs *AuthenticatorCertGormStore) DeleteById(id string) error

func (*AuthenticatorCertGormStore) DeleteWhere

func (igs *AuthenticatorCertGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*AuthenticatorCertGormStore) DeleteWhereWithTx

func (igs *AuthenticatorCertGormStore) DeleteWhereWithTx(tx *gorm.DB, p *predicate.Predicate) (int64, error)

func (*AuthenticatorCertGormStore) EntityName

func (igs *AuthenticatorCertGormStore) EntityName() string

func (*AuthenticatorCertGormStore) IdentifierMap

func (igs *AuthenticatorCertGormStore) IdentifierMap() *predicate.IdentifierMap

func (*AuthenticatorCertGormStore) LoadList

func (*AuthenticatorCertGormStore) LoadOne

func (*AuthenticatorCertGormStore) LoadOneByAuthenticatorId

func (igs *AuthenticatorCertGormStore) LoadOneByAuthenticatorId(authId string, pl *Preloads) (*AuthenticatorCert, error)

func (*AuthenticatorCertGormStore) LoadOneById

func (igs *AuthenticatorCertGormStore) LoadOneById(id string, pl *Preloads) (*AuthenticatorCert, error)

func (*AuthenticatorCertGormStore) LoadOneByName

func (igs *AuthenticatorCertGormStore) LoadOneByName(name string, pl *Preloads) (*AuthenticatorCert, error)

func (*AuthenticatorCertGormStore) Patch

func (*AuthenticatorCertGormStore) PluralEntityName

func (igs *AuthenticatorCertGormStore) PluralEntityName() string

func (*AuthenticatorCertGormStore) StatsList

func (igs *AuthenticatorCertGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*AuthenticatorCertGormStore) Update

type AuthenticatorDeleteHandler

type AuthenticatorDeleteHandler func(tx *gorm.DB, i *Authenticator) error

type AuthenticatorGormStore

type AuthenticatorGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewAuthenticatorGormStore

func NewAuthenticatorGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *AuthenticatorGormStore

func (*AuthenticatorGormStore) BaseCreate

func (igs *AuthenticatorGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*AuthenticatorGormStore) BaseDeleteById

func (igs *AuthenticatorGormStore) BaseDeleteById(id string) error

func (*AuthenticatorGormStore) BaseDeleteWhere

func (igs *AuthenticatorGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*AuthenticatorGormStore) BaseIdentifierMap

func (igs *AuthenticatorGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*AuthenticatorGormStore) BaseLoadList

func (igs *AuthenticatorGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*AuthenticatorGormStore) BaseLoadOne

func (igs *AuthenticatorGormStore) BaseLoadOne(p *predicate.Predicate, pl *Preloads) (BaseDbModel, error)

func (*AuthenticatorGormStore) BaseLoadOneById

func (igs *AuthenticatorGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*AuthenticatorGormStore) BasePatch

func (igs *AuthenticatorGormStore) BasePatch(e BaseDbModel) error

func (*AuthenticatorGormStore) BaseStatsList

func (igs *AuthenticatorGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*AuthenticatorGormStore) BaseUpdate

func (igs *AuthenticatorGormStore) BaseUpdate(e BaseDbModel) error

func (*AuthenticatorGormStore) Create

func (igs *AuthenticatorGormStore) Create(e *Authenticator) (string, error)

func (*AuthenticatorGormStore) DeleteById

func (igs *AuthenticatorGormStore) DeleteById(id string) error

func (*AuthenticatorGormStore) DeleteWhere

func (igs *AuthenticatorGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*AuthenticatorGormStore) EntityName

func (igs *AuthenticatorGormStore) EntityName() string

func (*AuthenticatorGormStore) IdentifierMap

func (igs *AuthenticatorGormStore) IdentifierMap() *predicate.IdentifierMap

func (*AuthenticatorGormStore) LoadList

func (igs *AuthenticatorGormStore) LoadList(qo *QueryOptions) ([]*Authenticator, error)

func (*AuthenticatorGormStore) LoadOne

func (*AuthenticatorGormStore) LoadOneById

func (igs *AuthenticatorGormStore) LoadOneById(id string, pl *Preloads) (*Authenticator, error)

func (*AuthenticatorGormStore) LoadOneByName

func (igs *AuthenticatorGormStore) LoadOneByName(name string, pl *Preloads) (*Authenticator, error)

func (*AuthenticatorGormStore) Patch

func (*AuthenticatorGormStore) PluralEntityName

func (igs *AuthenticatorGormStore) PluralEntityName() string

func (*AuthenticatorGormStore) StatsList

func (igs *AuthenticatorGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*AuthenticatorGormStore) Update

func (igs *AuthenticatorGormStore) Update(e *Authenticator) error

type AuthenticatorHandlers

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

func (*AuthenticatorHandlers) AddDeleteHandler

func (ih *AuthenticatorHandlers) AddDeleteHandler(handler AuthenticatorDeleteHandler)

func (*AuthenticatorHandlers) Delete

func (ih *AuthenticatorHandlers) Delete(tx *gorm.DB, i *Authenticator) error

type AuthenticatorStore

type AuthenticatorStore interface {
	LoadOneById(id string, pl *Preloads) (*Authenticator, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*Authenticator, error)
	LoadOneByName(name string, pl *Preloads) (*Authenticator, error)
	LoadList(qo *QueryOptions) ([]*Authenticator, error)
	Create(e *Authenticator) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *Authenticator) error
	Patch(e *Authenticator) error
	Store
}

type AuthenticatorUpdb

type AuthenticatorUpdb struct {
	BaseDbEntity
	AuthenticatorId *string
	Authenticator   *Authenticator
	Username        *string
	Password        *string
	Salt            *string
}

type AuthenticatorUpdbGormStore

type AuthenticatorUpdbGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewAuthenticatorUpdbGormStore

func NewAuthenticatorUpdbGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *AuthenticatorUpdbGormStore

func (*AuthenticatorUpdbGormStore) BaseCreate

func (igs *AuthenticatorUpdbGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*AuthenticatorUpdbGormStore) BaseDeleteById

func (igs *AuthenticatorUpdbGormStore) BaseDeleteById(id string) error

func (*AuthenticatorUpdbGormStore) BaseDeleteWhere

func (igs *AuthenticatorUpdbGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*AuthenticatorUpdbGormStore) BaseIdentifierMap

func (igs *AuthenticatorUpdbGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*AuthenticatorUpdbGormStore) BaseLoadList

func (igs *AuthenticatorUpdbGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*AuthenticatorUpdbGormStore) BaseLoadOne

func (*AuthenticatorUpdbGormStore) BaseLoadOneByAuthenticatorId

func (igs *AuthenticatorUpdbGormStore) BaseLoadOneByAuthenticatorId(authId string, pl *Preloads) (BaseDbModel, error)

func (*AuthenticatorUpdbGormStore) BaseLoadOneById

func (igs *AuthenticatorUpdbGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*AuthenticatorUpdbGormStore) BasePatch

func (igs *AuthenticatorUpdbGormStore) BasePatch(e BaseDbModel) error

func (*AuthenticatorUpdbGormStore) BaseStatsList

func (igs *AuthenticatorUpdbGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*AuthenticatorUpdbGormStore) BaseUpdate

func (igs *AuthenticatorUpdbGormStore) BaseUpdate(e BaseDbModel) error

func (*AuthenticatorUpdbGormStore) Create

func (*AuthenticatorUpdbGormStore) DeleteById

func (igs *AuthenticatorUpdbGormStore) DeleteById(id string) error

func (*AuthenticatorUpdbGormStore) DeleteWhere

func (igs *AuthenticatorUpdbGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*AuthenticatorUpdbGormStore) EntityName

func (igs *AuthenticatorUpdbGormStore) EntityName() string

func (*AuthenticatorUpdbGormStore) IdentifierMap

func (igs *AuthenticatorUpdbGormStore) IdentifierMap() *predicate.IdentifierMap

func (*AuthenticatorUpdbGormStore) LoadList

func (*AuthenticatorUpdbGormStore) LoadOne

func (*AuthenticatorUpdbGormStore) LoadOneByAuthenticatorId

func (igs *AuthenticatorUpdbGormStore) LoadOneByAuthenticatorId(authId string, pl *Preloads) (*AuthenticatorUpdb, error)

func (*AuthenticatorUpdbGormStore) LoadOneById

func (igs *AuthenticatorUpdbGormStore) LoadOneById(id string, pl *Preloads) (*AuthenticatorUpdb, error)

func (*AuthenticatorUpdbGormStore) LoadOneByIdentityId

func (igs *AuthenticatorUpdbGormStore) LoadOneByIdentityId(identId string, pl *Preloads) (*AuthenticatorUpdb, error)

func (*AuthenticatorUpdbGormStore) LoadOneByName

func (igs *AuthenticatorUpdbGormStore) LoadOneByName(name string, pl *Preloads) (*AuthenticatorUpdb, error)

func (*AuthenticatorUpdbGormStore) Patch

func (*AuthenticatorUpdbGormStore) PluralEntityName

func (igs *AuthenticatorUpdbGormStore) PluralEntityName() string

func (*AuthenticatorUpdbGormStore) StatsList

func (igs *AuthenticatorUpdbGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*AuthenticatorUpdbGormStore) Update

type AuthenticatorUpdbStore

type AuthenticatorUpdbStore interface {
	LoadOneById(id string, pl *Preloads) (*AuthenticatorUpdb, error)
	BaseLoadOneByAuthenticatorId(authId string, pl *Preloads) (BaseDbModel, error)
	LoadOneByAuthenticatorId(authId string, pl *Preloads) (*AuthenticatorUpdb, error)
	LoadOneByIdentityId(identId string, pl *Preloads) (*AuthenticatorUpdb, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*AuthenticatorUpdb, error)
	LoadOneByName(name string, pl *Preloads) (*AuthenticatorUpdb, error)
	LoadList(qo *QueryOptions) ([]*AuthenticatorUpdb, error)
	Create(e *AuthenticatorUpdb) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *AuthenticatorUpdb) error
	Patch(e *AuthenticatorUpdb) error
	Store
}

type BaseDbEntity

type BaseDbEntity struct {
	ID        string `gorm:"primary_key"`
	CreatedAt *time.Time
	UpdatedAt *time.Time
	Tags      *PropertyMap
}

func NewBaseDbEntity

func NewBaseDbEntity() BaseDbEntity

func (*BaseDbEntity) ClearAssociations

func (b *BaseDbEntity) ClearAssociations(typeEntity interface{}, tx *gorm.DB, columns ...string) error

func (*BaseDbEntity) GetId

func (b *BaseDbEntity) GetId() string

func (*BaseDbEntity) GetTags

func (b *BaseDbEntity) GetTags() *PropertyMap

func (*BaseDbEntity) SetId

func (b *BaseDbEntity) SetId(id string)

func (*BaseDbEntity) SetTags

func (b *BaseDbEntity) SetTags(tags *PropertyMap)

func (*BaseDbEntity) SetUpdatedAt

func (b *BaseDbEntity) SetUpdatedAt(t *time.Time)

type BaseDbModel

type BaseDbModel interface {
	GetId() string
	SetId(id string)
	SetUpdatedAt(t *time.Time)
	GetTags() *PropertyMap
	SetTags(tags *PropertyMap)
}

type Ca

type Ca struct {
	BaseDbEntity
	Name                      *string
	Fingerprint               *string
	CertPem                   *string
	IsVerified                *bool
	VerificationToken         *string
	IsAutoCaEnrollmentEnabled *bool
	IsOttCaEnrollmentEnabled  *bool
	IsAuthEnabled             *bool
}

func (*Ca) BeforeDelete

func (e *Ca) BeforeDelete(tx *gorm.DB) error

type CaDeleteHandler

type CaDeleteHandler func(tx *gorm.DB, ca *Ca) error

type CaGormStore

type CaGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewCaGormStore

func NewCaGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *CaGormStore

func (*CaGormStore) BaseCreate

func (igs *CaGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*CaGormStore) BaseDeleteById

func (igs *CaGormStore) BaseDeleteById(id string) error

func (*CaGormStore) BaseDeleteWhere

func (igs *CaGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*CaGormStore) BaseIdentifierMap

func (igs *CaGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*CaGormStore) BaseLoadList

func (igs *CaGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*CaGormStore) BaseLoadOne

func (igs *CaGormStore) BaseLoadOne(p *predicate.Predicate, pl *Preloads) (BaseDbModel, error)

func (*CaGormStore) BaseLoadOneById

func (igs *CaGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*CaGormStore) BasePatch

func (igs *CaGormStore) BasePatch(e BaseDbModel) error

func (*CaGormStore) BaseStatsList

func (igs *CaGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*CaGormStore) BaseUpdate

func (igs *CaGormStore) BaseUpdate(e BaseDbModel) error

func (*CaGormStore) Create

func (igs *CaGormStore) Create(e *Ca) (string, error)

func (*CaGormStore) DeleteById

func (igs *CaGormStore) DeleteById(id string) error

func (*CaGormStore) DeleteWhere

func (igs *CaGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*CaGormStore) EntityName

func (igs *CaGormStore) EntityName() string

func (*CaGormStore) IdentifierMap

func (igs *CaGormStore) IdentifierMap() *predicate.IdentifierMap

func (*CaGormStore) LoadList

func (igs *CaGormStore) LoadList(qo *QueryOptions) ([]*Ca, error)

func (*CaGormStore) LoadOne

func (igs *CaGormStore) LoadOne(p *predicate.Predicate, pl *Preloads) (*Ca, error)

func (*CaGormStore) LoadOneById

func (igs *CaGormStore) LoadOneById(id string, pl *Preloads) (*Ca, error)

func (*CaGormStore) LoadOneByName

func (igs *CaGormStore) LoadOneByName(name string, pl *Preloads) (*Ca, error)

func (*CaGormStore) Patch

func (igs *CaGormStore) Patch(e *Ca) error

func (*CaGormStore) PluralEntityName

func (igs *CaGormStore) PluralEntityName() string

func (*CaGormStore) StatsList

func (igs *CaGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*CaGormStore) Update

func (igs *CaGormStore) Update(e *Ca) error

type CaHandlers

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

func (*CaHandlers) AddDeleteHandler

func (cah *CaHandlers) AddDeleteHandler(handler CaDeleteHandler)

func (*CaHandlers) Delete

func (cah *CaHandlers) Delete(tx *gorm.DB, ca *Ca) error

type CaStore

type CaStore interface {
	LoadOneById(id string, pl *Preloads) (*Ca, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*Ca, error)
	LoadOneByName(name string, pl *Preloads) (*Ca, error)
	LoadList(qo *QueryOptions) ([]*Ca, error)
	Create(e *Ca) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *Ca) error
	Patch(e *Ca) error
	Store
}

type Cluster

type Cluster struct {
	BaseDbEntity
	Name     *string
	Gateways []*Gateway `gorm:"PRELOAD:false"`
}

func (*Cluster) BeforeDelete

func (e *Cluster) BeforeDelete(tx *gorm.DB) error

type ClusterGormStore

type ClusterGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewClusterGormStore

func NewClusterGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *ClusterGormStore

func (*ClusterGormStore) BaseCreate

func (igs *ClusterGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*ClusterGormStore) BaseDeleteById

func (igs *ClusterGormStore) BaseDeleteById(id string) error

func (*ClusterGormStore) BaseDeleteWhere

func (igs *ClusterGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*ClusterGormStore) BaseIdentifierMap

func (igs *ClusterGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*ClusterGormStore) BaseLoadList

func (igs *ClusterGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*ClusterGormStore) BaseLoadOne

func (igs *ClusterGormStore) BaseLoadOne(p *predicate.Predicate, pl *Preloads) (BaseDbModel, error)

func (*ClusterGormStore) BaseLoadOneById

func (igs *ClusterGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*ClusterGormStore) BasePatch

func (igs *ClusterGormStore) BasePatch(e BaseDbModel) error

func (*ClusterGormStore) BaseStatsList

func (igs *ClusterGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*ClusterGormStore) BaseUpdate

func (igs *ClusterGormStore) BaseUpdate(e BaseDbModel) error

func (*ClusterGormStore) Create

func (igs *ClusterGormStore) Create(e *Cluster) (string, error)

func (*ClusterGormStore) DeleteById

func (igs *ClusterGormStore) DeleteById(id string) error

func (*ClusterGormStore) DeleteWhere

func (igs *ClusterGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*ClusterGormStore) EntityName

func (igs *ClusterGormStore) EntityName() string

func (*ClusterGormStore) IdentifierMap

func (igs *ClusterGormStore) IdentifierMap() *predicate.IdentifierMap

func (*ClusterGormStore) LoadList

func (igs *ClusterGormStore) LoadList(qo *QueryOptions) ([]*Cluster, error)

func (*ClusterGormStore) LoadOne

func (igs *ClusterGormStore) LoadOne(p *predicate.Predicate, pl *Preloads) (*Cluster, error)

func (*ClusterGormStore) LoadOneById

func (igs *ClusterGormStore) LoadOneById(id string, pl *Preloads) (*Cluster, error)

func (*ClusterGormStore) LoadOneByName

func (igs *ClusterGormStore) LoadOneByName(name string, pl *Preloads) (*Cluster, error)

func (*ClusterGormStore) Patch

func (igs *ClusterGormStore) Patch(e *Cluster) error

func (*ClusterGormStore) PluralEntityName

func (igs *ClusterGormStore) PluralEntityName() string

func (*ClusterGormStore) StatsList

func (igs *ClusterGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*ClusterGormStore) Update

func (igs *ClusterGormStore) Update(e *Cluster) error

type ClusterStore

type ClusterStore interface {
	LoadOneById(id string, pl *Preloads) (*Cluster, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*Cluster, error)
	LoadOneByName(name string, pl *Preloads) (*Cluster, error)
	LoadList(qo *QueryOptions) ([]*Cluster, error)
	Create(e *Cluster) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *Cluster) error
	Patch(e *Cluster) error
	Store
}

type CreateStore

type CreateStore interface {
	BaseCreate(e BaseDbModel) (string, error)
}

type CrudEventDetails

type CrudEventDetails struct {
	Entities       []BaseDbModel
	QueryResult    *QueryResult
	FieldsAffected []string
}

func NewCrudEventDetails

func NewCrudEventDetails(qr *QueryResult, entities ...BaseDbModel) *CrudEventDetails

type EnrollStore

type EnrollStore interface {
	LoadOneById(id string, pl *Preloads) (*EnrollmentCert, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*EnrollmentCert, error)
	LoadOneByName(name string, pl *Preloads) (*EnrollmentCert, error)
	BaseLoadOneByEnrollmentId(enrollId string, pl *Preloads) (BaseDbModel, error)
	LoadOneByEnrollmentId(enrollId string, pl *Preloads) (*EnrollmentCert, error)
	LoadList(qo *QueryOptions) ([]*EnrollmentCert, error)
	Create(e *EnrollmentCert) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	DeleteWhereWithTx(tx *gorm.DB, p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *EnrollmentCert) error
	Patch(e *EnrollmentCert) error
	Store
}

type Enrollment

type Enrollment struct {
	BaseDbEntity
	IdentityID *string
	Token      *string
	Method     *string
	Config     interface{}                          `gorm:"-"`
	Enroll     func(i *Identity, tx *gorm.DB) error `gorm:"-"`
	ExpiresAt  *time.Time
}

func (*Enrollment) BeforeDelete

func (e *Enrollment) BeforeDelete(tx *gorm.DB) error

type EnrollmentCert

type EnrollmentCert struct {
	BaseDbEntity
	EnrollmentID *string
	CaID         *string
	Ca           *Ca
	Jwt          *string
}

type EnrollmentCertGormStore

type EnrollmentCertGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewEnrollmentCertGormStore

func NewEnrollmentCertGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *EnrollmentCertGormStore

func (*EnrollmentCertGormStore) BaseCreate

func (igs *EnrollmentCertGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*EnrollmentCertGormStore) BaseDeleteById

func (igs *EnrollmentCertGormStore) BaseDeleteById(id string) error

func (*EnrollmentCertGormStore) BaseDeleteWhere

func (igs *EnrollmentCertGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*EnrollmentCertGormStore) BaseIdentifierMap

func (igs *EnrollmentCertGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*EnrollmentCertGormStore) BaseLoadList

func (igs *EnrollmentCertGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*EnrollmentCertGormStore) BaseLoadOne

func (*EnrollmentCertGormStore) BaseLoadOneByEnrollmentId

func (igs *EnrollmentCertGormStore) BaseLoadOneByEnrollmentId(enrollId string, pl *Preloads) (BaseDbModel, error)

func (*EnrollmentCertGormStore) BaseLoadOneById

func (igs *EnrollmentCertGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*EnrollmentCertGormStore) BasePatch

func (igs *EnrollmentCertGormStore) BasePatch(e BaseDbModel) error

func (*EnrollmentCertGormStore) BaseStatsList

func (igs *EnrollmentCertGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*EnrollmentCertGormStore) BaseUpdate

func (igs *EnrollmentCertGormStore) BaseUpdate(e BaseDbModel) error

func (*EnrollmentCertGormStore) Create

func (*EnrollmentCertGormStore) DeleteById

func (igs *EnrollmentCertGormStore) DeleteById(id string) error

func (*EnrollmentCertGormStore) DeleteWhere

func (igs *EnrollmentCertGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*EnrollmentCertGormStore) DeleteWhereWithTx

func (igs *EnrollmentCertGormStore) DeleteWhereWithTx(tx *gorm.DB, p *predicate.Predicate) (int64, error)

func (*EnrollmentCertGormStore) EntityName

func (igs *EnrollmentCertGormStore) EntityName() string

func (*EnrollmentCertGormStore) IdentifierMap

func (igs *EnrollmentCertGormStore) IdentifierMap() *predicate.IdentifierMap

func (*EnrollmentCertGormStore) LoadList

func (igs *EnrollmentCertGormStore) LoadList(qo *QueryOptions) ([]*EnrollmentCert, error)

func (*EnrollmentCertGormStore) LoadOne

func (*EnrollmentCertGormStore) LoadOneByEnrollmentId

func (igs *EnrollmentCertGormStore) LoadOneByEnrollmentId(enrollId string, pl *Preloads) (*EnrollmentCert, error)

func (*EnrollmentCertGormStore) LoadOneById

func (igs *EnrollmentCertGormStore) LoadOneById(id string, pl *Preloads) (*EnrollmentCert, error)

func (*EnrollmentCertGormStore) LoadOneByName

func (igs *EnrollmentCertGormStore) LoadOneByName(name string, pl *Preloads) (*EnrollmentCert, error)

func (*EnrollmentCertGormStore) Patch

func (*EnrollmentCertGormStore) PluralEntityName

func (igs *EnrollmentCertGormStore) PluralEntityName() string

func (*EnrollmentCertGormStore) StatsList

func (igs *EnrollmentCertGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*EnrollmentCertGormStore) Update

type EnrollmentCertStore

type EnrollmentCertStore interface {
	LoadOneById(id string, pl *Preloads) (*EnrollmentCert, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*EnrollmentCert, error)
	LoadOneByName(name string, pl *Preloads) (*EnrollmentCert, error)
	BaseLoadOneByEnrollmentId(enrollId string, pl *Preloads) (BaseDbModel, error)
	LoadOneByEnrollmentId(enrollId string, pl *Preloads) (*EnrollmentCert, error)
	LoadList(qo *QueryOptions) ([]*EnrollmentCert, error)
	Create(e *EnrollmentCert) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	DeleteWhereWithTx(tx *gorm.DB, p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *EnrollmentCert) error
	Patch(e *EnrollmentCert) error
	Store
}

type EnrollmentDeleteHandler

type EnrollmentDeleteHandler func(tx *gorm.DB, i *Enrollment) error

type EnrollmentGormStore

type EnrollmentGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewEnrollmentGormStore

func NewEnrollmentGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *EnrollmentGormStore

func (*EnrollmentGormStore) BaseCreate

func (igs *EnrollmentGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*EnrollmentGormStore) BaseDeleteById

func (igs *EnrollmentGormStore) BaseDeleteById(id string) error

func (*EnrollmentGormStore) BaseDeleteWhere

func (igs *EnrollmentGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*EnrollmentGormStore) BaseIdentifierMap

func (igs *EnrollmentGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*EnrollmentGormStore) BaseLoadList

func (igs *EnrollmentGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*EnrollmentGormStore) BaseLoadOne

func (igs *EnrollmentGormStore) BaseLoadOne(p *predicate.Predicate, pl *Preloads) (BaseDbModel, error)

func (*EnrollmentGormStore) BaseLoadOneById

func (igs *EnrollmentGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*EnrollmentGormStore) BasePatch

func (igs *EnrollmentGormStore) BasePatch(e BaseDbModel) error

func (*EnrollmentGormStore) BaseStatsList

func (igs *EnrollmentGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*EnrollmentGormStore) BaseUpdate

func (igs *EnrollmentGormStore) BaseUpdate(e BaseDbModel) error

func (*EnrollmentGormStore) Create

func (igs *EnrollmentGormStore) Create(e *Enrollment) (string, error)

func (*EnrollmentGormStore) DeleteById

func (igs *EnrollmentGormStore) DeleteById(id string) error

func (*EnrollmentGormStore) DeleteWhere

func (igs *EnrollmentGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*EnrollmentGormStore) EntityName

func (igs *EnrollmentGormStore) EntityName() string

func (*EnrollmentGormStore) IdentifierMap

func (igs *EnrollmentGormStore) IdentifierMap() *predicate.IdentifierMap

func (*EnrollmentGormStore) LoadList

func (igs *EnrollmentGormStore) LoadList(qo *QueryOptions) ([]*Enrollment, error)

func (*EnrollmentGormStore) LoadOne

func (igs *EnrollmentGormStore) LoadOne(p *predicate.Predicate, pl *Preloads) (*Enrollment, error)

func (*EnrollmentGormStore) LoadOneById

func (igs *EnrollmentGormStore) LoadOneById(id string, pl *Preloads) (*Enrollment, error)

func (*EnrollmentGormStore) LoadOneByName

func (igs *EnrollmentGormStore) LoadOneByName(name string, pl *Preloads) (*Enrollment, error)

func (*EnrollmentGormStore) LoadOneByToken

func (igs *EnrollmentGormStore) LoadOneByToken(token string, pl *Preloads) (*Enrollment, error)

func (*EnrollmentGormStore) Patch

func (igs *EnrollmentGormStore) Patch(e *Enrollment) error

func (*EnrollmentGormStore) PluralEntityName

func (igs *EnrollmentGormStore) PluralEntityName() string

func (*EnrollmentGormStore) StatsList

func (igs *EnrollmentGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*EnrollmentGormStore) Update

func (igs *EnrollmentGormStore) Update(e *Enrollment) error

type EnrollmentHandlers

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

func (*EnrollmentHandlers) AddDeleteHandler

func (ih *EnrollmentHandlers) AddDeleteHandler(handler EnrollmentDeleteHandler)

func (*EnrollmentHandlers) Delete

func (ih *EnrollmentHandlers) Delete(tx *gorm.DB, i *Enrollment) error

type EnrollmentStore

type EnrollmentStore interface {
	LoadOneById(id string, pl *Preloads) (*Enrollment, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*Enrollment, error)
	LoadOneByName(name string, pl *Preloads) (*Enrollment, error)
	LoadOneByToken(token string, pl *Preloads) (*Enrollment, error)
	LoadList(qo *QueryOptions) ([]*Enrollment, error)
	Create(e *Enrollment) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *Enrollment) error
	Patch(e *Enrollment) error
	Store
}

type EnrollmentUpdb

type EnrollmentUpdb struct {
	BaseDbEntity
	EnrollmentID *string
	Username     *string
	Url          *string
}

type EnrollmentUpdbGormStore

type EnrollmentUpdbGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewEnrollmentUpdbGormStore

func NewEnrollmentUpdbGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *EnrollmentUpdbGormStore

func (*EnrollmentUpdbGormStore) BaseCreate

func (igs *EnrollmentUpdbGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*EnrollmentUpdbGormStore) BaseDeleteById

func (igs *EnrollmentUpdbGormStore) BaseDeleteById(id string) error

func (*EnrollmentUpdbGormStore) BaseDeleteWhere

func (igs *EnrollmentUpdbGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*EnrollmentUpdbGormStore) BaseIdentifierMap

func (igs *EnrollmentUpdbGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*EnrollmentUpdbGormStore) BaseLoadList

func (igs *EnrollmentUpdbGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*EnrollmentUpdbGormStore) BaseLoadOne

func (*EnrollmentUpdbGormStore) BaseLoadOneByEnrollmentId

func (igs *EnrollmentUpdbGormStore) BaseLoadOneByEnrollmentId(enrollid string, pl *Preloads) (BaseDbModel, error)

func (*EnrollmentUpdbGormStore) BaseLoadOneById

func (igs *EnrollmentUpdbGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*EnrollmentUpdbGormStore) BasePatch

func (igs *EnrollmentUpdbGormStore) BasePatch(e BaseDbModel) error

func (*EnrollmentUpdbGormStore) BaseStatsList

func (igs *EnrollmentUpdbGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*EnrollmentUpdbGormStore) BaseUpdate

func (igs *EnrollmentUpdbGormStore) BaseUpdate(e BaseDbModel) error

func (*EnrollmentUpdbGormStore) Create

func (*EnrollmentUpdbGormStore) DeleteById

func (igs *EnrollmentUpdbGormStore) DeleteById(id string) error

func (*EnrollmentUpdbGormStore) DeleteWhere

func (igs *EnrollmentUpdbGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*EnrollmentUpdbGormStore) DeleteWhereWithTx

func (igs *EnrollmentUpdbGormStore) DeleteWhereWithTx(tx *gorm.DB, p *predicate.Predicate) (int64, error)

func (*EnrollmentUpdbGormStore) EntityName

func (igs *EnrollmentUpdbGormStore) EntityName() string

func (*EnrollmentUpdbGormStore) IdentifierMap

func (igs *EnrollmentUpdbGormStore) IdentifierMap() *predicate.IdentifierMap

func (*EnrollmentUpdbGormStore) LoadList

func (igs *EnrollmentUpdbGormStore) LoadList(qo *QueryOptions) ([]*EnrollmentUpdb, error)

func (*EnrollmentUpdbGormStore) LoadOne

func (*EnrollmentUpdbGormStore) LoadOneByEnrollmentId

func (igs *EnrollmentUpdbGormStore) LoadOneByEnrollmentId(enrollId string, pl *Preloads) (*EnrollmentUpdb, error)

func (*EnrollmentUpdbGormStore) LoadOneById

func (igs *EnrollmentUpdbGormStore) LoadOneById(id string, pl *Preloads) (*EnrollmentUpdb, error)

func (*EnrollmentUpdbGormStore) LoadOneByName

func (igs *EnrollmentUpdbGormStore) LoadOneByName(name string, pl *Preloads) (*EnrollmentUpdb, error)

func (*EnrollmentUpdbGormStore) Patch

func (*EnrollmentUpdbGormStore) PluralEntityName

func (igs *EnrollmentUpdbGormStore) PluralEntityName() string

func (*EnrollmentUpdbGormStore) StatsList

func (igs *EnrollmentUpdbGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*EnrollmentUpdbGormStore) Update

type EnrollmentUpdbStore

type EnrollmentUpdbStore interface {
	LoadOneById(id string, pl *Preloads) (*EnrollmentUpdb, error)
	BaseLoadOneByEnrollmentId(enrollId string, pl *Preloads) (BaseDbModel, error)
	LoadOneByEnrollmentId(enrollId string, pl *Preloads) (*EnrollmentUpdb, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*EnrollmentUpdb, error)
	LoadOneByName(name string, pl *Preloads) (*EnrollmentUpdb, error)
	LoadList(qo *QueryOptions) ([]*EnrollmentUpdb, error)
	Create(e *EnrollmentUpdb) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	DeleteWhereWithTx(tx *gorm.DB, p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *EnrollmentUpdb) error
	Patch(e *EnrollmentUpdb) error
	Store
}

type EventLog

type EventLog struct {
	BaseDbEntity
	Type             string
	ActorType        string
	ActorId          string
	EntityType       string
	EntityId         string
	FormattedMessage string
	FormatString     string
	FormatData       string
	Data             PropertyMap
}

type EventLogGormStore

type EventLogGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewEventLogGormStore

func NewEventLogGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *EventLogGormStore

func (*EventLogGormStore) BaseCreate

func (igs *EventLogGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*EventLogGormStore) BaseDeleteById

func (igs *EventLogGormStore) BaseDeleteById(id string) error

func (*EventLogGormStore) BaseDeleteWhere

func (igs *EventLogGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*EventLogGormStore) BaseIdentifierMap

func (igs *EventLogGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*EventLogGormStore) BaseLoadList

func (igs *EventLogGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*EventLogGormStore) BaseLoadOne

func (igs *EventLogGormStore) BaseLoadOne(p *predicate.Predicate, pl *Preloads) (BaseDbModel, error)

func (*EventLogGormStore) BaseLoadOneById

func (igs *EventLogGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*EventLogGormStore) BasePatch

func (igs *EventLogGormStore) BasePatch(e BaseDbModel) error

func (*EventLogGormStore) BaseStatsList

func (igs *EventLogGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*EventLogGormStore) BaseUpdate

func (igs *EventLogGormStore) BaseUpdate(e BaseDbModel) error

func (*EventLogGormStore) Create

func (igs *EventLogGormStore) Create(e *EventLog) (string, error)

func (*EventLogGormStore) DeleteById

func (igs *EventLogGormStore) DeleteById(id string) error

func (*EventLogGormStore) DeleteWhere

func (igs *EventLogGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*EventLogGormStore) EntityName

func (igs *EventLogGormStore) EntityName() string

func (*EventLogGormStore) IdentifierMap

func (igs *EventLogGormStore) IdentifierMap() *predicate.IdentifierMap

func (*EventLogGormStore) LoadList

func (igs *EventLogGormStore) LoadList(qo *QueryOptions) ([]*EventLog, error)

func (*EventLogGormStore) LoadOne

func (igs *EventLogGormStore) LoadOne(p *predicate.Predicate, pl *Preloads) (*EventLog, error)

func (*EventLogGormStore) LoadOneById

func (igs *EventLogGormStore) LoadOneById(id string, pl *Preloads) (*EventLog, error)

func (*EventLogGormStore) LoadOneByName

func (igs *EventLogGormStore) LoadOneByName(name string, pl *Preloads) (*EventLog, error)

func (*EventLogGormStore) LoadOneByToken

func (igs *EventLogGormStore) LoadOneByToken(token string, pl *Preloads) (*EventLog, error)

func (*EventLogGormStore) Patch

func (igs *EventLogGormStore) Patch(e *EventLog) error

func (*EventLogGormStore) PluralEntityName

func (igs *EventLogGormStore) PluralEntityName() string

func (*EventLogGormStore) StatsList

func (igs *EventLogGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*EventLogGormStore) Update

func (igs *EventLogGormStore) Update(e *EventLog) error

type EventLogStore

type EventLogStore interface {
	LoadOneById(id string, pl *Preloads) (*EventLog, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*EventLog, error)
	LoadOneByName(name string, pl *Preloads) (*EventLog, error)
	LoadOneByToken(token string, pl *Preloads) (*EventLog, error)
	LoadList(qo *QueryOptions) ([]*EventLog, error)
	Create(e *EventLog) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *EventLog) error
	Patch(e *EventLog) error
	Store
}

type Gateway

type Gateway struct {
	BaseDbEntity
	Name                *string
	Fingerprint         *string
	CertPem             *string
	ClusterID           *string
	Cluster             *Cluster
	IsVerified          *bool
	EnrollmentToken     *string
	Hostname            *string `gorm:"-"`
	EnrollmentJwt       *string
	EnrollmentCreatedAt *time.Time
	EnrollmentExpiresAt *time.Time
	GatewayProtocols    map[string]string `gorm:"-"`
}

type GatewayGormStore

type GatewayGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewGatewayGormStore

func NewGatewayGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *GatewayGormStore

func (*GatewayGormStore) BaseCreate

func (igs *GatewayGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*GatewayGormStore) BaseDeleteById

func (igs *GatewayGormStore) BaseDeleteById(id string) error

func (*GatewayGormStore) BaseDeleteWhere

func (igs *GatewayGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*GatewayGormStore) BaseIdentifierMap

func (igs *GatewayGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*GatewayGormStore) BaseLoadList

func (igs *GatewayGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*GatewayGormStore) BaseLoadOne

func (igs *GatewayGormStore) BaseLoadOne(p *predicate.Predicate, pl *Preloads) (BaseDbModel, error)

func (*GatewayGormStore) BaseLoadOneById

func (igs *GatewayGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*GatewayGormStore) BasePatch

func (igs *GatewayGormStore) BasePatch(e BaseDbModel) error

func (*GatewayGormStore) BaseStatsList

func (igs *GatewayGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*GatewayGormStore) BaseUpdate

func (igs *GatewayGormStore) BaseUpdate(e BaseDbModel) error

func (*GatewayGormStore) Create

func (igs *GatewayGormStore) Create(e *Gateway) (string, error)

func (*GatewayGormStore) DeleteById

func (igs *GatewayGormStore) DeleteById(id string) error

func (*GatewayGormStore) DeleteWhere

func (igs *GatewayGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*GatewayGormStore) EntityName

func (igs *GatewayGormStore) EntityName() string

func (*GatewayGormStore) IdentifierMap

func (igs *GatewayGormStore) IdentifierMap() *predicate.IdentifierMap

func (*GatewayGormStore) LoadList

func (igs *GatewayGormStore) LoadList(qo *QueryOptions) ([]*Gateway, error)

func (*GatewayGormStore) LoadOne

func (igs *GatewayGormStore) LoadOne(p *predicate.Predicate, pl *Preloads) (*Gateway, error)

func (*GatewayGormStore) LoadOneById

func (igs *GatewayGormStore) LoadOneById(id string, pl *Preloads) (*Gateway, error)

func (*GatewayGormStore) LoadOneByName

func (igs *GatewayGormStore) LoadOneByName(name string, pl *Preloads) (*Gateway, error)

func (*GatewayGormStore) Patch

func (igs *GatewayGormStore) Patch(e *Gateway) error

func (*GatewayGormStore) PluralEntityName

func (igs *GatewayGormStore) PluralEntityName() string

func (*GatewayGormStore) StatsList

func (igs *GatewayGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*GatewayGormStore) Update

func (igs *GatewayGormStore) Update(e *Gateway) error

type GatewayStore

type GatewayStore interface {
	LoadOneById(id string, pl *Preloads) (*Gateway, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*Gateway, error)
	LoadOneByName(name string, pl *Preloads) (*Gateway, error)
	LoadList(qo *QueryOptions) ([]*Gateway, error)
	Create(e *Gateway) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *Gateway) error
	Patch(e *Gateway) error
	Store
}

type GeoRegion

type GeoRegion struct {
	BaseDbEntity
	Name *string
}

type GeoRegionGormStore

type GeoRegionGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewGeoRegionGormStore

func NewGeoRegionGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *GeoRegionGormStore

func (*GeoRegionGormStore) BaseCreate

func (igs *GeoRegionGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*GeoRegionGormStore) BaseDeleteById

func (igs *GeoRegionGormStore) BaseDeleteById(id string) error

func (*GeoRegionGormStore) BaseDeleteWhere

func (igs *GeoRegionGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*GeoRegionGormStore) BaseIdentifierMap

func (igs *GeoRegionGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*GeoRegionGormStore) BaseLoadList

func (igs *GeoRegionGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*GeoRegionGormStore) BaseLoadOne

func (igs *GeoRegionGormStore) BaseLoadOne(p *predicate.Predicate, pl *Preloads) (BaseDbModel, error)

func (*GeoRegionGormStore) BaseLoadOneById

func (igs *GeoRegionGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*GeoRegionGormStore) BasePatch

func (igs *GeoRegionGormStore) BasePatch(e BaseDbModel) error

func (*GeoRegionGormStore) BaseStatsList

func (igs *GeoRegionGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*GeoRegionGormStore) BaseUpdate

func (igs *GeoRegionGormStore) BaseUpdate(e BaseDbModel) error

func (*GeoRegionGormStore) Create

func (igs *GeoRegionGormStore) Create(e *GeoRegion) (string, error)

func (*GeoRegionGormStore) DeleteById

func (igs *GeoRegionGormStore) DeleteById(id string) error

func (*GeoRegionGormStore) DeleteWhere

func (igs *GeoRegionGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*GeoRegionGormStore) EntityName

func (igs *GeoRegionGormStore) EntityName() string

func (*GeoRegionGormStore) IdentifierMap

func (igs *GeoRegionGormStore) IdentifierMap() *predicate.IdentifierMap

func (*GeoRegionGormStore) LoadList

func (igs *GeoRegionGormStore) LoadList(qo *QueryOptions) ([]*GeoRegion, error)

func (*GeoRegionGormStore) LoadOne

func (igs *GeoRegionGormStore) LoadOne(p *predicate.Predicate, pl *Preloads) (*GeoRegion, error)

func (*GeoRegionGormStore) LoadOneById

func (igs *GeoRegionGormStore) LoadOneById(id string, pl *Preloads) (*GeoRegion, error)

func (*GeoRegionGormStore) LoadOneByName

func (igs *GeoRegionGormStore) LoadOneByName(name string, pl *Preloads) (*GeoRegion, error)

func (*GeoRegionGormStore) Patch

func (igs *GeoRegionGormStore) Patch(e *GeoRegion) error

func (*GeoRegionGormStore) PluralEntityName

func (igs *GeoRegionGormStore) PluralEntityName() string

func (*GeoRegionGormStore) StatsList

func (igs *GeoRegionGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*GeoRegionGormStore) Update

func (igs *GeoRegionGormStore) Update(e *GeoRegion) error

type GeoRegionStore

type GeoRegionStore interface {
	LoadOneById(id string, pl *Preloads) (*GeoRegion, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*GeoRegion, error)
	LoadOneByName(name string, pl *Preloads) (*GeoRegion, error)
	LoadList(qo *QueryOptions) ([]*GeoRegion, error)
	Create(e *GeoRegion) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *GeoRegion) error
	Patch(e *GeoRegion) error
	Store
}

type Identity

type Identity struct {
	BaseDbEntity
	Name           *string
	TypeID         *string `gorm:"column:identity_type_id"`
	Type           *IdentityType
	IsDefaultAdmin *bool
	IsAdmin        *bool
	Enrollments    []*Enrollment
	Authenticators []*Authenticator
	Permissions    []string  `gorm:"-"`
	AppWans        []*AppWan `gorm:"many2many:app_wan_identities"`
}

func (*Identity) AfterCreate

func (e *Identity) AfterCreate(tx *gorm.DB) error

func (*Identity) BeforeDelete

func (e *Identity) BeforeDelete(tx *gorm.DB) error

type IdentityDeleteHandler

type IdentityDeleteHandler func(tx *gorm.DB, i *Identity) error

type IdentityGormStore

type IdentityGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewIdentityGormStore

func NewIdentityGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *IdentityGormStore

func (*IdentityGormStore) BaseCreate

func (igs *IdentityGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*IdentityGormStore) BaseDeleteById

func (igs *IdentityGormStore) BaseDeleteById(id string) error

func (*IdentityGormStore) BaseDeleteWhere

func (igs *IdentityGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*IdentityGormStore) BaseIdentifierMap

func (igs *IdentityGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*IdentityGormStore) BaseLoadList

func (igs *IdentityGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*IdentityGormStore) BaseLoadOne

func (igs *IdentityGormStore) BaseLoadOne(p *predicate.Predicate, pl *Preloads) (BaseDbModel, error)

func (*IdentityGormStore) BaseLoadOneById

func (igs *IdentityGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*IdentityGormStore) BasePatch

func (igs *IdentityGormStore) BasePatch(e BaseDbModel) error

func (*IdentityGormStore) BaseStatsList

func (igs *IdentityGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*IdentityGormStore) BaseUpdate

func (igs *IdentityGormStore) BaseUpdate(e BaseDbModel) error

func (*IdentityGormStore) Create

func (igs *IdentityGormStore) Create(e *Identity) (string, error)

func (*IdentityGormStore) DeleteById

func (igs *IdentityGormStore) DeleteById(id string) error

func (*IdentityGormStore) DeleteWhere

func (igs *IdentityGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*IdentityGormStore) EntityName

func (igs *IdentityGormStore) EntityName() string

func (*IdentityGormStore) IdentifierMap

func (igs *IdentityGormStore) IdentifierMap() *predicate.IdentifierMap

func (*IdentityGormStore) LoadList

func (igs *IdentityGormStore) LoadList(qo *QueryOptions) ([]*Identity, error)

func (*IdentityGormStore) LoadOne

func (igs *IdentityGormStore) LoadOne(p *predicate.Predicate, pl *Preloads) (*Identity, error)

func (*IdentityGormStore) LoadOneById

func (igs *IdentityGormStore) LoadOneById(id string, pl *Preloads) (*Identity, error)

func (*IdentityGormStore) Patch

func (igs *IdentityGormStore) Patch(e *Identity) error

func (*IdentityGormStore) PluralEntityName

func (igs *IdentityGormStore) PluralEntityName() string

func (*IdentityGormStore) StatsList

func (igs *IdentityGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*IdentityGormStore) Update

func (igs *IdentityGormStore) Update(e *Identity) error

type IdentityHandlers

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

func (*IdentityHandlers) AddDeleteHandler

func (ih *IdentityHandlers) AddDeleteHandler(handler IdentityDeleteHandler)

func (*IdentityHandlers) Delete

func (ih *IdentityHandlers) Delete(tx *gorm.DB, i *Identity) error

type IdentityStore

type IdentityStore interface {
	LoadOneById(id string, pl *Preloads) (*Identity, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*Identity, error)
	LoadList(qo *QueryOptions) ([]*Identity, error)
	Create(e *Identity) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *Identity) error
	Patch(e *Identity) error
	Store
}

type IdentityType

type IdentityType struct {
	BaseDbEntity
	Name *string
}

type IdentityTypeGormStore

type IdentityTypeGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewIdentityTypeGormStore

func NewIdentityTypeGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *IdentityTypeGormStore

func (*IdentityTypeGormStore) BaseCreate

func (igs *IdentityTypeGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*IdentityTypeGormStore) BaseDeleteById

func (igs *IdentityTypeGormStore) BaseDeleteById(id string) error

func (*IdentityTypeGormStore) BaseDeleteWhere

func (igs *IdentityTypeGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*IdentityTypeGormStore) BaseIdentifierMap

func (igs *IdentityTypeGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*IdentityTypeGormStore) BaseLoadList

func (igs *IdentityTypeGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*IdentityTypeGormStore) BaseLoadOne

func (igs *IdentityTypeGormStore) BaseLoadOne(p *predicate.Predicate, pl *Preloads) (BaseDbModel, error)

func (*IdentityTypeGormStore) BaseLoadOneById

func (igs *IdentityTypeGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*IdentityTypeGormStore) BasePatch

func (igs *IdentityTypeGormStore) BasePatch(e BaseDbModel) error

func (*IdentityTypeGormStore) BaseStatsList

func (igs *IdentityTypeGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*IdentityTypeGormStore) BaseUpdate

func (igs *IdentityTypeGormStore) BaseUpdate(e BaseDbModel) error

func (*IdentityTypeGormStore) Create

func (igs *IdentityTypeGormStore) Create(e *IdentityType) (string, error)

func (*IdentityTypeGormStore) DeleteById

func (igs *IdentityTypeGormStore) DeleteById(id string) error

func (*IdentityTypeGormStore) DeleteWhere

func (igs *IdentityTypeGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*IdentityTypeGormStore) EntityName

func (igs *IdentityTypeGormStore) EntityName() string

func (*IdentityTypeGormStore) IdentifierMap

func (igs *IdentityTypeGormStore) IdentifierMap() *predicate.IdentifierMap

func (*IdentityTypeGormStore) LoadList

func (igs *IdentityTypeGormStore) LoadList(qo *QueryOptions) ([]*IdentityType, error)

func (*IdentityTypeGormStore) LoadOne

func (*IdentityTypeGormStore) LoadOneById

func (igs *IdentityTypeGormStore) LoadOneById(id string, pl *Preloads) (*IdentityType, error)

func (*IdentityTypeGormStore) LoadOneByName

func (igs *IdentityTypeGormStore) LoadOneByName(name string, pl *Preloads) (*IdentityType, error)

func (*IdentityTypeGormStore) Patch

func (igs *IdentityTypeGormStore) Patch(e *IdentityType) error

func (*IdentityTypeGormStore) PluralEntityName

func (igs *IdentityTypeGormStore) PluralEntityName() string

func (*IdentityTypeGormStore) StatsList

func (igs *IdentityTypeGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*IdentityTypeGormStore) Update

func (igs *IdentityTypeGormStore) Update(e *IdentityType) error

type IdentityTypeStore

type IdentityTypeStore interface {
	LoadOneById(id string, pl *Preloads) (*IdentityType, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*IdentityType, error)
	LoadOneByName(name string, pl *Preloads) (*IdentityType, error)
	LoadList(qo *QueryOptions) ([]*IdentityType, error)
	Create(e *IdentityType) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *IdentityType) error
	Patch(e *IdentityType) error
	Store
}

type ListStats

type ListStats struct {
	Count  int64
	Offset int64
	Limit  int64
}

func StatList

func StatList(db *gorm.DB, qo *QueryOptions, typ interface{}) (*ListStats, error)

type ModelHandlers

type ModelHandlers struct {
	Identity      *IdentityHandlers
	Ca            *CaHandlers
	Authenticator *AuthenticatorHandlers
	Enrollment    *EnrollmentHandlers
}

func GetModelHandlers

func GetModelHandlers() *ModelHandlers

type NetworkSession

type NetworkSession struct {
	BaseDbEntity
	Token     *string
	SessionID *string
	Session   *Session
	ServiceID *string
	Hosting   *bool
	Certs     []*NetworkSessionCert
}

func (*NetworkSession) BeforeDelete

func (e *NetworkSession) BeforeDelete(tx *gorm.DB) error

type NetworkSessionCert

type NetworkSessionCert struct {
	BaseDbEntity
	NetworkSessionID *string
	Cert             *string
	Fingerprint      *string
	ValidFrom        *time.Time
	ValidTo          *time.Time
}

func (*NetworkSessionCert) GetId

func (e *NetworkSessionCert) GetId() string

func (*NetworkSessionCert) SetId

func (e *NetworkSessionCert) SetId(id string)

func (*NetworkSessionCert) SetUpdatedAt

func (e *NetworkSessionCert) SetUpdatedAt(t *time.Time)

type NetworkSessionCertGormStore

type NetworkSessionCertGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewNetworkSessionCertGormStore

func NewNetworkSessionCertGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *NetworkSessionCertGormStore

func (*NetworkSessionCertGormStore) BaseCreate

func (igs *NetworkSessionCertGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*NetworkSessionCertGormStore) BaseDeleteById

func (igs *NetworkSessionCertGormStore) BaseDeleteById(id string) error

func (*NetworkSessionCertGormStore) BaseDeleteWhere

func (igs *NetworkSessionCertGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*NetworkSessionCertGormStore) BaseIdentifierMap

func (igs *NetworkSessionCertGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*NetworkSessionCertGormStore) BaseLoadList

func (igs *NetworkSessionCertGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*NetworkSessionCertGormStore) BaseLoadOne

func (*NetworkSessionCertGormStore) BaseLoadOneById

func (igs *NetworkSessionCertGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*NetworkSessionCertGormStore) BasePatch

func (igs *NetworkSessionCertGormStore) BasePatch(e BaseDbModel) error

func (*NetworkSessionCertGormStore) BaseStatsList

func (igs *NetworkSessionCertGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*NetworkSessionCertGormStore) BaseUpdate

func (igs *NetworkSessionCertGormStore) BaseUpdate(e BaseDbModel) error

func (*NetworkSessionCertGormStore) Create

func (*NetworkSessionCertGormStore) DeleteById

func (igs *NetworkSessionCertGormStore) DeleteById(id string) error

func (*NetworkSessionCertGormStore) DeleteWhere

func (igs *NetworkSessionCertGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*NetworkSessionCertGormStore) DeleteWithTx

func (igs *NetworkSessionCertGormStore) DeleteWithTx(e *NetworkSession, tx *gorm.DB) error

func (*NetworkSessionCertGormStore) EntityName

func (igs *NetworkSessionCertGormStore) EntityName() string

func (*NetworkSessionCertGormStore) IdentifierMap

func (igs *NetworkSessionCertGormStore) IdentifierMap() *predicate.IdentifierMap

func (*NetworkSessionCertGormStore) LoadList

func (*NetworkSessionCertGormStore) LoadOne

func (*NetworkSessionCertGormStore) LoadOneById

func (igs *NetworkSessionCertGormStore) LoadOneById(id string, pl *Preloads) (*NetworkSessionCert, error)

func (*NetworkSessionCertGormStore) LoadOneByName

func (igs *NetworkSessionCertGormStore) LoadOneByName(name string, pl *Preloads) (*NetworkSessionCert, error)

func (*NetworkSessionCertGormStore) Patch

func (*NetworkSessionCertGormStore) PluralEntityName

func (igs *NetworkSessionCertGormStore) PluralEntityName() string

func (*NetworkSessionCertGormStore) StatsList

func (igs *NetworkSessionCertGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*NetworkSessionCertGormStore) Update

type NetworkSessionCertStore

type NetworkSessionCertStore interface {
	LoadOneById(id string, pl *Preloads) (*NetworkSessionCert, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*NetworkSessionCert, error)
	LoadOneByName(name string, pl *Preloads) (*NetworkSessionCert, error)
	LoadList(qo *QueryOptions) ([]*NetworkSession, error)
	Create(e *NetworkSession) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *NetworkSession) error
	Patch(e *NetworkSession) error
	NewIdentityFilteredStore(i *Identity) NetworkSessionCertStore
	Store
}

type NetworkSessionGormStore

type NetworkSessionGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewNetworkSessionGormStore

func NewNetworkSessionGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *NetworkSessionGormStore

func (*NetworkSessionGormStore) BaseCreate

func (igs *NetworkSessionGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*NetworkSessionGormStore) BaseDeleteById

func (igs *NetworkSessionGormStore) BaseDeleteById(id string) error

func (*NetworkSessionGormStore) BaseDeleteWhere

func (igs *NetworkSessionGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*NetworkSessionGormStore) BaseIdentifierMap

func (igs *NetworkSessionGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*NetworkSessionGormStore) BaseLoadList

func (igs *NetworkSessionGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*NetworkSessionGormStore) BaseLoadOne

func (*NetworkSessionGormStore) BaseLoadOneById

func (igs *NetworkSessionGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*NetworkSessionGormStore) BasePatch

func (igs *NetworkSessionGormStore) BasePatch(e BaseDbModel) error

func (*NetworkSessionGormStore) BaseStatsList

func (igs *NetworkSessionGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*NetworkSessionGormStore) BaseUpdate

func (igs *NetworkSessionGormStore) BaseUpdate(e BaseDbModel) error

func (*NetworkSessionGormStore) Create

func (*NetworkSessionGormStore) DeleteById

func (igs *NetworkSessionGormStore) DeleteById(id string) error

func (*NetworkSessionGormStore) DeleteWhere

func (igs *NetworkSessionGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*NetworkSessionGormStore) DeleteWithTx

func (igs *NetworkSessionGormStore) DeleteWithTx(e *NetworkSession, tx *gorm.DB) error

func (*NetworkSessionGormStore) EntityName

func (igs *NetworkSessionGormStore) EntityName() string

func (*NetworkSessionGormStore) IdentifierMap

func (igs *NetworkSessionGormStore) IdentifierMap() *predicate.IdentifierMap

func (*NetworkSessionGormStore) LoadList

func (igs *NetworkSessionGormStore) LoadList(qo *QueryOptions) ([]*NetworkSession, error)

func (*NetworkSessionGormStore) LoadListByClusterId

func (igs *NetworkSessionGormStore) LoadListByClusterId(id string, qo *QueryOptions, pl *Preloads) ([]*NetworkSession, error)

func (*NetworkSessionGormStore) LoadOne

func (*NetworkSessionGormStore) LoadOneById

func (igs *NetworkSessionGormStore) LoadOneById(id string, pl *Preloads) (*NetworkSession, error)

func (*NetworkSessionGormStore) LoadOneByName

func (igs *NetworkSessionGormStore) LoadOneByName(name string, pl *Preloads) (*NetworkSession, error)

func (*NetworkSessionGormStore) NewIdentityFilteredStore

func (igs *NetworkSessionGormStore) NewIdentityFilteredStore(i *Identity) NetworkSessionStore

func (*NetworkSessionGormStore) Patch

func (*NetworkSessionGormStore) PluralEntityName

func (igs *NetworkSessionGormStore) PluralEntityName() string

func (*NetworkSessionGormStore) StatsList

func (igs *NetworkSessionGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*NetworkSessionGormStore) Update

type NetworkSessionStore

type NetworkSessionStore interface {
	LoadOneById(id string, pl *Preloads) (*NetworkSession, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*NetworkSession, error)
	LoadOneByName(name string, pl *Preloads) (*NetworkSession, error)
	LoadList(qo *QueryOptions) ([]*NetworkSession, error)
	LoadListByClusterId(id string, qo *QueryOptions, pl *Preloads) ([]*NetworkSession, error)
	Create(e *NetworkSession) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *NetworkSession) error
	Patch(e *NetworkSession) error
	NewIdentityFilteredStore(i *Identity) NetworkSessionStore
	Store
}

type Preloads

type Preloads map[string][]interface{}

func (Preloads) ApplyToQuery

func (p Preloads) ApplyToQuery(q *gorm.DB) *gorm.DB

type PropertyMap

type PropertyMap map[string]interface{}

func (*PropertyMap) Scan

func (p *PropertyMap) Scan(src interface{}) error

func (PropertyMap) Value

func (p PropertyMap) Value() (driver.Value, error)

type QueryOptions

type QueryOptions struct {
	Predicate *predicate.Predicate
	Sort      []predicate.SortField
	Paging    *predicate.Paging
}

func (*QueryOptions) ApplyPredicateToQuery

func (qo *QueryOptions) ApplyPredicateToQuery(q *gorm.DB) *gorm.DB

func (*QueryOptions) ApplyToQuery

func (qo *QueryOptions) ApplyToQuery(q *gorm.DB) *gorm.DB

func (*QueryOptions) ValidateAndCorrect

func (qo *QueryOptions) ValidateAndCorrect()

type QueryResult

type QueryResult struct {
	Value          interface{}
	Error          error
	RowsAffected   int64
	RecordNotFound bool
}

func Create

func Create(db *gorm.DB, e BaseDbModel, em events.EventEmmiter) (string, *QueryResult)

func Delete

func Delete(db *gorm.DB, e BaseDbModel, em events.EventEmmiter) *QueryResult

func DeleteWhere

func DeleteWhere(db *gorm.DB, slice interface{}, p *predicate.Predicate, em events.EventEmmiter) *QueryResult

func LoadList

func LoadList(db *gorm.DB, qo *QueryOptions, out interface{}) *QueryResult

func LoadOne

func LoadOne(db *gorm.DB, p *predicate.Predicate, pl *Preloads, out interface{}) *QueryResult

func LoadOneById

func LoadOneById(db *gorm.DB, id string, pl *Preloads, out interface{}) *QueryResult

func NewQueryResult

func NewQueryResult(db *gorm.DB) *QueryResult

func NewQueryResultF

func NewQueryResultF(err string, args ...interface{}) *QueryResult

func NewQueryResultFromError

func NewQueryResultFromError(err error) *QueryResult

func Patch

func Patch(db *gorm.DB, e BaseDbModel, em events.EventEmmiter) *QueryResult

func Update

func Update(db *gorm.DB, e BaseDbModel, em events.EventEmmiter) *QueryResult

type RecordNotFoundError

type RecordNotFoundError struct{}

func (RecordNotFoundError) Error

func (RecordNotFoundError) Error() string

type Service

type Service struct {
	BaseDbEntity
	Name            *string
	DnsHostname     *string
	DnsPort         *uint16
	Clusters        []*Cluster `gorm:"many2many:service_clusters;"`
	AppWans         []*AppWan  `gorm:"many2many:app_wan_services;"`
	EndpointAddress *string
	EgressRouter    *string
	HostIds         []*Identity `gorm:"many2many:service_hosts"`
}

func (*Service) BeforeDelete

func (e *Service) BeforeDelete(tx *gorm.DB) error

type ServiceGormStore

type ServiceGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewServiceGormStore

func NewServiceGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *ServiceGormStore

func (*ServiceGormStore) BaseCreate

func (igs *ServiceGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*ServiceGormStore) BaseDeleteById

func (igs *ServiceGormStore) BaseDeleteById(id string) error

func (*ServiceGormStore) BaseDeleteWhere

func (igs *ServiceGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*ServiceGormStore) BaseIdentifierMap

func (igs *ServiceGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*ServiceGormStore) BaseLoadList

func (igs *ServiceGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*ServiceGormStore) BaseLoadOne

func (igs *ServiceGormStore) BaseLoadOne(p *predicate.Predicate, pl *Preloads) (BaseDbModel, error)

func (*ServiceGormStore) BaseLoadOneById

func (igs *ServiceGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*ServiceGormStore) BasePatch

func (igs *ServiceGormStore) BasePatch(e BaseDbModel) error

func (*ServiceGormStore) BaseStatsList

func (igs *ServiceGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*ServiceGormStore) BaseUpdate

func (igs *ServiceGormStore) BaseUpdate(e BaseDbModel) error

func (*ServiceGormStore) Create

func (igs *ServiceGormStore) Create(e *Service) (string, error)

func (*ServiceGormStore) DeleteById

func (igs *ServiceGormStore) DeleteById(id string) error

func (*ServiceGormStore) DeleteWhere

func (igs *ServiceGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*ServiceGormStore) EntityName

func (igs *ServiceGormStore) EntityName() string

func (*ServiceGormStore) IdentifierMap

func (igs *ServiceGormStore) IdentifierMap() *predicate.IdentifierMap

func (*ServiceGormStore) LoadList

func (igs *ServiceGormStore) LoadList(qo *QueryOptions) ([]*Service, error)

func (*ServiceGormStore) LoadOne

func (igs *ServiceGormStore) LoadOne(p *predicate.Predicate, pl *Preloads) (*Service, error)

func (*ServiceGormStore) LoadOneById

func (igs *ServiceGormStore) LoadOneById(id string, pl *Preloads) (*Service, error)

func (*ServiceGormStore) LoadOneByName

func (igs *ServiceGormStore) LoadOneByName(name string, pl *Preloads) (*Service, error)

func (*ServiceGormStore) NewIdentityFilteredStore

func (igs *ServiceGormStore) NewIdentityFilteredStore(i *Identity) ServiceStore

func (*ServiceGormStore) Patch

func (igs *ServiceGormStore) Patch(e *Service) error

func (*ServiceGormStore) PluralEntityName

func (igs *ServiceGormStore) PluralEntityName() string

func (*ServiceGormStore) StatsList

func (igs *ServiceGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*ServiceGormStore) Update

func (igs *ServiceGormStore) Update(e *Service) error

type ServiceStore

type ServiceStore interface {
	LoadOneById(id string, pl *Preloads) (*Service, error)
	LoadOneByName(name string, pl *Preloads) (*Service, error)
	LoadList(qo *QueryOptions) ([]*Service, error)
	Create(e *Service) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *Service) error
	Patch(e *Service) error
	NewIdentityFilteredStore(i *Identity) ServiceStore
	Store
}

type Session

type Session struct {
	BaseDbEntity
	IdentityID *string
	Token      *string
	Identity   *Identity
}

func (*Session) BeforeDelete

func (e *Session) BeforeDelete(tx *gorm.DB) error

type SessionGormStore

type SessionGormStore struct {
	events.EventEmmiter
	// contains filtered or unexported fields
}

func NewSessionGormStore

func NewSessionGormStore(db *gorm.DB, dbWithPreloading *gorm.DB) *SessionGormStore

func (*SessionGormStore) BaseCreate

func (igs *SessionGormStore) BaseCreate(e BaseDbModel) (string, error)

func (*SessionGormStore) BaseDeleteById

func (igs *SessionGormStore) BaseDeleteById(id string) error

func (*SessionGormStore) BaseDeleteWhere

func (igs *SessionGormStore) BaseDeleteWhere(p *predicate.Predicate) (int64, error)

func (*SessionGormStore) BaseIdentifierMap

func (igs *SessionGormStore) BaseIdentifierMap() *predicate.IdentifierMap

func (*SessionGormStore) BaseLoadList

func (igs *SessionGormStore) BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)

func (*SessionGormStore) BaseLoadOne

func (igs *SessionGormStore) BaseLoadOne(p *predicate.Predicate, pl *Preloads) (BaseDbModel, error)

func (*SessionGormStore) BaseLoadOneById

func (igs *SessionGormStore) BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)

func (*SessionGormStore) BasePatch

func (igs *SessionGormStore) BasePatch(e BaseDbModel) error

func (*SessionGormStore) BaseStatsList

func (igs *SessionGormStore) BaseStatsList(qo *QueryOptions) (*ListStats, error)

func (*SessionGormStore) BaseUpdate

func (igs *SessionGormStore) BaseUpdate(e BaseDbModel) error

func (*SessionGormStore) Create

func (igs *SessionGormStore) Create(e *Session) (string, error)

func (*SessionGormStore) DeleteById

func (igs *SessionGormStore) DeleteById(id string) error

func (*SessionGormStore) DeleteIfNotUpdatedBy

func (igs *SessionGormStore) DeleteIfNotUpdatedBy(updatedBy time.Time) error

func (*SessionGormStore) DeleteWhere

func (igs *SessionGormStore) DeleteWhere(p *predicate.Predicate) (int64, error)

func (*SessionGormStore) EntityName

func (igs *SessionGormStore) EntityName() string

func (*SessionGormStore) IdentifierMap

func (igs *SessionGormStore) IdentifierMap() *predicate.IdentifierMap

func (*SessionGormStore) LoadList

func (igs *SessionGormStore) LoadList(qo *QueryOptions) ([]*Session, error)

func (*SessionGormStore) LoadOne

func (igs *SessionGormStore) LoadOne(p *predicate.Predicate, pl *Preloads) (*Session, error)

func (*SessionGormStore) LoadOneById

func (igs *SessionGormStore) LoadOneById(id string, pl *Preloads) (*Session, error)

func (*SessionGormStore) LoadOneByName

func (igs *SessionGormStore) LoadOneByName(name string, pl *Preloads) (*Session, error)

func (*SessionGormStore) MarkActivity

func (igs *SessionGormStore) MarkActivity(tokens []string) error

func (*SessionGormStore) Patch

func (igs *SessionGormStore) Patch(e *Session) error

func (*SessionGormStore) PluralEntityName

func (igs *SessionGormStore) PluralEntityName() string

func (*SessionGormStore) StatsList

func (igs *SessionGormStore) StatsList(qo *QueryOptions) (*ListStats, error)

func (*SessionGormStore) Update

func (igs *SessionGormStore) Update(e *Session) error

type SessionStore

type SessionStore interface {
	LoadOneById(id string, pl *Preloads) (*Session, error)
	LoadOne(p *predicate.Predicate, pl *Preloads) (*Session, error)
	LoadOneByName(name string, pl *Preloads) (*Session, error)
	LoadList(qo *QueryOptions) ([]*Session, error)
	Create(e *Session) (string, error)
	DeleteById(id string) error
	DeleteWhere(p *predicate.Predicate) (int64, error)
	IdentifierMap() *predicate.IdentifierMap
	Update(e *Session) error
	Patch(e *Session) error
	MarkActivity(strings []string) error
	Store
	DeleteIfNotUpdatedBy(updatedBy time.Time) error
}

type Store

type Store interface {
	BaseLoadOneById(id string, pl *Preloads) (BaseDbModel, error)
	BaseLoadOne(p *predicate.Predicate, pl *Preloads) (BaseDbModel, error)
	BaseLoadList(qo *QueryOptions) ([]BaseDbModel, error)
	BaseStatsList(qo *QueryOptions) (*ListStats, error)
	BaseCreate(e BaseDbModel) (string, error)
	BaseDeleteById(id string) error
	BaseDeleteWhere(p *predicate.Predicate) (int64, error)
	BaseIdentifierMap() *predicate.IdentifierMap
	BaseUpdate(e BaseDbModel) error
	BasePatch(e BaseDbModel) error
	EntityName() string
	PluralEntityName() string
	events.EventEmmiter
}

type Stores

type Stores struct {
	AppWan             AppWanStore
	Authenticator      AuthenticatorStore
	Ca                 CaStore
	Cluster            ClusterStore
	Enrollment         EnrollmentStore
	EventLog           EventLogStore
	Gateway            GatewayStore
	GeoRegion          GeoRegionStore
	Identity           IdentityStore
	IdentityType       IdentityTypeStore
	NetworkSession     NetworkSessionStore
	Service            ServiceStore
	Session            SessionStore
	NetworkSessionCert *NetworkSessionCertGormStore
	AuthenticatorUpdb  *AuthenticatorUpdbGormStore
	AuthenticatorCert  *AuthenticatorCertGormStore
	EnrollmentCert     *EnrollmentCertGormStore
	EnrollmentUpdb     *EnrollmentUpdbGormStore
}

func NewGormStores

func NewGormStores(db *gorm.DB, dbWithPreloads *gorm.DB) *Stores

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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