bolt

package
v0.0.0-...-0184392 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2020 License: AGPL-3.0, AGPL-3.0-or-later Imports: 19 Imported by: 0

Documentation

Overview

Code generated by protoc-gen-gogo. DO NOT EDIT. Above sentence is for ignoring about the comment warning by golint. So, you can treat as meanless and this is writable.

Index

Constants

View Source
const (
	// ErrUnableToOpen means we had an issue establishing a connection (or creating the database)
	ErrUnableToOpen = "Unable to open boltdb; is there a cmp already running?  %v"
	// ErrUnableToBackup means we couldn't copy the db file into ./backup
	ErrUnableToBackup = "Unable to backup your database prior to migrations:  %v"
	// ErrUnableToInitialize means we couldn't create missing Buckets (maybe a timeout)
	ErrUnableToInitialize = "Unable to boot boltdb:  %v"
	// ErrUnableToMigrate means we had an issue changing the db schema
	ErrUnableToMigrate = "Unable to migrate boltdb:  %v"
)
View Source
const (
	// DefaultOrganizationName is the Name of the default organization
	DefaultOrganizationName string = "Default"
	// DefaultOrganizationRole is the DefaultRole for the Default organization
	DefaultOrganizationRole string = "member"
)

Variables

View Source
var (
	// OrganizationsBucket is the bucket where organizations are stored.
	OrganizationsBucket = []byte("OrganizationsV1")
	// DefaultOrganizationID is the ID of the default organization.
	DefaultOrganizationID = []byte("default")
)
View Source
var BuildBucket = []byte("Build")

BuildBucket is the bolt bucket used to store CMP build information

View Source
var BuildKey = []byte("build")

BuildKey is the constant key used in the bolt bucket

View Source
var ConfigBucket = []byte("ConfigV1")

ConfigBucket is used to store CMP application state

View Source
var DashboardsBucket = []byte("Dashboard")

DashboardsBucket is the bolt bucket dashboards are stored in

View Source
var LayoutsBucket = []byte("Layout")

LayoutsBucket is the bolt bucket layouts are stored in

View Source
var (
	// MappingsBucket is the bucket where organizations are stored.
	MappingsBucket = []byte("MappingsV1")
)
View Source
var OrganizationConfigBucket = []byte("OrganizationConfigV1")

OrganizationConfigBucket is used to store cmp organization configurations

View Source
var SchemaVersionBucket = []byte("SchemaVersions")

SchemaVersionBucket stores ids of completed migrations

View Source
var ServersBucket = []byte("Servers")

ServersBucket is the bolt bucket to store lists of servers

View Source
var SourcesBucket = []byte("Sources")

SourcesBucket is the bolt bucket used to store source information

View Source
var UsersBucket = []byte("UsersV2")

UsersBucket is used to store users local to cmp

Functions

func IsMigrationComplete

func IsMigrationComplete(db *bolt.DB, id string) (bool, error)

IsMigrationComplete checks for the presence of a particular migration id

func MarkMigrationAsComplete

func MarkMigrationAsComplete(db *bolt.DB, id string) error

MarkMigrationAsComplete adds the migration id to the schema bucket

func MigrateAll

func MigrateAll(client *Client) error

MigrateAll iterates through all known migrations and runs them in order

Types

type AlertRule

