object_stores

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2018 License: Apache-2.0 Imports: 11 Imported by: 4

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

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

func CheckName

func CheckName(name string) (string, error)

CheckName checks name

Types

type Error

type Error string

Error type

func (Error) Error

func (e Error) Error() string

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 NewStore

func NewStore(storage storage.Interface, accounts accounts.Interface) *Store

NewStore returns an etcd implementation of ObjectStore.Interface

func (*Store) Create

func (s *Store) Create(ctx context.Context, name string) (ostore *ObjectStore, err error)

Create creates a new objectStore

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, id string) error

Delete deletes an object store by id

func (*Store) Get

func (s *Store) Get(ctx context.Context, id string) (*ObjectStore, error)

Get fetches an object store by id

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

func (*Store) GetByName

func (s *Store) GetByName(ctx context.Context, name string) (ostore *ObjectStore, err error)

GetByName fetches an object store by name

func (*Store) List

func (s *Store) List(ctx context.Context) ([]*ObjectStore, error)

List lists object stores

func (*Store) UpdateLocation

func (s *Store) UpdateLocation(ctx context.Context, id string, location string) error

UpdateLocation updates the location of the object store

Jump to

Keyboard shortcuts

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