fake_core

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	NowFn                func() error
	AsyncFn              func() error
	CancellableWaitForFn func(string, time.Duration, time.Duration, func() (bool, error)) error
	GetStatusFn          func() *model.ActionStatus
}

func (*Action) Async

func (a *Action) Async() error

func (*Action) CancellableWaitFor

func (a *Action) CancellableWaitFor(desc string, d time.Duration, i time.Duration, fn func() (bool, error)) error

func (*Action) GetStatus

func (a *Action) GetStatus() *model.ActionStatus

func (*Action) Now

func (a *Action) Now() error

type DB

type DB struct {
	CreateFn  func(model.Model) error
	SaveFn    func(model.Model) error
	FindFn    func(out interface{}, where ...interface{}) error
	FirstFn   func(out interface{}, where ...interface{}) error
	DeleteFn  func(m model.Model) error
	PreloadFn func(column string, conditions ...interface{}) core.DBInterface
	WhereFn   func(query interface{}, args ...interface{}) core.DBInterface
	LimitFn   func(limit interface{}) core.DBInterface
	OffsetFn  func(offset interface{}) core.DBInterface
	ModelFn   func(value interface{}) core.DBInterface
	UpdateFn  func(attrs ...interface{}) error
	CountFn   func(interface{}) error
}

func (*DB) Count

func (db *DB) Count(value interface{}) error

func (*DB) Create

func (db *DB) Create(m model.Model) error

func (*DB) Delete

func (db *DB) Delete(m model.Model) error

func (*DB) Find

func (db *DB) Find(out interface{}, where ...interface{}) error

func (*DB) First

func (db *DB) First(out interface{}, where ...interface{}) error

func (*DB) Limit

func (db *DB) Limit(limit interface{}) core.DBInterface

func (*DB) Model

func (db *DB) Model(value interface{}) core.DBInterface

func (*DB) Offset

func (db *DB) Offset(offset interface{}) core.DBInterface

func (*DB) Preload

func (db *DB) Preload(column string, conditions ...interface{}) core.DBInterface

func (*DB) Save

func (db *DB) Save(m model.Model) error

func (*DB) Update

func (db *DB) Update(attrs ...interface{}) error

func (*DB) Where

func (db *DB) Where(query interface{}, args ...interface{}) core.DBInterface

type EntrypointListeners

type EntrypointListeners struct {
	CreateFn          func(*model.EntrypointListener) error
	GetFn             func(*int64, model.Model) error
	GetWithIncludesFn func(*int64, model.Model, []string) error
	UpdateFn          func(*int64, model.Model, model.Model) error
	DeleteFn          func(*int64, *model.EntrypointListener) core.ActionInterface
}

func (*EntrypointListeners) Create

func (*EntrypointListeners) Delete

func (*EntrypointListeners) Get

func (c *EntrypointListeners) Get(id *int64, m model.Model) error

func (*EntrypointListeners) GetWithIncludes

func (c *EntrypointListeners) GetWithIncludes(id *int64, m model.Model, includes []string) error

func (*EntrypointListeners) Update

func (c *EntrypointListeners) Update(id *int64, oldM model.Model, m model.Model) error

type KubeResources

type KubeResources struct {
	CreateFn          func(*model.KubeResource) error
	GetFn             func(*int64, model.Model) error
	GetWithIncludesFn func(*int64, model.Model, []string) error
	UpdateFn          func(*int64, *model.KubeResource, *model.KubeResource) error
	DeleteFn          func(*int64, *model.KubeResource) core.ActionInterface
	StartFn           func(*int64, *model.KubeResource) core.ActionInterface
	StopFn            func(*int64, *model.KubeResource) core.ActionInterface
	RefreshFn         func(*model.KubeResource) error
}

func (*KubeResources) Create

func (c *KubeResources) Create(m *model.KubeResource) error

func (*KubeResources) Delete

func (*KubeResources) Get

func (c *KubeResources) Get(id *int64, m model.Model) error

func (*KubeResources) GetWithIncludes

func (c *KubeResources) GetWithIncludes(id *int64, m model.Model, includes []string) error

func (*KubeResources) Refresh

func (c *KubeResources) Refresh(m *model.KubeResource) error

func (*KubeResources) Start

func (*KubeResources) Stop

func (*KubeResources) Update

func (c *KubeResources) Update(id *int64, oldM *model.KubeResource, m *model.KubeResource) error

type KubernetesClient

