Documentation ¶
Index ¶
- type DashboardsStore
- func (multi *DashboardsStore) Add(ctx context.Context, dashboard chronograf.Dashboard) (chronograf.Dashboard, error)
- func (multi *DashboardsStore) All(ctx context.Context) ([]chronograf.Dashboard, error)
- func (multi *DashboardsStore) Delete(ctx context.Context, dashboard chronograf.Dashboard) error
- func (multi *DashboardsStore) Get(ctx context.Context, id chronograf.DashboardID) (chronograf.Dashboard, error)
- func (multi *DashboardsStore) Update(ctx context.Context, dashboard chronograf.Dashboard) error
- type KapacitorStore
- func (multi *KapacitorStore) Add(ctx context.Context, kap chronograf.Server) (chronograf.Server, error)
- func (multi *KapacitorStore) All(ctx context.Context) ([]chronograf.Server, error)
- func (multi *KapacitorStore) Delete(ctx context.Context, kap chronograf.Server) error
- func (multi *KapacitorStore) Get(ctx context.Context, id int) (chronograf.Server, error)
- func (multi *KapacitorStore) Update(ctx context.Context, kap chronograf.Server) error
- type Layouts
- func (s *Layouts) Add(ctx context.Context, layout chronograf.Layout) (chronograf.Layout, error)
- func (s *Layouts) All(ctx context.Context) ([]chronograf.Layout, error)
- func (s *Layouts) Delete(ctx context.Context, layout chronograf.Layout) error
- func (s *Layouts) Get(ctx context.Context, ID string) (chronograf.Layout, error)
- func (s *Layouts) Update(ctx context.Context, layout chronograf.Layout) error
- type OrganizationsStore
- func (multi *OrganizationsStore) Add(ctx context.Context, org *chronograf.Organization) (*chronograf.Organization, error)
- func (multi *OrganizationsStore) All(ctx context.Context) ([]chronograf.Organization, error)
- func (multi *OrganizationsStore) CreateDefault(ctx context.Context) error
- func (multi *OrganizationsStore) DefaultOrganization(ctx context.Context) (*chronograf.Organization, error)
- func (multi *OrganizationsStore) Delete(ctx context.Context, org *chronograf.Organization) error
- func (multi *OrganizationsStore) Get(ctx context.Context, query chronograf.OrganizationQuery) (*chronograf.Organization, error)
- func (multi *OrganizationsStore) Update(ctx context.Context, org *chronograf.Organization) error
- type SourcesStore
- func (multi *SourcesStore) Add(ctx context.Context, src chronograf.Source) (chronograf.Source, error)
- func (multi *SourcesStore) All(ctx context.Context) ([]chronograf.Source, error)
- func (multi *SourcesStore) Delete(ctx context.Context, src chronograf.Source) error
- func (multi *SourcesStore) Get(ctx context.Context, id int) (chronograf.Source, error)
- func (multi *SourcesStore) Update(ctx context.Context, src chronograf.Source) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DashboardsStore ¶
type DashboardsStore struct {
Stores []chronograf.DashboardsStore
}
DashboardsStore implements the chronograf.DashboardsStore interface, and delegates to all contained DashboardsStores
func (*DashboardsStore) Add ¶
func (multi *DashboardsStore) Add(ctx context.Context, dashboard chronograf.Dashboard) (chronograf.Dashboard, error)
Add the dashboard to the first responsive Store
func (*DashboardsStore) All ¶
func (multi *DashboardsStore) All(ctx context.Context) ([]chronograf.Dashboard, error)
All concatenates the Dashboards of all contained Stores
func (*DashboardsStore) Delete ¶
func (multi *DashboardsStore) Delete(ctx context.Context, dashboard chronograf.Dashboard) error
Delete delegates to all Stores, returns success if one Store is successful
func (*DashboardsStore) Get ¶
func (multi *DashboardsStore) Get(ctx context.Context, id chronograf.DashboardID) (chronograf.Dashboard, error)
Get finds the Dashboard by id among all contained Stores
func (*DashboardsStore) Update ¶
func (multi *DashboardsStore) Update(ctx context.Context, dashboard chronograf.Dashboard) error
Update the first responsive Store
type KapacitorStore ¶
type KapacitorStore struct {
Stores []chronograf.ServersStore
}
KapacitorStore implements the chronograf.ServersStore interface, and delegates to all contained KapacitorStores
func (*KapacitorStore) Add ¶
func (multi *KapacitorStore) Add(ctx context.Context, kap chronograf.Server) (chronograf.Server, error)
Add the kap to the first responsive Store
func (*KapacitorStore) All ¶
func (multi *KapacitorStore) All(ctx context.Context) ([]chronograf.Server, error)
All concatenates the Kapacitors of all contained Stores
func (*KapacitorStore) Delete ¶
func (multi *KapacitorStore) Delete(ctx context.Context, kap chronograf.Server) error
Delete delegates to all Stores, returns success if one Store is successful
func (*KapacitorStore) Get ¶
func (multi *KapacitorStore) Get(ctx context.Context, id int) (chronograf.Server, error)
Get finds the Source by id among all contained Stores
func (*KapacitorStore) Update ¶
func (multi *KapacitorStore) Update(ctx context.Context, kap chronograf.Server) error
Update the first responsive Store
type Layouts ¶
type Layouts struct {
Stores []chronograf.LayoutsStore
}
Layouts is a LayoutsStore that contains multiple LayoutsStores The All method will return the set of all Layouts. Each method will be tried against the Stores slice serially.
func (*Layouts) Add ¶
func (s *Layouts) Add(ctx context.Context, layout chronograf.Layout) (chronograf.Layout, error)
Add creates a new dashboard in the LayoutsStore. Tries each store sequentially until success.
func (*Layouts) Delete ¶
Delete the dashboard from the store. Searches through all stores to find Layout and then deletes from that store.
type OrganizationsStore ¶
type OrganizationsStore struct {
Stores []chronograf.OrganizationsStore
}
OrganizationsStore implements the chronograf.OrganizationsStore interface, and delegates to all contained OrganizationsStores
func (*OrganizationsStore) Add ¶
func (multi *OrganizationsStore) Add(ctx context.Context, org *chronograf.Organization) (*chronograf.Organization, error)
Add the org to the first responsive Store
func (*OrganizationsStore) All ¶
func (multi *OrganizationsStore) All(ctx context.Context) ([]chronograf.Organization, error)
All concatenates the Organizations of all contained Stores
func (*OrganizationsStore) CreateDefault ¶
func (multi *OrganizationsStore) CreateDefault(ctx context.Context) error
CreateDefault makes a default organization in the first responsive Store
func (*OrganizationsStore) DefaultOrganization ¶
func (multi *OrganizationsStore) DefaultOrganization(ctx context.Context) (*chronograf.Organization, error)
DefaultOrganization returns the first successful DefaultOrganization
func (*OrganizationsStore) Delete ¶
func (multi *OrganizationsStore) Delete(ctx context.Context, org *chronograf.Organization) error
Delete delegates to all Stores, returns success if one Store is successful
func (*OrganizationsStore) Get ¶
func (multi *OrganizationsStore) Get(ctx context.Context, query chronograf.OrganizationQuery) (*chronograf.Organization, error)
Get finds the Organization by id among all contained Stores
func (*OrganizationsStore) Update ¶
func (multi *OrganizationsStore) Update(ctx context.Context, org *chronograf.Organization) error
Update the first responsive Store
type SourcesStore ¶
type SourcesStore struct {
Stores []chronograf.SourcesStore
}
SourcesStore delegates to the SourcesStores that compose it
func (*SourcesStore) Add ¶
func (multi *SourcesStore) Add(ctx context.Context, src chronograf.Source) (chronograf.Source, error)
Add the src to the first Store to respond successfully
func (*SourcesStore) All ¶
func (multi *SourcesStore) All(ctx context.Context) ([]chronograf.Source, error)
All concatenates the Sources of all contained Stores
func (*SourcesStore) Delete ¶
func (multi *SourcesStore) Delete(ctx context.Context, src chronograf.Source) error
Delete delegates to all stores, returns success if one Store is successful
func (*SourcesStore) Get ¶
func (multi *SourcesStore) Get(ctx context.Context, id int) (chronograf.Source, error)
Get finds the Source by id among all contained Stores
func (*SourcesStore) Update ¶
func (multi *SourcesStore) Update(ctx context.Context, src chronograf.Source) error
Update the first store to return a successful response