Documentation ¶
Overview ¶
Package object_stores is a generated protocol buffer package.
It is generated from these files:
github.com/appcelerator/amp/data/object_stores/object_stores.proto
It has these top-level messages:
ObjectStore
Index ¶
- Constants
- func CheckName(name string) (string, error)
- type Error
- type Interface
- type ObjectStore
- func (*ObjectStore) Descriptor() ([]byte, []int)
- func (m *ObjectStore) GetCreateDt() int64
- func (m *ObjectStore) GetId() string
- func (m *ObjectStore) GetLocation() string
- func (m *ObjectStore) GetName() string
- func (m *ObjectStore) GetOwner() *accounts.Account
- func (*ObjectStore) ProtoMessage()
- func (m *ObjectStore) Reset()
- func (m *ObjectStore) String() string
- func (f *ObjectStore) Validate() (err error)
- type Store
- func (s *Store) Create(ctx context.Context, name string) (ostore *ObjectStore, err error)
- func (s *Store) Delete(ctx context.Context, id string) error
- func (s *Store) Get(ctx context.Context, id string) (*ObjectStore, error)
- func (s *Store) GetByFragmentOrName(ctx context.Context, fragmentOrName string) (ostore *ObjectStore, err error)
- func (s *Store) GetByName(ctx context.Context, name string) (ostore *ObjectStore, err error)
- func (s *Store) List(ctx context.Context) ([]*ObjectStore, error)
- func (s *Store) UpdateLocation(ctx context.Context, id string, location string) error
Constants ¶
View Source
const ( InvalidName = Error("name is invalid") AlreadyExists = Error("object store already exists, in this account or another") NotFound = Error("object store not found") NotImplemented = Error("object store not implemented for this provider") AlreadyOwnedByYou = Error("object store already exists on this account") )
Errors
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Interface ¶
type Interface interface { // Create creates a new object store Create(ctx context.Context, name string) (store *ObjectStore, err error) // Get fetches an object store by id Get(ctx context.Context, id string) (store *ObjectStore, err error) // GetByName fetches an object store by name GetByName(ctx context.Context, name string) (store *ObjectStore, err error) // GetByFragmentOrName fetches an object store by fragment ID or name GetByFragmentOrName(ctx context.Context, fragmentOrName string) (store *ObjectStore, err error) // List lists object stores List(ctx context.Context) (stores []*ObjectStore, err error) // Delete deletes an object store by id Delete(ctx context.Context, id string) (err error) // UpdateLocation updates the location of the object store UpdateLocation(ctx context.Context, id string, location string) (err error) }
Interface defines the object store data access layer
type ObjectStore ¶
type ObjectStore 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"` Location string `protobuf:"bytes,5,opt,name=location" json:"location,omitempty"` }
func (*ObjectStore) Descriptor ¶
func (*ObjectStore) Descriptor() ([]byte, []int)
func (*ObjectStore) GetCreateDt ¶
func (m *ObjectStore) GetCreateDt() int64
func (*ObjectStore) GetId ¶
func (m *ObjectStore) GetId() string
func (*ObjectStore) GetLocation ¶
func (m *ObjectStore) GetLocation() string
func (*ObjectStore) GetName ¶
func (m *ObjectStore) GetName() string
func (*ObjectStore) GetOwner ¶
func (m *ObjectStore) GetOwner() *accounts.Account
func (*ObjectStore) ProtoMessage ¶
func (*ObjectStore) ProtoMessage()
func (*ObjectStore) Reset ¶
func (m *ObjectStore) Reset()
func (*ObjectStore) String ¶
func (m *ObjectStore) String() string
func (*ObjectStore) Validate ¶
func (f *ObjectStore) Validate() (err error)
Validate validates Object store
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store implements ObjectStore data.Interface
func (*Store) GetByFragmentOrName ¶
func (s *Store) GetByFragmentOrName(ctx context.Context, fragmentOrName string) (ostore *ObjectStore, err error)
GetByFragmentOrName fetches an object store by fragment ID or name
Click to show internal directories.
Click to hide internal directories.