Documentation ¶
Overview ¶
Package dashboards is a generated protocol buffer package.
It is generated from these files:
github.com/appcelerator/amp/data/dashboards/dashboards.proto
It has these top-level messages:
Dashboard
Index ¶
- Constants
- func CheckName(name string) (string, error)
- type Dashboard
- func (*Dashboard) Descriptor() ([]byte, []int)
- func (m *Dashboard) GetCreateDt() int64
- func (m *Dashboard) GetData() string
- func (m *Dashboard) GetId() string
- func (m *Dashboard) GetName() string
- func (m *Dashboard) GetOwner() *accounts.Account
- func (*Dashboard) ProtoMessage()
- func (m *Dashboard) Reset()
- func (m *Dashboard) String() string
- func (f *Dashboard) Validate() (err error)
- type Error
- type Interface
- type Store
- func (s *Store) Create(ctx context.Context, name string, data string) (dashboard *Dashboard, err error)
- func (s *Store) Delete(ctx context.Context, id string) error
- func (s *Store) Get(ctx context.Context, id string) (*Dashboard, error)
- func (s *Store) GetByName(ctx context.Context, name string) (dashboard *Dashboard, err error)
- func (s *Store) List(ctx context.Context) ([]*Dashboard, error)
- func (s *Store) Reset(ctx context.Context)
- func (s *Store) UpdateData(ctx context.Context, id string, data string) error
- func (s *Store) UpdateName(ctx context.Context, id string, name string) error
Constants ¶
View Source
const ( InvalidName = Error("name is invalid") AlreadyExists = Error("dashboard already exists") NotFound = Error("dashboard not found") )
Errors
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Dashboard ¶
type Dashboard struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` Owner *accounts.Account `protobuf:"bytes,3,opt,name=owner" json:"owner,omitempty"` CreateDt int64 `protobuf:"varint,4,opt,name=create_dt,json=createDt" json:"create_dt,omitempty"` Data string `protobuf:"bytes,5,opt,name=data" json:"data,omitempty"` }
func (*Dashboard) Descriptor ¶
func (*Dashboard) GetCreateDt ¶
func (*Dashboard) ProtoMessage ¶
func (*Dashboard) ProtoMessage()
type Interface ¶
type Interface interface { // Create creates a new dashboard Create(ctx context.Context, name string, data string) (dashboard *Dashboard, err error) // Get fetches a dashboard by id Get(ctx context.Context, id string) (dashboard *Dashboard, err error) // GetByName fetches a dashboard by name GetByName(ctx context.Context, name string) (dashboard *Dashboard, err error) // List lists dashboards List(ctx context.Context) (dashboards []*Dashboard, err error) // UpdateName renames the given dashboard UpdateName(ctx context.Context, id string, name string) (err error) // UpdateData updates the given dashboard data UpdateData(ctx context.Context, id string, data string) (err error) // Delete deletes a dashboard by id Delete(ctx context.Context, id string) (err error) // Reset resets the dashboard storage Reset(ctx context.Context) }
Interface defines the dashboard data access layer
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements dashboard data.Interface
func (*Store) Create ¶
func (s *Store) Create(ctx context.Context, name string, data string) (dashboard *Dashboard, err error)
Create creates a new dashboard
func (*Store) UpdateData ¶
UpdateData updates the given dashboard data
Click to show internal directories.
Click to hide internal directories.