type AlertRule struct {
	ID                   string   `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	JSON                 string   `protobuf:"bytes,2,opt,name=JSON,proto3" json:"JSON,omitempty"`
	SrcID                int64    `protobuf:"varint,3,opt,name=SrcID,proto3" json:"SrcID,omitempty"`
	KapaID               int64    `protobuf:"varint,4,opt,name=KapaID,proto3" json:"KapaID,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AlertRule) Descriptor

func (*AlertRule) Descriptor() ([]byte, []int)

func (*AlertRule) GetID

func (m *AlertRule) GetID() string

func (*AlertRule) GetJSON

func (m *AlertRule) GetJSON() string

func (*AlertRule) GetKapaID

func (m *AlertRule) GetKapaID() int64

func (*AlertRule) GetSrcID

func (m *AlertRule) GetSrcID() int64

func (*AlertRule) ProtoMessage

func (*AlertRule) ProtoMessage()

func (*AlertRule) Reset

func (m *AlertRule) Reset()

func (*AlertRule) String

func (m *AlertRule) String() string

func (*AlertRule) XXX_DiscardUnknown

func (m *AlertRule) XXX_DiscardUnknown()

func (*AlertRule) XXX_Marshal

func (m *AlertRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AlertRule) XXX_Merge

func (m *AlertRule) XXX_Merge(src proto.Message)

func (*AlertRule) XXX_Size

func (m *AlertRule) XXX_Size() int

func (*AlertRule) XXX_Unmarshal

func (m *AlertRule) XXX_Unmarshal(b []byte) error

type AuthConfig

type AuthConfig struct {
	SuperAdminNewUsers   bool     `protobuf:"varint,1,opt,name=SuperAdminNewUsers,proto3" json:"SuperAdminNewUsers,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*AuthConfig) Descriptor

func (*AuthConfig) Descriptor() ([]byte, []int)

func (*AuthConfig) GetSuperAdminNewUsers

func (m *AuthConfig) GetSuperAdminNewUsers() bool

func (*AuthConfig) ProtoMessage

func (*AuthConfig) ProtoMessage()

func (*AuthConfig) Reset

func (m *AuthConfig) Reset()

func (*AuthConfig) String

func (m *AuthConfig) String() string

func (*AuthConfig) XXX_DiscardUnknown

func (m *AuthConfig) XXX_DiscardUnknown()

func (*AuthConfig) XXX_Marshal

func (m *AuthConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*AuthConfig) XXX_Merge

func (m *AuthConfig) XXX_Merge(src proto.Message)

func (*AuthConfig) XXX_Size

func (m *AuthConfig) XXX_Size() int

func (*AuthConfig) XXX_Unmarshal

func (m *AuthConfig) XXX_Unmarshal(b []byte) error

type Axis

type Axis struct {
	LegacyBounds         []int64  `protobuf:"varint,1,rep,packed,name=legacyBounds,proto3" json:"legacyBounds,omitempty"`
	Bounds               []string `protobuf:"bytes,2,rep,name=bounds,proto3" json:"bounds,omitempty"`
	Label                string   `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"`
	Prefix               string   `protobuf:"bytes,4,opt,name=prefix,proto3" json:"prefix,omitempty"`
	Suffix               string   `protobuf:"bytes,5,opt,name=suffix,proto3" json:"suffix,omitempty"`
	Base                 string   `protobuf:"bytes,6,opt,name=base,proto3" json:"base,omitempty"`
	Scale                string   `protobuf:"bytes,7,opt,name=scale,proto3" json:"scale,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Axis) Descriptor

func (*Axis) Descriptor() ([]byte, []int)

func (*Axis) GetBase

func (m *Axis) GetBase() string

func (*Axis) GetBounds

func (m *Axis) GetBounds() []string

func (*Axis) GetLabel

func (m *Axis) GetLabel() string

func (*Axis) GetLegacyBounds

func (m *Axis) GetLegacyBounds() []int64

func (*Axis) GetPrefix

func (m *Axis) GetPrefix() string

func (*Axis) GetScale

func (m *Axis) GetScale() string

func (*Axis) GetSuffix

func (m *Axis) GetSuffix() string

func (*Axis) ProtoMessage

func (*Axis) ProtoMessage()

func (*Axis) Reset

func (m *Axis) Reset()

func (*Axis) String

func (m *Axis) String() string

func (*Axis) XXX_DiscardUnknown

func (m *Axis) XXX_DiscardUnknown()

func (*Axis) XXX_Marshal

func (m *Axis) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Axis) XXX_Merge

func (m *Axis) XXX_Merge(src proto.Message)

func (*Axis) XXX_Size

func (m *Axis) XXX_Size() int

func (*Axis) XXX_Unmarshal

func (m *Axis) XXX_Unmarshal(b []byte) error

type Backup

type Backup struct {
}

Backup tells Open to perform a backup prior to initialization

func (Backup) Backup

func (b Backup) Backup() bool

Backup returns true

type BuildInfo

type BuildInfo struct {
	Version              string   `protobuf:"bytes,1,opt,name=Version,proto3" json:"Version,omitempty"`
	Commit               string   `protobuf:"bytes,2,opt,name=Commit,proto3" json:"Commit,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*BuildInfo) Descriptor

func (*BuildInfo) Descriptor() ([]byte, []int)

func (*BuildInfo) GetCommit

func (m *BuildInfo) GetCommit() string

func (*BuildInfo) GetVersion

func (m *BuildInfo) GetVersion() string

func (*BuildInfo) ProtoMessage

func (*BuildInfo) ProtoMessage()

func (*BuildInfo) Reset

func (m *BuildInfo) Reset()

func (*BuildInfo) String

func (m *BuildInfo) String() string

func (*BuildInfo) XXX_DiscardUnknown

func (m *BuildInfo) XXX_DiscardUnknown()

func (*BuildInfo) XXX_Marshal

func (m *BuildInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*BuildInfo) XXX_Merge

func (m *BuildInfo) XXX_Merge(src proto.Message)

func (*BuildInfo) XXX_Size

func (m *BuildInfo) XXX_Size() int

func (*BuildInfo) XXX_Unmarshal

func (m *BuildInfo) XXX_Unmarshal(b []byte) error

type BuildStore

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

BuildStore is a bolt implementation to store CMP build information

func (*BuildStore) Get

func (s *BuildStore) Get(ctx context.Context) (cmp.BuildInfo, error)

Get retrieves CMP build information from the database

func (*BuildStore) Migrate

func (s *BuildStore) Migrate(ctx context.Context, build cmp.BuildInfo) error

Migrate simply stores the current version in the database

func (*BuildStore) Update

func (s *BuildStore) Update(ctx context.Context, build cmp.BuildInfo) error

Update overwrites the current CMP build information in the database

type Cell

type Cell struct {
	X                    int32            `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
	Y                    int32            `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
	W                    int32            `protobuf:"varint,3,opt,name=w,proto3" json:"w,omitempty"`
	H                    int32            `protobuf:"varint,4,opt,name=h,proto3" json:"h,omitempty"`
	Queries              []*Query         `protobuf:"bytes,5,rep,name=queries,proto3" json:"queries,omitempty"`
	I                    string           `protobuf:"bytes,6,opt,name=i,proto3" json:"i,omitempty"`
	Name                 string           `protobuf:"bytes,7,opt,name=name,proto3" json:"name,omitempty"`
	Yranges              []int64          `protobuf:"varint,8,rep,packed,name=yranges,proto3" json:"yranges,omitempty"`
	Ylabels              []string         `protobuf:"bytes,9,rep,name=ylabels,proto3" json:"ylabels,omitempty"`
	Type                 string           `protobuf:"bytes,10,opt,name=type,proto3" json:"type,omitempty"`
	Axes                 map[string]*Axis `` /* 150-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*Cell) Descriptor

func (*Cell) Descriptor() ([]byte, []int)

func (*Cell) GetAxes

func (m *Cell) GetAxes() map[string]*Axis

func (*Cell) GetH

func (m *Cell) GetH() int32

func (*Cell) GetI

func (m *Cell) GetI() string

func (*Cell) GetName

func (m *Cell) GetName() string

func (*Cell) GetQueries

func (m *Cell) GetQueries() []*Query

func (*Cell) GetType

func (m *Cell) GetType() string

func (*Cell) GetW

func (m *Cell) GetW() int32

func (*Cell) GetX

func (m *Cell) GetX() int32

func (*Cell) GetY

func (m *Cell) GetY() int32

func (*Cell) GetYlabels

func (m *Cell) GetYlabels() []string

func (*Cell) GetYranges

func (m *Cell) GetYranges() []int64

func (*Cell) ProtoMessage

func (*Cell) ProtoMessage()

func (*Cell) Reset

func (m *Cell) Reset()

func (*Cell) String

func (m *Cell) String() string

func (*Cell) XXX_DiscardUnknown

func (m *Cell) XXX_DiscardUnknown()

func (*Cell) XXX_Marshal

func (m *Cell) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Cell) XXX_Merge

func (m *Cell) XXX_Merge(src proto.Message)

func (*Cell) XXX_Size

func (m *Cell) XXX_Size() int

func (*Cell) XXX_Unmarshal

func (m *Cell) XXX_Unmarshal(b []byte) error

type Client

type Client struct {
	Path string

	Now       func() time.Time
	LayoutIDs cmp.ID

	BuildStore              *BuildStore
	SourcesStore            *SourcesStore
	ServersStore            *ServersStore
	LayoutsStore            *LayoutsStore
	DashboardsStore         *DashboardsStore
	UsersStore              *UsersStore
	OrganizationsStore      *OrganizationsStore
	ConfigStore             *ConfigStore
	MappingsStore           *MappingsStore
	OrganizationConfigStore *OrganizationConfigStore
	// contains filtered or unexported fields
}

Client is a client for the boltDB data store.

func NewClient

func NewClient() *Client

NewClient initializes all stores

func (*Client) Close

func (c *Client) Close() error

Close the connection to the bolt database

func (*Client) CreateCell

func (c *Client) CreateCell(ctx context.Context, d *platform.Cell) error

CreateCell creates a platform cell and sets d.ID.

func (*Client) CreateDashboard

func (c *Client) CreateDashboard(ctx context.Context, d *platform.Dashboard) error

CreateDashboard creates a platform dashboard and sets d.ID.

func (*Client) DeleteCell

func (c *Client) DeleteCell(ctx context.Context, id platform.ID) error

DeleteCell deletes a cell and prunes it from the index.

func (*Client) DeleteDashboard

func (c *Client) DeleteDashboard(ctx context.Context, id platform.ID) error

DeleteDashboard deletes a dashboard and prunes it from the index.

func (*Client) FindCell

func (c *Client) FindCell(ctx context.Context, filter platform.CellFilter) (*platform.Cell, error)

FindCell retrieves a cell using an arbitrary cell filter.

func (*Client) FindCellByID

func (c *Client) FindCellByID(ctx context.Context, id platform.ID) (*platform.Cell, error)

FindCellByID retrieves a cell by id.

func (*Client) FindCells

func (c *Client) FindCells(ctx context.Context, filter platform.CellFilter) ([]*platform.Cell, int, error)

FindCells retrives all cells that match an arbitrary cell filter.

func (*Client) FindDashboard

func (c *Client) FindDashboard(ctx context.Context, filter platform.DashboardFilter) (*platform.Dashboard, error)

FindDashboard retrieves a dashboard using an arbitrary dashboard filter.

func (*Client) FindDashboardByID

func (c *Client) FindDashboardByID(ctx context.Context, id platform.ID) (*platform.Dashboard, error)

FindDashboardByID retrieves a dashboard by id.

func (*Client) FindDashboards

func (c *Client) FindDashboards(ctx context.Context, filter platform.DashboardFilter) ([]*platform.Dashboard, int, error)

FindDashboards retrives all dashboards that match an arbitrary dashboard filter.

func (*Client) Open

func (c *Client) Open(ctx context.Context, logger cmp.Logger, build cmp.BuildInfo, opts ...Option) error

Open / create boltDB file.

func (*Client) PutCell

func (c *Client) PutCell(ctx context.Context, d *platform.Cell) error

PutCell will put a cell without setting an ID.

func (*Client) PutDashboard

func (c *Client) PutDashboard(ctx context.Context, d *platform.Dashboard) error

PutDashboard will put a dashboard without setting an ID.

func (*Client) UpdateCell

func (c *Client) UpdateCell(ctx context.Context, id platform.ID, upd platform.CellUpdate) (*platform.Cell, error)

UpdateCell updates a cell according the parameters set on upd.

func (*Client) UpdateDashboard

func (c *Client) UpdateDashboard(ctx context.Context, id platform.ID, upd platform.DashboardUpdate) (*platform.Dashboard, error)

UpdateDashboard updates a dashboard according the parameters set on upd.

type Color

type Color struct {
	ID                   string   `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Type                 string   `protobuf:"bytes,2,opt,name=Type,proto3" json:"Type,omitempty"`
	Hex                  string   `protobuf:"bytes,3,opt,name=Hex,proto3" json:"Hex,omitempty"`
	Name                 string   `protobuf:"bytes,4,opt,name=Name,proto3" json:"Name,omitempty"`
	Value                string   `protobuf:"bytes,5,opt,name=Value,proto3" json:"Value,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Color) Descriptor

func (*Color) Descriptor() ([]byte, []int)

func (*Color) GetHex

func (m *Color) GetHex() string

func (*Color) GetID

func (m *Color) GetID() string

func (*Color) GetName

func (m *Color) GetName() string

func (*Color) GetType

func (m *Color) GetType() string

func (*Color) GetValue

func (m *Color) GetValue() string

func (*Color) ProtoMessage

func (*Color) ProtoMessage()

func (*Color) Reset

func (m *Color) Reset()

func (*Color) String

func (m *Color) String() string

func (*Color) XXX_DiscardUnknown

func (m *Color) XXX_DiscardUnknown()

func (*Color) XXX_Marshal

func (m *Color) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Color) XXX_Merge

func (m *Color) XXX_Merge(src proto.Message)

func (*Color) XXX_Size

func (m *Color) XXX_Size() int

func (*Color) XXX_Unmarshal

func (m *Color) XXX_Unmarshal(b []byte) error

type ColumnEncoding

type ColumnEncoding struct {
	Type                 string   `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"`
	Value                string   `protobuf:"bytes,2,opt,name=Value,proto3" json:"Value,omitempty"`
	Name                 string   `protobuf:"bytes,3,opt,name=Name,proto3" json:"Name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*ColumnEncoding) Descriptor

func (*ColumnEncoding) Descriptor() ([]byte, []int)

func (*ColumnEncoding) GetName

func (m *ColumnEncoding) GetName() string

func (*ColumnEncoding) GetType

func (m *ColumnEncoding) GetType() string

func (*ColumnEncoding) GetValue

func (m *ColumnEncoding) GetValue() string

func (*ColumnEncoding) ProtoMessage

func (*ColumnEncoding) ProtoMessage()

func (*ColumnEncoding) Reset

func (m *ColumnEncoding) Reset()

func (*ColumnEncoding) String

func (m *ColumnEncoding) String() string

func (*ColumnEncoding) XXX_DiscardUnknown

func (m *ColumnEncoding) XXX_DiscardUnknown()

func (*ColumnEncoding) XXX_Marshal

func (m *ColumnEncoding) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ColumnEncoding) XXX_Merge

func (m *ColumnEncoding) XXX_Merge(src proto.Message)

func (*ColumnEncoding) XXX_Size

func (m *ColumnEncoding) XXX_Size() int

func (*ColumnEncoding) XXX_Unmarshal

func (m *ColumnEncoding) XXX_Unmarshal(b []byte) error

type Config

type Config struct {
	Auth                 *AuthConfig `protobuf:"bytes,1,opt,name=Auth,proto3" json:"Auth,omitempty"`
	XXX_NoUnkeyedLiteral struct{}    `json:"-"`
	XXX_unrecognized     []byte      `json:"-"`
	XXX_sizecache        int32       `json:"-"`
}

func (*Config) Descriptor

func (*Config) Descriptor() ([]byte, []int)

func (*Config) GetAuth

func (m *Config) GetAuth() *AuthConfig

func (*Config) ProtoMessage

func (*Config) ProtoMessage()

func (*Config) Reset

func (m *Config) Reset()

func (*Config) String

func (m *Config) String() string

func (*Config) XXX_DiscardUnknown

func (m *Config) XXX_DiscardUnknown()

func (*Config) XXX_Marshal

func (m *Config) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Config) XXX_Merge

func (m *Config) XXX_Merge(src proto.Message)

func (*Config) XXX_Size

func (m *Config) XXX_Size() int

func (*Config) XXX_Unmarshal

func (m *Config) XXX_Unmarshal(b []byte) error

type ConfigStore

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

ConfigStore uses bolt to store and retrieve global application configuration

func (*ConfigStore) Get

func (s *ConfigStore) Get(ctx context.Context) (*cmp.Config, error)

Get ...

func (*ConfigStore) Initialize

func (s *ConfigStore) Initialize(ctx context.Context) error

Initialize ...

func (*ConfigStore) Migrate

func (s *ConfigStore) Migrate(ctx context.Context) error

Migrate ...

func (*ConfigStore) Update

func (s *ConfigStore) Update(ctx context.Context, cfg *cmp.Config) error

Update ...

type Dashboard

type Dashboard struct {
	ID                   int64            `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Name                 string           `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	Cells                []*DashboardCell `protobuf:"bytes,3,rep,name=cells,proto3" json:"cells,omitempty"`
	Templates            []*Template      `protobuf:"bytes,4,rep,name=templates,proto3" json:"templates,omitempty"`
	Organization         string           `protobuf:"bytes,5,opt,name=Organization,proto3" json:"Organization,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*Dashboard) Descriptor

func (*Dashboard) Descriptor() ([]byte, []int)

func (*Dashboard) GetCells

func (m *Dashboard) GetCells() []*DashboardCell

func (*Dashboard) GetID

func (m *Dashboard) GetID() int64

func (*Dashboard) GetName

func (m *Dashboard) GetName() string

func (*Dashboard) GetOrganization

func (m *Dashboard) GetOrganization() string

func (*Dashboard) GetTemplates

func (m *Dashboard) GetTemplates() []*Template

func (*Dashboard) ProtoMessage

func (*Dashboard) ProtoMessage()

func (*Dashboard) Reset

func (m *Dashboard) Reset()

func (*Dashboard) String

func (m *Dashboard) String() string

func (*Dashboard) XXX_DiscardUnknown

func (m *Dashboard) XXX_DiscardUnknown()

func (*Dashboard) XXX_Marshal

func (m *Dashboard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Dashboard) XXX_Merge

func (m *Dashboard) XXX_Merge(src proto.Message)

func (*Dashboard) XXX_Size

func (m *Dashboard) XXX_Size() int

func (*Dashboard) XXX_Unmarshal

func (m *Dashboard) XXX_Unmarshal(b []byte) error

type DashboardCell

type DashboardCell struct {
	X                    int32             `protobuf:"varint,1,opt,name=x,proto3" json:"x,omitempty"`
	Y                    int32             `protobuf:"varint,2,opt,name=y,proto3" json:"y,omitempty"`
	W                    int32             `protobuf:"varint,3,opt,name=w,proto3" json:"w,omitempty"`
	H                    int32             `protobuf:"varint,4,opt,name=h,proto3" json:"h,omitempty"`
	Queries              []*Query          `protobuf:"bytes,5,rep,name=queries,proto3" json:"queries,omitempty"`
	Name                 string            `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
	Type                 string            `protobuf:"bytes,7,opt,name=type,proto3" json:"type,omitempty"`
	ID                   string            `protobuf:"bytes,8,opt,name=ID,proto3" json:"ID,omitempty"`
	Axes                 map[string]*Axis  `` /* 149-byte string literal not displayed */
	Colors               []*Color          `protobuf:"bytes,10,rep,name=colors,proto3" json:"colors,omitempty"`
	Legend               *Legend           `protobuf:"bytes,11,opt,name=legend,proto3" json:"legend,omitempty"`
	TableOptions         *TableOptions     `protobuf:"bytes,12,opt,name=tableOptions,proto3" json:"tableOptions,omitempty"`
	FieldOptions         []*RenamableField `protobuf:"bytes,13,rep,name=fieldOptions,proto3" json:"fieldOptions,omitempty"`
	TimeFormat           string            `protobuf:"bytes,14,opt,name=timeFormat,proto3" json:"timeFormat,omitempty"`
	DecimalPlaces        *DecimalPlaces    `protobuf:"bytes,15,opt,name=decimalPlaces,proto3" json:"decimalPlaces,omitempty"`
	Note                 string            `protobuf:"bytes,16,opt,name=note,proto3" json:"note,omitempty"`
	NoteVisibility       string            `protobuf:"bytes,17,opt,name=noteVisibility,proto3" json:"noteVisibility,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*DashboardCell) Descriptor

func (*DashboardCell) Descriptor() ([]byte, []int)

func (*DashboardCell) GetAxes

func (m *DashboardCell) GetAxes() map[string]*Axis

func (*DashboardCell) GetColors

func (m *DashboardCell) GetColors() []*Color

func (*DashboardCell) GetDecimalPlaces

func (m *DashboardCell) GetDecimalPlaces() *DecimalPlaces

func (*DashboardCell) GetFieldOptions

func (m *DashboardCell) GetFieldOptions() []*RenamableField

func (*DashboardCell) GetH

func (m *DashboardCell) GetH() int32

func (*DashboardCell) GetID

func (m *DashboardCell) GetID() string

func (*DashboardCell) GetLegend

func (m *DashboardCell) GetLegend() *Legend

func (*DashboardCell) GetName

func (m *DashboardCell) GetName() string

func (*DashboardCell) GetNote

func (m *DashboardCell) GetNote() string

func (*DashboardCell) GetNoteVisibility

func (m *DashboardCell) GetNoteVisibility() string

func (*DashboardCell) GetQueries

func (m *DashboardCell) GetQueries() []*Query

func (*DashboardCell) GetTableOptions

func (m *DashboardCell) GetTableOptions() *TableOptions

func (*DashboardCell) GetTimeFormat

func (m *DashboardCell) GetTimeFormat() string

func (*DashboardCell) GetType

func (m *DashboardCell) GetType() string

func (*DashboardCell) GetW

func (m *DashboardCell) GetW() int32

func (*DashboardCell) GetX

func (m *DashboardCell) GetX() int32

func (*DashboardCell) GetY

func (m *DashboardCell) GetY() int32

func (*DashboardCell) ProtoMessage

func (*DashboardCell) ProtoMessage()

func (*DashboardCell) Reset

func (m *DashboardCell) Reset()

func (*DashboardCell) String

func (m *DashboardCell) String() string

func (*DashboardCell) XXX_DiscardUnknown

func (m *DashboardCell) XXX_DiscardUnknown()

func (*DashboardCell) XXX_Marshal

func (m *DashboardCell) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DashboardCell) XXX_Merge

func (m *DashboardCell) XXX_Merge(src proto.Message)

func (*DashboardCell) XXX_Size

func (m *DashboardCell) XXX_Size() int

func (*DashboardCell) XXX_Unmarshal

func (m *DashboardCell) XXX_Unmarshal(b []byte) error

type DashboardsStore

type DashboardsStore struct {
	IDs cmp.ID
	// contains filtered or unexported fields
}

DashboardsStore is the bolt implementation of storing dashboards

func (*DashboardsStore) Add

Add creates a new Dashboard in the DashboardsStore

func (*DashboardsStore) AddIDs

func (d *DashboardsStore) AddIDs(ctx context.Context, boards []cmp.Dashboard) error

AddIDs is a migration function that adds ID information to existing dashboards

func (*DashboardsStore) All

func (d *DashboardsStore) All(ctx context.Context) ([]cmp.Dashboard, error)

All returns all known dashboards

func (*DashboardsStore) Delete

func (d *DashboardsStore) Delete(ctx context.Context, dash cmp.Dashboard) error

Delete the dashboard from DashboardsStore

func (*DashboardsStore) Get

Get returns a Dashboard if the id exists.

func (*DashboardsStore) Migrate

func (d *DashboardsStore) Migrate(ctx context.Context) error

Migrate updates the dashboards at runtime

func (*DashboardsStore) Update

func (d *DashboardsStore) Update(ctx context.Context, dash cmp.Dashboard) error

Update the dashboard in DashboardsStore

type DecimalPlaces

type DecimalPlaces struct {
	IsEnforced           bool     `protobuf:"varint,1,opt,name=isEnforced,proto3" json:"isEnforced,omitempty"`
	Digits               int32    `protobuf:"varint,2,opt,name=digits,proto3" json:"digits,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*DecimalPlaces) Descriptor

func (*DecimalPlaces) Descriptor() ([]byte, []int)

func (*DecimalPlaces) GetDigits

func (m *DecimalPlaces) GetDigits() int32

func (*DecimalPlaces) GetIsEnforced

func (m *DecimalPlaces) GetIsEnforced() bool

func (*DecimalPlaces) ProtoMessage

func (*DecimalPlaces) ProtoMessage()

func (*DecimalPlaces) Reset

func (m *DecimalPlaces) Reset()

func (*DecimalPlaces) String

func (m *DecimalPlaces) String() string

func (*DecimalPlaces) XXX_DiscardUnknown

func (m *DecimalPlaces) XXX_DiscardUnknown()

func (*DecimalPlaces) XXX_Marshal

func (m *DecimalPlaces) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*DecimalPlaces) XXX_Merge

func (m *DecimalPlaces) XXX_Merge(src proto.Message)

func (*DecimalPlaces) XXX_Size

func (m *DecimalPlaces) XXX_Size() int

func (*DecimalPlaces) XXX_Unmarshal

func (m *DecimalPlaces) XXX_Unmarshal(b []byte) error

type Layout

type Layout struct {
	ID                   string   `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Application          string   `protobuf:"bytes,2,opt,name=Application,proto3" json:"Application,omitempty"`
	Measurement          string   `protobuf:"bytes,3,opt,name=Measurement,proto3" json:"Measurement,omitempty"`
	Cells                []*Cell  `protobuf:"bytes,4,rep,name=Cells,proto3" json:"Cells,omitempty"`
	Autoflow             bool     `protobuf:"varint,5,opt,name=Autoflow,proto3" json:"Autoflow,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Layout) Descriptor

func (*Layout) Descriptor() ([]byte, []int)

func (*Layout) GetApplication

func (m *Layout) GetApplication() string

func (*Layout) GetAutoflow

func (m *Layout) GetAutoflow() bool

func (*Layout) GetCells

func (m *Layout) GetCells() []*Cell

func (*Layout) GetID

func (m *Layout) GetID() string

func (*Layout) GetMeasurement

func (m *Layout) GetMeasurement() string

func (*Layout) ProtoMessage

func (*Layout) ProtoMessage()

func (*Layout) Reset

func (m *Layout) Reset()

func (*Layout) String

func (m *Layout) String() string

func (*Layout) XXX_DiscardUnknown

func (m *Layout) XXX_DiscardUnknown()

func (*Layout) XXX_Marshal

func (m *Layout) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Layout) XXX_Merge

func (m *Layout) XXX_Merge(src proto.Message)

func (*Layout) XXX_Size

func (m *Layout) XXX_Size() int

func (*Layout) XXX_Unmarshal

func (m *Layout) XXX_Unmarshal(b []byte) error

type LayoutsStore

type LayoutsStore struct {
	IDs cmp.ID
	// contains filtered or unexported fields
}

LayoutsStore is the bolt implementation to store layouts

func (*LayoutsStore) Add

func (s *LayoutsStore) Add(ctx context.Context, src cmp.Layout) (cmp.Layout, error)

Add creates a new Layout in the LayoutsStore.

func (*LayoutsStore) All

func (s *LayoutsStore) All(ctx context.Context) ([]cmp.Layout, error)

All returns all known layouts

func (*LayoutsStore) Delete

func (s *LayoutsStore) Delete(ctx context.Context, src cmp.Layout) error

Delete removes the Layout from the LayoutsStore

func (*LayoutsStore) Get

func (s *LayoutsStore) Get(ctx context.Context, id string) (cmp.Layout, error)

Get returns a Layout if the id exists.

func (*LayoutsStore) Migrate

func (s *LayoutsStore) Migrate(ctx context.Context) error

Migrate ...

func (*LayoutsStore) Update

func (s *LayoutsStore) Update(ctx context.Context, src cmp.Layout) error

Update a Layout

type Legend

type Legend struct {
	Type                 string   `protobuf:"bytes,1,opt,name=Type,proto3" json:"Type,omitempty"`
	Orientation          string   `protobuf:"bytes,2,opt,name=Orientation,proto3" json:"Orientation,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Legend) Descriptor

func (*Legend) Descriptor() ([]byte, []int)

func (*Legend) GetOrientation

func (m *Legend) GetOrientation() string

func (*Legend) GetType

func (m *Legend) GetType() string

func (*Legend) ProtoMessage

func (*Legend) ProtoMessage()

func (*Legend) Reset

func (m *Legend) Reset()

func (*Legend) String

func (m *Legend) String() string

func (*Legend) XXX_DiscardUnknown

func (m *Legend) XXX_DiscardUnknown()

func (*Legend) XXX_Marshal

func (m *Legend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Legend) XXX_Merge

func (m *Legend) XXX_Merge(src proto.Message)

func (*Legend) XXX_Size

func (m *Legend) XXX_Size() int

func (*Legend) XXX_Unmarshal

func (m *Legend) XXX_Unmarshal(b []byte) error

type LogViewerColumn

type LogViewerColumn struct {
	Name                 string            `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
	Position             int32             `protobuf:"varint,2,opt,name=Position,proto3" json:"Position,omitempty"`
	Encodings            []*ColumnEncoding `protobuf:"bytes,3,rep,name=Encodings,proto3" json:"Encodings,omitempty"`
	XXX_NoUnkeyedLiteral struct{}          `json:"-"`
	XXX_unrecognized     []byte            `json:"-"`
	XXX_sizecache        int32             `json:"-"`
}

func (*LogViewerColumn) Descriptor

func (*LogViewerColumn) Descriptor() ([]byte, []int)

func (*LogViewerColumn) GetEncodings

func (m *LogViewerColumn) GetEncodings() []*ColumnEncoding

func (*LogViewerColumn) GetName

func (m *LogViewerColumn) GetName() string

func (*LogViewerColumn) GetPosition

func (m *LogViewerColumn) GetPosition() int32

func (*LogViewerColumn) ProtoMessage

func (*LogViewerColumn) ProtoMessage()

func (*LogViewerColumn) Reset

func (m *LogViewerColumn) Reset()

func (*LogViewerColumn) String

func (m *LogViewerColumn) String() string

func (*LogViewerColumn) XXX_DiscardUnknown

func (m *LogViewerColumn) XXX_DiscardUnknown()

func (*LogViewerColumn) XXX_Marshal

func (m *LogViewerColumn) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogViewerColumn) XXX_Merge

func (m *LogViewerColumn) XXX_Merge(src proto.Message)

func (*LogViewerColumn) XXX_Size

func (m *LogViewerColumn) XXX_Size() int

func (*LogViewerColumn) XXX_Unmarshal

func (m *LogViewerColumn) XXX_Unmarshal(b []byte) error

type LogViewerConfig

type LogViewerConfig struct {
	Columns              []*LogViewerColumn `protobuf:"bytes,1,rep,name=Columns,proto3" json:"Columns,omitempty"`
	XXX_NoUnkeyedLiteral struct{}           `json:"-"`
	XXX_unrecognized     []byte             `json:"-"`
	XXX_sizecache        int32              `json:"-"`
}

func (*LogViewerConfig) Descriptor

func (*LogViewerConfig) Descriptor() ([]byte, []int)

func (*LogViewerConfig) GetColumns

func (m *LogViewerConfig) GetColumns() []*LogViewerColumn

func (*LogViewerConfig) ProtoMessage

func (*LogViewerConfig) ProtoMessage()

func (*LogViewerConfig) Reset

func (m *LogViewerConfig) Reset()

func (*LogViewerConfig) String

func (m *LogViewerConfig) String() string

func (*LogViewerConfig) XXX_DiscardUnknown

func (m *LogViewerConfig) XXX_DiscardUnknown()

func (*LogViewerConfig) XXX_Marshal

func (m *LogViewerConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*LogViewerConfig) XXX_Merge

func (m *LogViewerConfig) XXX_Merge(src proto.Message)

func (*LogViewerConfig) XXX_Size

func (m *LogViewerConfig) XXX_Size() int

func (*LogViewerConfig) XXX_Unmarshal

func (m *LogViewerConfig) XXX_Unmarshal(b []byte) error

type Mapping

type Mapping struct {
	Provider             string   `protobuf:"bytes,1,opt,name=Provider,proto3" json:"Provider,omitempty"`
	Scheme               string   `protobuf:"bytes,2,opt,name=Scheme,proto3" json:"Scheme,omitempty"`
	ProviderOrganization string   `protobuf:"bytes,3,opt,name=ProviderOrganization,proto3" json:"ProviderOrganization,omitempty"`
	ID                   string   `protobuf:"bytes,4,opt,name=ID,proto3" json:"ID,omitempty"`
	Organization         string   `protobuf:"bytes,5,opt,name=Organization,proto3" json:"Organization,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Mapping) Descriptor

func (*Mapping) Descriptor() ([]byte, []int)

func (*Mapping) GetID

func (m *Mapping) GetID() string

func (*Mapping) GetOrganization

func (m *Mapping) GetOrganization() string

func (*Mapping) GetProvider

func (m *Mapping) GetProvider() string

func (*Mapping) GetProviderOrganization

func (m *Mapping) GetProviderOrganization() string

func (*Mapping) GetScheme

func (m *Mapping) GetScheme() string

func (*Mapping) ProtoMessage

func (*Mapping) ProtoMessage()

func (*Mapping) Reset

func (m *Mapping) Reset()

func (*Mapping) String

func (m *Mapping) String() string

func (*Mapping) XXX_DiscardUnknown

func (m *Mapping) XXX_DiscardUnknown()

func (*Mapping) XXX_Marshal

func (m *Mapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Mapping) XXX_Merge

func (m *Mapping) XXX_Merge(src proto.Message)

func (*Mapping) XXX_Size

func (m *Mapping) XXX_Size() int

func (*Mapping) XXX_Unmarshal

func (m *Mapping) XXX_Unmarshal(b []byte) error

type MappingsStore

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

MappingsStore uses bolt to store and retrieve Mappings

func (*MappingsStore) Add

func (s *MappingsStore) Add(ctx context.Context, o *cmp.Mapping) (*cmp.Mapping, error)

Add creates a new Mapping in the MappingsStore

func (*MappingsStore) All

func (s *MappingsStore) All(ctx context.Context) ([]cmp.Mapping, error)

All returns all known organizations

func (*MappingsStore) Delete

func (s *MappingsStore) Delete(ctx context.Context, o *cmp.Mapping) error

Delete the organization from MappingsStore

func (*MappingsStore) Get

func (s *MappingsStore) Get(ctx context.Context, id string) (*cmp.Mapping, error)

Get returns a Mapping if the id exists.

func (*MappingsStore) Migrate

func (s *MappingsStore) Migrate(ctx context.Context) error

Migrate sets the default organization at runtime

func (*MappingsStore) Update

func (s *MappingsStore) Update(ctx context.Context, o *cmp.Mapping) error

Update the organization in MappingsStore

type Migration

type Migration struct {
	ID   string
	Up   func(db *bolt.DB) error
	Down func(db *bolt.DB) error
}

Migration defines a database state/schema transition

 ID: 	After the migration is run, this id is stored in the database.
     	We don't want to run a state transition twice
 Up: 	The forward-transition function. After a version upgrade, a number
				of these will run on database startup in order to bring a user's
				schema in line with struct definitions in the new version.
 Down: The backward-transition function. We don't expect these to be
				run on a user's database -- if the user needs to rollback
				to a previous version, it will be easier for them to replace
				their current database with one of their backups. The primary
				purpose of a Down() function is to help contributors move across
				development branches that have different schema definitions.

func (Migration) Migrate

func (m Migration) Migrate(client *Client) error

Migrate runs one migration's Up() function, if it has not already been run

type Option

type Option interface {
	Backup() bool
}

Option to change behavior of Open()

func WithBackup

func WithBackup() Option

WithBackup returns a Backup

type Organization

type Organization struct {
	ID                   string   `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	DefaultRole          string   `protobuf:"bytes,3,opt,name=DefaultRole,proto3" json:"DefaultRole,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Organization) Descriptor

func (*Organization) Descriptor() ([]byte, []int)

func (*Organization) GetDefaultRole

func (m *Organization) GetDefaultRole() string

func (*Organization) GetID

func (m *Organization) GetID() string

func (*Organization) GetName

func (m *Organization) GetName() string

func (*Organization) ProtoMessage

func (*Organization) ProtoMessage()

func (*Organization) Reset

func (m *Organization) Reset()

func (*Organization) String

func (m *Organization) String() string

func (*Organization) XXX_DiscardUnknown

func (m *Organization) XXX_DiscardUnknown()

func (*Organization) XXX_Marshal

func (m *Organization) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Organization) XXX_Merge

func (m *Organization) XXX_Merge(src proto.Message)

func (*Organization) XXX_Size

func (m *Organization) XXX_Size() int

func (*Organization) XXX_Unmarshal

func (m *Organization) XXX_Unmarshal(b []byte) error

type OrganizationConfig

type OrganizationConfig struct {
	OrganizationID       string           `protobuf:"bytes,1,opt,name=OrganizationID,proto3" json:"OrganizationID,omitempty"`
	LogViewer            *LogViewerConfig `protobuf:"bytes,2,opt,name=LogViewer,proto3" json:"LogViewer,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*OrganizationConfig) Descriptor

func (*OrganizationConfig) Descriptor() ([]byte, []int)

func (*OrganizationConfig) GetLogViewer

func (m *OrganizationConfig) GetLogViewer() *LogViewerConfig

func (*OrganizationConfig) GetOrganizationID

func (m *OrganizationConfig) GetOrganizationID() string

func (*OrganizationConfig) ProtoMessage

func (*OrganizationConfig) ProtoMessage()

func (*OrganizationConfig) Reset

func (m *OrganizationConfig) Reset()

func (*OrganizationConfig) String

func (m *OrganizationConfig) String() string

func (*OrganizationConfig) XXX_DiscardUnknown

func (m *OrganizationConfig) XXX_DiscardUnknown()

func (*OrganizationConfig) XXX_Marshal

func (m *OrganizationConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*OrganizationConfig) XXX_Merge

func (m *OrganizationConfig) XXX_Merge(src proto.Message)

func (*OrganizationConfig) XXX_Size

func (m *OrganizationConfig) XXX_Size() int

func (*OrganizationConfig) XXX_Unmarshal

func (m *OrganizationConfig) XXX_Unmarshal(b []byte) error

type OrganizationConfigStore

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

OrganizationConfigStore uses bolt to store and retrieve organization configurations

func (*OrganizationConfigStore) FindOrCreate

func (s *OrganizationConfigStore) FindOrCreate(ctx context.Context, orgID string) (*cmp.OrganizationConfig, error)

FindOrCreate gets an OrganizationConfig from the store or creates one if none exists for this organization

func (*OrganizationConfigStore) Get

Get retrieves an OrganizationConfig from the store

func (*OrganizationConfigStore) Migrate

func (s *OrganizationConfigStore) Migrate(ctx context.Context) error

Migrate ...

func (*OrganizationConfigStore) Put

Put replaces the OrganizationConfig in the store

type OrganizationsStore

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

OrganizationsStore uses bolt to store and retrieve Organizations

func (*OrganizationsStore) Add

Add creates a new Organization in the OrganizationsStore

func (*OrganizationsStore) All

All returns all known organizations

func (*OrganizationsStore) CreateDefault

func (s *OrganizationsStore) CreateDefault(ctx context.Context) error

CreateDefault does a findOrCreate on the default organization

func (*OrganizationsStore) DefaultOrganization

func (s *OrganizationsStore) DefaultOrganization(ctx context.Context) (*cmp.Organization, error)

DefaultOrganization returns the default organization

func (*OrganizationsStore) Delete

Delete the organization from OrganizationsStore

func (*OrganizationsStore) Get

Get returns a Organization if the id exists. If an ID is provided in the query, the lookup time for an organization will be O(1). If Name is provided, the lookup time will be O(n). Get expects that only one of ID or Name will be specified, but will prefer ID over Name if both are specified.

func (*OrganizationsStore) Migrate

func (s *OrganizationsStore) Migrate(ctx context.Context) error

Migrate sets the default organization at runtime

func (*OrganizationsStore) Update

Update the organization in OrganizationsStore

type Query

type Query struct {
	Command              string       `protobuf:"bytes,1,opt,name=Command,proto3" json:"Command,omitempty"`
	DB                   string       `protobuf:"bytes,2,opt,name=DB,proto3" json:"DB,omitempty"`
	RP                   string       `protobuf:"bytes,3,opt,name=RP,proto3" json:"RP,omitempty"`
	GroupBys             []string     `protobuf:"bytes,4,rep,name=GroupBys,proto3" json:"GroupBys,omitempty"`
	Wheres               []string     `protobuf:"bytes,5,rep,name=Wheres,proto3" json:"Wheres,omitempty"`
	Label                string       `protobuf:"bytes,6,opt,name=Label,proto3" json:"Label,omitempty"`
	Range                *Range       `protobuf:"bytes,7,opt,name=Range,proto3" json:"Range,omitempty"`
	Source               string       `protobuf:"bytes,8,opt,name=Source,proto3" json:"Source,omitempty"`
	Shifts               []*TimeShift `protobuf:"bytes,9,rep,name=Shifts,proto3" json:"Shifts,omitempty"`
	Type                 string       `protobuf:"bytes,10,opt,name=Type,proto3" json:"Type,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func (*Query) Descriptor

func (*Query) Descriptor() ([]byte, []int)

func (*Query) GetCommand

func (m *Query) GetCommand() string

func (*Query) GetDB

func (m *Query) GetDB() string

func (*Query) GetGroupBys

func (m *Query) GetGroupBys() []string

func (*Query) GetLabel

func (m *Query) GetLabel() string

func (*Query) GetRP

func (m *Query) GetRP() string

func (*Query) GetRange

func (m *Query) GetRange() *Range

func (*Query) GetShifts

func (m *Query) GetShifts() []*TimeShift

func (*Query) GetSource

func (m *Query) GetSource() string

func (*Query) GetType

func (m *Query) GetType() string

func (*Query) GetWheres

func (m *Query) GetWheres() []string

func (*Query) ProtoMessage

func (*Query) ProtoMessage()

func (*Query) Reset

func (m *Query) Reset()

func (*Query) String

func (m *Query) String() string

func (*Query) XXX_DiscardUnknown

func (m *Query) XXX_DiscardUnknown()

func (*Query) XXX_Marshal

func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Query) XXX_Merge

func (m *Query) XXX_Merge(src proto.Message)

func (*Query) XXX_Size

func (m *Query) XXX_Size() int

func (*Query) XXX_Unmarshal

func (m *Query) XXX_Unmarshal(b []byte) error

type Range

type Range struct {
	Upper                int64    `protobuf:"varint,1,opt,name=Upper,proto3" json:"Upper,omitempty"`
	Lower                int64    `protobuf:"varint,2,opt,name=Lower,proto3" json:"Lower,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Range) Descriptor

func (*Range) Descriptor() ([]byte, []int)

func (*Range) GetLower

func (m *Range) GetLower() int64

func (*Range) GetUpper

func (m *Range) GetUpper() int64

func (*Range) ProtoMessage

func (*Range) ProtoMessage()

func (*Range) Reset

func (m *Range) Reset()

func (*Range) String

func (m *Range) String() string

func (*Range) XXX_DiscardUnknown

func (m *Range) XXX_DiscardUnknown()

func (*Range) XXX_Marshal

func (m *Range) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Range) XXX_Merge

func (m *Range) XXX_Merge(src proto.Message)

func (*Range) XXX_Size

func (m *Range) XXX_Size() int

func (*Range) XXX_Unmarshal

func (m *Range) XXX_Unmarshal(b []byte) error

type RenamableField

type RenamableField struct {
	InternalName         string   `protobuf:"bytes,1,opt,name=internalName,proto3" json:"internalName,omitempty"`
	DisplayName          string   `protobuf:"bytes,2,opt,name=displayName,proto3" json:"displayName,omitempty"`
	Visible              bool     `protobuf:"varint,3,opt,name=visible,proto3" json:"visible,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RenamableField) Descriptor

func (*RenamableField) Descriptor() ([]byte, []int)

func (*RenamableField) GetDisplayName

func (m *RenamableField) GetDisplayName() string

func (*RenamableField) GetInternalName

func (m *RenamableField) GetInternalName() string

func (*RenamableField) GetVisible

func (m *RenamableField) GetVisible() bool

func (*RenamableField) ProtoMessage

func (*RenamableField) ProtoMessage()

func (*RenamableField) Reset

func (m *RenamableField) Reset()

func (*RenamableField) String

func (m *RenamableField) String() string

func (*RenamableField) XXX_DiscardUnknown

func (m *RenamableField) XXX_DiscardUnknown()

func (*RenamableField) XXX_Marshal

func (m *RenamableField) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RenamableField) XXX_Merge

func (m *RenamableField) XXX_Merge(src proto.Message)

func (*RenamableField) XXX_Size

func (m *RenamableField) XXX_Size() int

func (*RenamableField) XXX_Unmarshal

func (m *RenamableField) XXX_Unmarshal(b []byte) error

type Role

type Role struct {
	Organization         string   `protobuf:"bytes,1,opt,name=Organization,proto3" json:"Organization,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Role) Descriptor

func (*Role) Descriptor() ([]byte, []int)

func (*Role) GetName

func (m *Role) GetName() string

func (*Role) GetOrganization

func (m *Role) GetOrganization() string

func (*Role) ProtoMessage

func (*Role) ProtoMessage()

func (*Role) Reset

func (m *Role) Reset()

func (*Role) String

func (m *Role) String() string

func (*Role) XXX_DiscardUnknown

func (m *Role) XXX_DiscardUnknown()

func (*Role) XXX_Marshal

func (m *Role) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Role) XXX_Merge

func (m *Role) XXX_Merge(src proto.Message)

func (*Role) XXX_Size

func (m *Role) XXX_Size() int

func (*Role) XXX_Unmarshal

func (m *Role) XXX_Unmarshal(b []byte) error

type Server

type Server struct {
	ID                   int64    `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	Username             string   `protobuf:"bytes,3,opt,name=Username,proto3" json:"Username,omitempty"`
	Password             string   `protobuf:"bytes,4,opt,name=Password,proto3" json:"Password,omitempty"`
	URL                  string   `protobuf:"bytes,5,opt,name=URL,proto3" json:"URL,omitempty"`
	SrcID                int64    `protobuf:"varint,6,opt,name=SrcID,proto3" json:"SrcID,omitempty"`
	Active               bool     `protobuf:"varint,7,opt,name=Active,proto3" json:"Active,omitempty"`
	Organization         string   `protobuf:"bytes,8,opt,name=Organization,proto3" json:"Organization,omitempty"`
	InsecureSkipVerify   bool     `protobuf:"varint,9,opt,name=InsecureSkipVerify,proto3" json:"InsecureSkipVerify,omitempty"`
	Type                 string   `protobuf:"bytes,10,opt,name=Type,proto3" json:"Type,omitempty"`
	MetadataJSON         string   `protobuf:"bytes,11,opt,name=MetadataJSON,proto3" json:"MetadataJSON,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Server) Descriptor

func (*Server) Descriptor() ([]byte, []int)

func (*Server) GetActive

func (m *Server) GetActive() bool

func (*Server) GetID

func (m *Server) GetID() int64

func (*Server) GetInsecureSkipVerify

func (m *Server) GetInsecureSkipVerify() bool

func (*Server) GetMetadataJSON

func (m *Server) GetMetadataJSON() string

func (*Server) GetName

func (m *Server) GetName() string

func (*Server) GetOrganization

func (m *Server) GetOrganization() string

func (*Server) GetPassword

func (m *Server) GetPassword() string

func (*Server) GetSrcID

func (m *Server) GetSrcID() int64

func (*Server) GetType

func (m *Server) GetType() string

func (*Server) GetURL

func (m *Server) GetURL() string

func (*Server) GetUsername

func (m *Server) GetUsername() string

func (*Server) ProtoMessage

func (*Server) ProtoMessage()

func (*Server) Reset

func (m *Server) Reset()

func (*Server) String

func (m *Server) String() string

func (*Server) XXX_DiscardUnknown

func (m *Server) XXX_DiscardUnknown()

func (*Server) XXX_Marshal

func (m *Server) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Server) XXX_Merge

func (m *Server) XXX_Merge(src proto.Message)

func (*Server) XXX_Size

func (m *Server) XXX_Size() int

func (*Server) XXX_Unmarshal

func (m *Server) XXX_Unmarshal(b []byte) error

type ServersStore

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

ServersStore is the bolt implementation to store servers in a store. Used store servers that are associated in some way with a source

func (*ServersStore) Add

func (s *ServersStore) Add(ctx context.Context, src cmp.Server) (cmp.Server, error)

Add creates a new Server in the ServerStore.

func (*ServersStore) All

func (s *ServersStore) All(ctx context.Context) ([]cmp.Server, error)

All returns all known servers

func (*ServersStore) Delete

func (s *ServersStore) Delete(ctx context.Context, src cmp.Server) error

Delete removes the Server from the ServersStore

func (*ServersStore) Get

func (s *ServersStore) Get(ctx context.Context, id int) (cmp.Server, error)

Get returns a Server if the id exists.

func (*ServersStore) Migrate

func (s *ServersStore) Migrate(ctx context.Context) error

Migrate ...

func (*ServersStore) Update

func (s *ServersStore) Update(ctx context.Context, src cmp.Server) error

Update a Server

type Source

type Source struct {
	ID                   int64    `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	Type                 string   `protobuf:"bytes,3,opt,name=Type,proto3" json:"Type,omitempty"`
	Username             string   `protobuf:"bytes,4,opt,name=Username,proto3" json:"Username,omitempty"`
	Password             string   `protobuf:"bytes,5,opt,name=Password,proto3" json:"Password,omitempty"`
	URL                  string   `protobuf:"bytes,6,opt,name=URL,proto3" json:"URL,omitempty"`
	Default              bool     `protobuf:"varint,7,opt,name=Default,proto3" json:"Default,omitempty"`
	Telegraf             string   `protobuf:"bytes,8,opt,name=Telegraf,proto3" json:"Telegraf,omitempty"`
	InsecureSkipVerify   bool     `protobuf:"varint,9,opt,name=InsecureSkipVerify,proto3" json:"InsecureSkipVerify,omitempty"`
	MetaURL              string   `protobuf:"bytes,10,opt,name=MetaURL,proto3" json:"MetaURL,omitempty"`
	SharedSecret         string   `protobuf:"bytes,11,opt,name=SharedSecret,proto3" json:"SharedSecret,omitempty"`
	Organization         string   `protobuf:"bytes,12,opt,name=Organization,proto3" json:"Organization,omitempty"`
	Role                 string   `protobuf:"bytes,13,opt,name=Role,proto3" json:"Role,omitempty"`
	DefaultRP            string   `protobuf:"bytes,14,opt,name=DefaultRP,proto3" json:"DefaultRP,omitempty"`
	Version              string   `protobuf:"bytes,15,opt,name=Version,proto3" json:"Version,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

DO NOT EDIT from here. You need to copy from internal/internal.pb.go, but except "func init()"

func (*Source) Descriptor

func (*Source) Descriptor() ([]byte, []int)

func (*Source) GetDefault

func (m *Source) GetDefault() bool

func (*Source) GetDefaultRP

func (m *Source) GetDefaultRP() string

func (*Source) GetID

func (m *Source) GetID() int64

func (*Source) GetInsecureSkipVerify

func (m *Source) GetInsecureSkipVerify() bool

func (*Source) GetMetaURL

func (m *Source) GetMetaURL() string

func (*Source) GetName

func (m *Source) GetName() string

func (*Source) GetOrganization

func (m *Source) GetOrganization() string

func (*Source) GetPassword

func (m *Source) GetPassword() string

func (*Source) GetRole

func (m *Source) GetRole() string

func (*Source) GetSharedSecret

func (m *Source) GetSharedSecret() string

func (*Source) GetTelegraf

func (m *Source) GetTelegraf() string

func (*Source) GetType

func (m *Source) GetType() string

func (*Source) GetURL

func (m *Source) GetURL() string

func (*Source) GetUsername

func (m *Source) GetUsername() string

func (*Source) GetVersion

func (m *Source) GetVersion() string

func (*Source) ProtoMessage

func (*Source) ProtoMessage()

func (*Source) Reset

func (m *Source) Reset()

func (*Source) String

func (m *Source) String() string

func (*Source) XXX_DiscardUnknown

func (m *Source) XXX_DiscardUnknown()

func (*Source) XXX_Marshal

func (m *Source) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Source) XXX_Merge

func (m *Source) XXX_Merge(src proto.Message)

func (*Source) XXX_Size

func (m *Source) XXX_Size() int

func (*Source) XXX_Unmarshal

func (m *Source) XXX_Unmarshal(b []byte) error

type SourcesStore

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

SourcesStore is a bolt implementation to store time-series source information.

func (*SourcesStore) Add

func (s *SourcesStore) Add(ctx context.Context, src cmp.Source) (cmp.Source, error)

Add creates a new Source in the SourceStore.

func (*SourcesStore) All

func (s *SourcesStore) All(ctx context.Context) ([]cmp.Source, error)

All returns all known sources

func (*SourcesStore) Delete

func (s *SourcesStore) Delete(ctx context.Context, src cmp.Source) error

Delete removes the Source from the SourcesStore

func (*SourcesStore) Get

func (s *SourcesStore) Get(ctx context.Context, id int) (cmp.Source, error)

Get returns a Source if the id exists.

func (*SourcesStore) Migrate

func (s *SourcesStore) Migrate(ctx context.Context) error

Migrate ...

func (*SourcesStore) Update

func (s *SourcesStore) Update(ctx context.Context, src cmp.Source) error

Update a Source

type TableOptions

type TableOptions struct {
	VerticalTimeAxis     bool            `protobuf:"varint,2,opt,name=verticalTimeAxis,proto3" json:"verticalTimeAxis,omitempty"`
	SortBy               *RenamableField `protobuf:"bytes,3,opt,name=sortBy,proto3" json:"sortBy,omitempty"`
	Wrapping             string          `protobuf:"bytes,4,opt,name=wrapping,proto3" json:"wrapping,omitempty"`
	FixFirstColumn       bool            `protobuf:"varint,6,opt,name=fixFirstColumn,proto3" json:"fixFirstColumn,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*TableOptions) Descriptor

func (*TableOptions) Descriptor() ([]byte, []int)

func (*TableOptions) GetFixFirstColumn

func (m *TableOptions) GetFixFirstColumn() bool

func (*TableOptions) GetSortBy

func (m *TableOptions) GetSortBy() *RenamableField

func (*TableOptions) GetVerticalTimeAxis

func (m *TableOptions) GetVerticalTimeAxis() bool

func (*TableOptions) GetWrapping

func (m *TableOptions) GetWrapping() string

func (*TableOptions) ProtoMessage

func (*TableOptions) ProtoMessage()

func (*TableOptions) Reset

func (m *TableOptions) Reset()

func (*TableOptions) String

func (m *TableOptions) String() string

func (*TableOptions) XXX_DiscardUnknown

func (m *TableOptions) XXX_DiscardUnknown()

func (*TableOptions) XXX_Marshal

func (m *TableOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TableOptions) XXX_Merge

func (m *TableOptions) XXX_Merge(src proto.Message)

func (*TableOptions) XXX_Size

func (m *TableOptions) XXX_Size() int

func (*TableOptions) XXX_Unmarshal

func (m *TableOptions) XXX_Unmarshal(b []byte) error

type Template

type Template struct {
	ID                   string           `protobuf:"bytes,1,opt,name=ID,proto3" json:"ID,omitempty"`
	TempVar              string           `protobuf:"bytes,2,opt,name=temp_var,json=tempVar,proto3" json:"temp_var,omitempty"`
	Values               []*TemplateValue `protobuf:"bytes,3,rep,name=values,proto3" json:"values,omitempty"`
	Type                 string           `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
	Label                string           `protobuf:"bytes,5,opt,name=label,proto3" json:"label,omitempty"`
	Query                *TemplateQuery   `protobuf:"bytes,6,opt,name=query,proto3" json:"query,omitempty"`
	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
	XXX_unrecognized     []byte           `json:"-"`
	XXX_sizecache        int32            `json:"-"`
}

func (*Template) Descriptor

func (*Template) Descriptor() ([]byte, []int)

func (*Template) GetID

func (m *Template) GetID() string

func (*Template) GetLabel

func (m *Template) GetLabel() string

func (*Template) GetQuery

func (m *Template) GetQuery() *TemplateQuery

func (*Template) GetTempVar

func (m *Template) GetTempVar() string

func (*Template) GetType

func (m *Template) GetType() string

func (*Template) GetValues

func (m *Template) GetValues() []*TemplateValue

func (*Template) ProtoMessage

func (*Template) ProtoMessage()

func (*Template) Reset

func (m *Template) Reset()

func (*Template) String

func (m *Template) String() string

func (*Template) XXX_DiscardUnknown

func (m *Template) XXX_DiscardUnknown()

func (*Template) XXX_Marshal

func (m *Template) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Template) XXX_Merge

func (m *Template) XXX_Merge(src proto.Message)

func (*Template) XXX_Size

func (m *Template) XXX_Size() int

func (*Template) XXX_Unmarshal

func (m *Template) XXX_Unmarshal(b []byte) error

type TemplateQuery

type TemplateQuery struct {
	Command              string   `protobuf:"bytes,1,opt,name=command,proto3" json:"command,omitempty"`
	Db                   string   `protobuf:"bytes,2,opt,name=db,proto3" json:"db,omitempty"`
	Rp                   string   `protobuf:"bytes,3,opt,name=rp,proto3" json:"rp,omitempty"`
	Measurement          string   `protobuf:"bytes,4,opt,name=measurement,proto3" json:"measurement,omitempty"`
	TagKey               string   `protobuf:"bytes,5,opt,name=tag_key,json=tagKey,proto3" json:"tag_key,omitempty"`
	FieldKey             string   `protobuf:"bytes,6,opt,name=field_key,json=fieldKey,proto3" json:"field_key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TemplateQuery) Descriptor

func (*TemplateQuery) Descriptor() ([]byte, []int)

func (*TemplateQuery) GetCommand

func (m *TemplateQuery) GetCommand() string

func (*TemplateQuery) GetDb

func (m *TemplateQuery) GetDb() string

func (*TemplateQuery) GetFieldKey

func (m *TemplateQuery) GetFieldKey() string

func (*TemplateQuery) GetMeasurement

func (m *TemplateQuery) GetMeasurement() string

func (*TemplateQuery) GetRp

func (m *TemplateQuery) GetRp() string

func (*TemplateQuery) GetTagKey

func (m *TemplateQuery) GetTagKey() string

func (*TemplateQuery) ProtoMessage

func (*TemplateQuery) ProtoMessage()

func (*TemplateQuery) Reset

func (m *TemplateQuery) Reset()

func (*TemplateQuery) String

func (m *TemplateQuery) String() string

func (*TemplateQuery) XXX_DiscardUnknown

func (m *TemplateQuery) XXX_DiscardUnknown()

func (*TemplateQuery) XXX_Marshal

func (m *TemplateQuery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TemplateQuery) XXX_Merge

func (m *TemplateQuery) XXX_Merge(src proto.Message)

func (*TemplateQuery) XXX_Size

func (m *TemplateQuery) XXX_Size() int

func (*TemplateQuery) XXX_Unmarshal

func (m *TemplateQuery) XXX_Unmarshal(b []byte) error

type TemplateValue

type TemplateValue struct {
	Type                 string   `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
	Value                string   `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	Selected             bool     `protobuf:"varint,3,opt,name=selected,proto3" json:"selected,omitempty"`
	Key                  string   `protobuf:"bytes,4,opt,name=key,proto3" json:"key,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TemplateValue) Descriptor

func (*TemplateValue) Descriptor() ([]byte, []int)

func (*TemplateValue) GetKey

func (m *TemplateValue) GetKey() string

func (*TemplateValue) GetSelected

func (m *TemplateValue) GetSelected() bool

func (*TemplateValue) GetType

func (m *TemplateValue) GetType() string

func (*TemplateValue) GetValue

func (m *TemplateValue) GetValue() string

func (*TemplateValue) ProtoMessage

func (*TemplateValue) ProtoMessage()

func (*TemplateValue) Reset

func (m *TemplateValue) Reset()

func (*TemplateValue) String

func (m *TemplateValue) String() string

func (*TemplateValue) XXX_DiscardUnknown

func (m *TemplateValue) XXX_DiscardUnknown()

func (*TemplateValue) XXX_Marshal

func (m *TemplateValue) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TemplateValue) XXX_Merge

func (m *TemplateValue) XXX_Merge(src proto.Message)

func (*TemplateValue) XXX_Size

func (m *TemplateValue) XXX_Size() int

func (*TemplateValue) XXX_Unmarshal

func (m *TemplateValue) XXX_Unmarshal(b []byte) error

type TimeShift

type TimeShift struct {
	Label                string   `protobuf:"bytes,1,opt,name=Label,proto3" json:"Label,omitempty"`
	Unit                 string   `protobuf:"bytes,2,opt,name=Unit,proto3" json:"Unit,omitempty"`
	Quantity             string   `protobuf:"bytes,3,opt,name=Quantity,proto3" json:"Quantity,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*TimeShift) Descriptor

func (*TimeShift) Descriptor() ([]byte, []int)

func (*TimeShift) GetLabel

func (m *TimeShift) GetLabel() string

func (*TimeShift) GetQuantity

func (m *TimeShift) GetQuantity() string

func (*TimeShift) GetUnit

func (m *TimeShift) GetUnit() string

func (*TimeShift) ProtoMessage

func (*TimeShift) ProtoMessage()

func (*TimeShift) Reset

func (m *TimeShift) Reset()

func (*TimeShift) String

func (m *TimeShift) String() string

func (*TimeShift) XXX_DiscardUnknown

func (m *TimeShift) XXX_DiscardUnknown()

func (*TimeShift) XXX_Marshal

func (m *TimeShift) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*TimeShift) XXX_Merge

func (m *TimeShift) XXX_Merge(src proto.Message)

func (*TimeShift) XXX_Size

func (m *TimeShift) XXX_Size() int

func (*TimeShift) XXX_Unmarshal

func (m *TimeShift) XXX_Unmarshal(b []byte) error

type User

type User struct {
	ID                   uint64   `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Name                 string   `protobuf:"bytes,2,opt,name=Name,proto3" json:"Name,omitempty"`
	Provider             string   `protobuf:"bytes,3,opt,name=Provider,proto3" json:"Provider,omitempty"`
	Scheme               string   `protobuf:"bytes,4,opt,name=Scheme,proto3" json:"Scheme,omitempty"`
	Roles                []*Role  `protobuf:"bytes,5,rep,name=Roles,proto3" json:"Roles,omitempty"`
	SuperAdmin           bool     `protobuf:"varint,6,opt,name=SuperAdmin,proto3" json:"SuperAdmin,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*User) Descriptor

func (*User) Descriptor() ([]byte, []int)

func (*User) GetID

func (m *User) GetID() uint64

func (*User) GetName

func (m *User) GetName() string

func (*User) GetProvider

func (m *User) GetProvider() string

func (*User) GetRoles

func (m *User) GetRoles() []*Role

func (*User) GetScheme

func (m *User) GetScheme() string

func (*User) GetSuperAdmin

func (m *User) GetSuperAdmin() bool

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) Reset

func (m *User) Reset()

func (*User) String

func (m *User) String() string

func (*User) XXX_DiscardUnknown

func (m *User) XXX_DiscardUnknown()

func (*User) XXX_Marshal

func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*User) XXX_Merge

func (m *User) XXX_Merge(src proto.Message)

func (*User) XXX_Size

func (m *User) XXX_Size() int

func (*User) XXX_Unmarshal

func (m *User) XXX_Unmarshal(b []byte) error

type UsersStore

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

UsersStore uses bolt to store and retrieve users

func (*UsersStore) Add

func (s *UsersStore) Add(ctx context.Context, u *cmp.User) (*cmp.User, error)

Add a new User to the UsersStore.

func (*UsersStore) All

func (s *UsersStore) All(ctx context.Context) ([]cmp.User, error)

All returns all users

func (*UsersStore) Delete

func (s *UsersStore) Delete(ctx context.Context, u *cmp.User) error

Delete a user from the UsersStore

func (*UsersStore) Get

func (s *UsersStore) Get(ctx context.Context, q cmp.UserQuery) (*cmp.User, error)

Get searches the UsersStore for user with name

func (*UsersStore) Num

func (s *UsersStore) Num(ctx context.Context) (int, error)

Num returns the number of users in the UsersStore

func (*UsersStore) Update

func (s *UsersStore) Update(ctx context.Context, u *cmp.User) error

Update a user

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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