type KubernetesClient struct {
	EnsureNamespaceFn                func(name string) error
	GetResourceFn                    func(kind string, namespace string, name string, out *json.RawMessage) error
	CreateResourceFn                 func(kind string, namespace string, objIn map[string]interface{}, out *json.RawMessage) error
	DeleteResourceFn                 func(kind string, namespace string, name string) error
	ListNamespacesFn                 func(query string) ([]*kubernetes.Namespace, error)
	ListEventsFn                     func(query string) ([]*kubernetes.Event, error)
	ListNodesFn                      func(query string) ([]*kubernetes.Node, error)
	ListPodsFn                       func(query string) ([]*kubernetes.Pod, error)
	ListNodeHeapsterStatsFn          func() ([]*kubernetes.HeapsterStats, error)
	ListPodHeapsterCPUUsageMetricsFn func(namespace string, name string) ([]*kubernetes.HeapsterMetric, error)
	ListPodHeapsterRAMUsageMetricsFn func(namespace string, name string) ([]*kubernetes.HeapsterMetric, error)
}

func (*KubernetesClient) CreateResource

func (k *KubernetesClient) CreateResource(kind string, namespace string, objIn map[string]interface{}, out *json.RawMessage) error

func (*KubernetesClient) DeleteResource

func (k *KubernetesClient) DeleteResource(kind string, namespace string, name string) error

func (*KubernetesClient) EnsureNamespace

func (k *KubernetesClient) EnsureNamespace(name string) error

func (*KubernetesClient) GetResource

func (k *KubernetesClient) GetResource(kind string, namespace string, name string, out *json.RawMessage) error

func (*KubernetesClient) ListEvents

func (k *KubernetesClient) ListEvents(query string) ([]*kubernetes.Event, error)

func (*KubernetesClient) ListNamespaces

func (k *KubernetesClient) ListNamespaces(query string) ([]*kubernetes.Namespace, error)

func (*KubernetesClient) ListNodeHeapsterStats

func (k *KubernetesClient) ListNodeHeapsterStats() ([]*kubernetes.HeapsterStats, error)

func (*KubernetesClient) ListNodes

func (k *KubernetesClient) ListNodes(query string) ([]*kubernetes.Node, error)

func (*KubernetesClient) ListPodHeapsterCPUUsageMetrics

func (k *KubernetesClient) ListPodHeapsterCPUUsageMetrics(namespace string, name string) ([]*kubernetes.HeapsterMetric, error)

func (*KubernetesClient) ListPodHeapsterRAMUsageMetrics

func (k *KubernetesClient) ListPodHeapsterRAMUsageMetrics(namespace string, name string) ([]*kubernetes.HeapsterMetric, error)

func (*KubernetesClient) ListPods

func (k *KubernetesClient) ListPods(query string) ([]*kubernetes.Pod, error)

type Nodes added in v0.11.2

type Nodes struct {
	CreateFn                       func(*model.Node) error
	GetFn                          func(*int64, model.Model) error
	GetWithIncludesFn              func(*int64, model.Model, []string) error
	UpdateFn                       func(*int64, model.Model, model.Model) error
	DeleteFn                       func(*int64, *model.Node) core.ActionInterface
	HasPodsWithReservedResourcesFn func(*model.Node) (bool, error)
}

func (*Nodes) Create added in v0.11.2

func (c *Nodes) Create(m *model.Node) error

func (*Nodes) Delete added in v0.11.2

func (c *Nodes) Delete(id *int64, m *model.Node) core.ActionInterface

func (*Nodes) Get added in v0.11.2

func (c *Nodes) Get(id *int64, m model.Model) error

func (*Nodes) GetWithIncludes added in v0.11.2

func (c *Nodes) GetWithIncludes(id *int64, m model.Model, includes []string) error

func (*Nodes) HasPodsWithReservedResources added in v0.11.2

func (c *Nodes) HasPodsWithReservedResources(m *model.Node) (bool, error)

func (*Nodes) Update added in v0.11.2

func (c *Nodes) Update(id *int64, oldM model.Model, m model.Model) error

type Provider

type Provider struct {
	ValidateAccountFn            func(*model.CloudAccount) error
	CreateKubeFn                 func(*model.Kube, *core.Action) error
	DeleteKubeFn                 func(*model.Kube) error
	CreateNodeFn                 func(*model.Node, *core.Action) error
	DeleteNodeFn                 func(*model.Node) error
	CreateVolumeFn               func(*model.Volume, *core.Action) error
	KubernetesVolumeDefinitionFn func(*model.Volume) *kubernetes.Volume
	WaitForVolumeAvailableFn     func(*model.Volume, *core.Action) error
	ResizeVolumeFn               func(*model.Volume, *core.Action) error
	DeleteVolumeFn               func(*model.Volume) error
	CreateEntrypointFn           func(*model.Entrypoint, *core.Action) error
	DeleteEntrypointFn           func(*model.Entrypoint) error
	CreateEntrypointListenerFn   func(*model.EntrypointListener) error
	DeleteEntrypointListenerFn   func(*model.EntrypointListener) error
}

