stacks

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: May 19, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

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")
	StackAlreadyExists = Error("stack already exists")
	StackNotFound      = 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 {
	// CreateStack creates a new stack
	CreateStack(ctx context.Context, name string) (stack *Stack, err error)

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

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

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

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

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

	// Reset resets the stack store
	Reset(ctx context.Context)
}

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(store storage.Interface, accounts accounts.Interface) *Store

NewStore returns an etcd implementation of stacks.Interface

func (*Store) CreateStack

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

CreateStack creates a new stack

func (*Store) DeleteStack

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

DeleteStack deletes a stack by id

func (*Store) GetStack

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

GetStack fetches a stack by id

func (*Store) GetStackByFragmentOrName added in v0.9.1

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

GetStackByFragmentOrName fetches a stack by fragment ID or name

func (*Store) GetStackByName

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

GetStackByName fetches a stack by name

func (*Store) ListStacks

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

ListStacks lists stacks

func (*Store) Reset

func (s *Store) Reset(ctx context.Context)

Reset resets the account store

Jump to

Keyboard shortcuts

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