Documentation
¶
Index ¶
- Variables
- func Commit(ctx context.Context) (context.Context, error)
- func FromContext(ctx context.Context) *gorm.DB
- func GenerateDefaultInventory() api.Inventory
- func InitDB(cfg *config.Config) (*gorm.DB, error)
- func Rollback(ctx context.Context) (context.Context, error)
- type Agent
- type AgentQueryFilter
- type AgentQueryOptions
- type AgentStore
- func (a *AgentStore) Create(ctx context.Context, agent model.Agent) (*model.Agent, error)
- func (a *AgentStore) Get(ctx context.Context, id uuid.UUID) (*model.Agent, error)
- func (a *AgentStore) InitialMigration(ctx context.Context) error
- func (a *AgentStore) List(ctx context.Context, filter *AgentQueryFilter, opts *AgentQueryOptions) (model.AgentList, error)
- func (a *AgentStore) Update(ctx context.Context, agent model.Agent) (*model.Agent, error)
- type BaseQuerier
- type DataStore
- func (s *DataStore) Agent() Agent
- func (s *DataStore) Close() error
- func (s *DataStore) ImageInfra() ImageInfra
- func (s *DataStore) InitialMigration() error
- func (s *DataStore) NewTransactionContext(ctx context.Context) (context.Context, error)
- func (s *DataStore) Seed() error
- func (s *DataStore) Source() Source
- type ImageInfra
- type ImageInfraStore
- type SortOrder
- type Source
- type SourceQueryFilter
- type SourceStore
- func (s *SourceStore) Create(ctx context.Context, source model.Source) (*model.Source, error)
- func (s *SourceStore) Delete(ctx context.Context, id uuid.UUID) error
- func (s *SourceStore) DeleteAll(ctx context.Context) error
- func (s *SourceStore) Get(ctx context.Context, id uuid.UUID) (*model.Source, error)
- func (s *SourceStore) InitialMigration(ctx context.Context) error
- func (s *SourceStore) List(ctx context.Context, filter *SourceQueryFilter) (model.SourceList, error)
- func (s *SourceStore) Update(ctx context.Context, source model.Source) (*model.Source, error)
- type Store
- type Tx
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrRecordNotFound error = errors.New("record not found")
)
Functions ¶
Types ¶
type Agent ¶
type Agent interface { List(ctx context.Context, filter *AgentQueryFilter, opts *AgentQueryOptions) (model.AgentList, error) Get(ctx context.Context, id uuid.UUID) (*model.Agent, error) Update(ctx context.Context, agent model.Agent) (*model.Agent, error) Create(ctx context.Context, agent model.Agent) (*model.Agent, error) InitialMigration(context.Context) error }
func NewAgentSource ¶
type AgentQueryFilter ¶
type AgentQueryFilter BaseQuerier
func NewAgentQueryFilter ¶
func NewAgentQueryFilter() *AgentQueryFilter
func (*AgentQueryFilter) ByID ¶
func (qf *AgentQueryFilter) ByID(ids []string) *AgentQueryFilter
func (*AgentQueryFilter) BySourceID ¶
func (qf *AgentQueryFilter) BySourceID(sourceID string) *AgentQueryFilter
type AgentQueryOptions ¶
type AgentQueryOptions BaseQuerier
func NewAgentQueryOptions ¶
func NewAgentQueryOptions() *AgentQueryOptions
func (*AgentQueryOptions) WithSortOrder ¶
func (o *AgentQueryOptions) WithSortOrder(sort SortOrder) *AgentQueryOptions
type AgentStore ¶
type AgentStore struct {
// contains filtered or unexported fields
}
func (*AgentStore) InitialMigration ¶
func (a *AgentStore) InitialMigration(ctx context.Context) error
func (*AgentStore) List ¶
func (a *AgentStore) List(ctx context.Context, filter *AgentQueryFilter, opts *AgentQueryOptions) (model.AgentList, error)
List lists all the agents.
type DataStore ¶
type DataStore struct {
// contains filtered or unexported fields
}
func (*DataStore) ImageInfra ¶
func (s *DataStore) ImageInfra() ImageInfra
func (*DataStore) InitialMigration ¶
func (*DataStore) NewTransactionContext ¶
type ImageInfra ¶
type ImageInfra interface { Create(ctx context.Context, imageInfra model.ImageInfra) (*model.ImageInfra, error) InitialMigration(context.Context) error }
func NewImageInfraStore ¶
func NewImageInfraStore(db *gorm.DB) ImageInfra
type ImageInfraStore ¶
type ImageInfraStore struct {
// contains filtered or unexported fields
}
func (*ImageInfraStore) Create ¶
func (i *ImageInfraStore) Create(ctx context.Context, image model.ImageInfra) (*model.ImageInfra, error)
func (*ImageInfraStore) InitialMigration ¶
func (i *ImageInfraStore) InitialMigration(ctx context.Context) error
type Source ¶
type Source interface { List(ctx context.Context, filter *SourceQueryFilter) (model.SourceList, error) Create(ctx context.Context, source model.Source) (*model.Source, error) DeleteAll(ctx context.Context) error Get(ctx context.Context, id uuid.UUID) (*model.Source, error) Delete(ctx context.Context, id uuid.UUID) error Update(ctx context.Context, source model.Source) (*model.Source, error) InitialMigration(context.Context) error }
type SourceQueryFilter ¶
type SourceQueryFilter BaseQuerier
func NewSourceQueryFilter ¶
func NewSourceQueryFilter() *SourceQueryFilter
func (*SourceQueryFilter) ByDefaultInventory ¶
func (sf *SourceQueryFilter) ByDefaultInventory() *SourceQueryFilter
func (*SourceQueryFilter) ByOnPremises ¶
func (qf *SourceQueryFilter) ByOnPremises(isOnPremises bool) *SourceQueryFilter
func (*SourceQueryFilter) ByOrgID ¶
func (sf *SourceQueryFilter) ByOrgID(id string) *SourceQueryFilter
func (*SourceQueryFilter) ByUsername ¶
func (sf *SourceQueryFilter) ByUsername(username string) *SourceQueryFilter
type SourceStore ¶
type SourceStore struct {
// contains filtered or unexported fields
}
func (*SourceStore) InitialMigration ¶
func (s *SourceStore) InitialMigration(ctx context.Context) error
func (*SourceStore) List ¶
func (s *SourceStore) List(ctx context.Context, filter *SourceQueryFilter) (model.SourceList, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.