func (*Provider) CreateEntrypoint

func (p *Provider) CreateEntrypoint(m *model.Entrypoint, a *core.Action) error

func (*Provider) CreateEntrypointListener

func (p *Provider) CreateEntrypointListener(m *model.EntrypointListener) error

func (*Provider) CreateKube

func (p *Provider) CreateKube(m *model.Kube, a *core.Action) error

func (*Provider) CreateNode

func (p *Provider) CreateNode(m *model.Node, a *core.Action) error

func (*Provider) CreateVolume

func (p *Provider) CreateVolume(m *model.Volume, a *core.Action) error

func (*Provider) DeleteEntrypoint

func (p *Provider) DeleteEntrypoint(m *model.Entrypoint) error

func (*Provider) DeleteEntrypointListener

func (p *Provider) DeleteEntrypointListener(m *model.EntrypointListener) error

func (*Provider) DeleteKube

func (p *Provider) DeleteKube(m *model.Kube) error

func (*Provider) DeleteNode

func (p *Provider) DeleteNode(m *model.Node) error

func (*Provider) DeleteVolume

func (p *Provider) DeleteVolume(m *model.Volume) error

func (*Provider) KubernetesVolumeDefinition

func (p *Provider) KubernetesVolumeDefinition(m *model.Volume) *kubernetes.Volume

func (*Provider) ResizeVolume

func (p *Provider) ResizeVolume(m *model.Volume, a *core.Action) error

func (*Provider) ValidateAccount

func (p *Provider) ValidateAccount(m *model.CloudAccount) error

func (*Provider) WaitForVolumeAvailable

func (p *Provider) WaitForVolumeAvailable(m *model.Volume, a *core.Action) error

type Provisioner

type Provisioner struct {
	ProvisionFn func(*model.KubeResource) error
	IsRunningFn func(*model.KubeResource) (bool, error)
	TeardownFn  func(*model.KubeResource) error
}

func (*Provisioner) IsRunning

func (p *Provisioner) IsRunning(m *model.KubeResource) (bool, error)

func (*Provisioner) Provision

func (p *Provisioner) Provision(m *model.KubeResource) error

func (*Provisioner) Teardown

func (p *Provisioner) Teardown(m *model.KubeResource) error

type Sessions added in v0.11.2

type Sessions struct {
	ClientFn func(id string) *client.Client
	ListFn   func() []*model.Session
	CreateFn func(*model.Session) error
	GetFn    func(id string, m *model.Session) error
	DeleteFn func(id string) error
}

func (*Sessions) Client added in v0.11.2

func (f *Sessions) Client(id string) *client.Client

func (*Sessions) Create added in v0.11.2

func (f *Sessions) Create(m *model.Session) error

func (*Sessions) Delete added in v0.11.2

func (f *Sessions) Delete(id string) error

func (*Sessions) Get added in v0.11.2

func (f *Sessions) Get(id string, m *model.Session) error

func (*Sessions) List added in v0.11.2

func (f *Sessions) List() []*model.Session

type Volumes

type Volumes struct {
	CreateFn           func(*model.Volume) error
	GetFn              func(*int64, model.Model) error
	GetWithIncludesFn  func(*int64, model.Model, []string) error
	UpdateFn           func(*int64, *model.Volume, *model.Volume) error
	DeleteFn           func(*int64, *model.Volume) core.ActionInterface
	ResizeFn           func(*int64, *model.Volume) core.ActionInterface
	WaitForAvailableFn func(*int64, *model.Volume) error
}

func (*Volumes) Create

func (c *Volumes) Create(m *model.Volume) error

func (*Volumes) Delete

func (c *Volumes) Delete(id *int64, m *model.Volume) core.ActionInterface

func (*Volumes) Get

func (c *Volumes) Get(id *int64, m model.Model) error

func (*Volumes) GetWithIncludes

func (c *Volumes) GetWithIncludes(id *int64, m model.Model, includes []string) error

func (*Volumes) Resize

func (c *Volumes) Resize(id *int64, m *model.Volume) core.ActionInterface

func (*Volumes) Update

func (c *Volumes) Update(id *int64, oldM *model.Volume, m *model.Volume) error

func (*Volumes) WaitForAvailable

func (c *Volumes) WaitForAvailable(id *int64, m *model.Volume) error

Jump to

Keyboard shortcuts

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