stacks

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: 12

Documentation

Overview

Package stacks is a generated protocol buffer package.

It is generated from these files:

github.com/appcelerator/amp/data/stacks/stacks.proto

It has these top-level messages:

Stack

Index

Constants

View Source
const (
	InvalidName   = Error("name is invalid")
	AlreadyExists = Error("stack already exists")
	NotFound      = Error("stack not found")
)

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 stack
	Create(ctx context.Context, name string) (stack *Stack, err error)

	// Get fetches a stack by id
	Get(ctx context.Context, id string) (stack *Stack, err error)

	// GetByName fetches a stack by name
	GetByName(ctx context.Context, name string) (stack *Stack, err error)

	// GetByFragmentOrName fetches a stack by fragment ID or name
	GetByFragmentOrName(ctx context.Context, fragmentOrName string) (stack *Stack, err error)

	// List lists stacks
	List(ctx context.Context) (stacks []*Stack, err error)

	// Delete deletes a stack by id
	Delete(ctx context.Context, id string) (err error)
}

Interface defines the stack data access layer

type Stack

type Stack 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"`
}

func (*Stack) Descriptor

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

func (*Stack) GetCreateDt

func (m *Stack) GetCreateDt() int64

func (*Stack) GetId

func (m *Stack) GetId() string

func (*Stack) GetName

func (m *Stack) GetName() string

func (*Stack) GetOwner

func (m *Stack) GetOwner() *accounts.Account

func (*Stack) ProtoMessage

func (*Stack) ProtoMessage()

func (*Stack) Reset

func (m *Stack) Reset()

func (*Stack) String

func (m *Stack) String() string

func (*Stack) Validate

func (f *Stack) Validate() (err error)

Validate validates Stack

type Store

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

Store implements stack data.Interface

func NewStore

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

NewStore returns an etcd implementation of stacks.Interface

func (*Store) Create added in v0.12.0

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

Create creates a new stack

func (*Store) Delete added in v0.12.0

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

Delete deletes a stack by id

func (*Store) Get added in v0.12.0

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

Get fetches a stack by id

func (*Store) GetByFragmentOrName added in v0.12.0

func (s *Store) GetByFragmentOrName(ctx context.Context, fragmentOrName string) (stack *Stack, err error)

GetByFragmentOrName fetches a stack by fragment ID or name

func (*Store) GetByName added in v0.12.0

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

GetByName fetches a stack by name

func (*Store) List added in v0.12.0

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

List lists stacks

Jump to

Keyboard shortcuts

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