etcd

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizeProjectContext added in v0.1.4

func AuthorizeProjectContext(ctx *c.Context, tenantId string) bool

func Init

func Init(etcd *config.Database) *client

Init

func IsAdminContext added in v0.1.4

func IsAdminContext(ctx *c.Context) bool

Types

type Client

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

Client

func NewClient

func NewClient(etcd *config.Database) *Client

NewClient

func (*Client) CreateDock

func (c *Client) CreateDock(ctx *c.Context, dck *model.DockSpec) (*model.DockSpec, error)

CreateDock

func (*Client) CreatePool

func (c *Client) CreatePool(ctx *c.Context, pol *model.StoragePoolSpec) (*model.StoragePoolSpec, error)

CreatePool

func (*Client) CreateVolumeGroup added in v0.1.8

func (c *Client) CreateVolumeGroup(ctx *c.Context, vg *model.VolumeGroupSpec) (*model.VolumeGroupSpec, error)

func (*Client) DeleteDock

func (c *Client) DeleteDock(ctx *c.Context, dckID string) error

DeleteDock

func (*Client) DeletePool

func (c *Client) DeletePool(ctx *c.Context, polID string) error

DeletePool

func (*Client) DeleteVolume

func (c *Client) DeleteVolume(ctx *c.Context, volID string) error

DeleteVolume

func (*Client) FilterAndSort added in v0.12.0

func (c *Client) FilterAndSort(src interface{}, params map[string][]string, sortableKeys []string) interface{}

func (*Client) GetDock

func (c *Client) GetDock(ctx *c.Context, dckID string) (*model.DockSpec, error)

GetDock

func (*Client) GetDockByPoolId

func (c *Client) GetDockByPoolId(ctx *c.Context, poolId string) (*model.DockSpec, error)

GetDockByPoolId

func (*Client) GetLimit added in v0.1.4

func (c *Client) GetLimit(m map[string][]string) int

Get parameter limit

func (*Client) GetOffset added in v0.1.4

func (c *Client) GetOffset(m map[string][]string, size int) int

Get parameter offset

func (*Client) GetPool

func (c *Client) GetPool(ctx *c.Context, polID string) (*model.StoragePoolSpec, error)

GetPool

func (*Client) GetSortDir added in v0.1.4

func (c *Client) GetSortDir(m map[string][]string) string

Get parameter sortDir

func (*Client) GetSortKey added in v0.1.4

func (c *Client) GetSortKey(m map[string][]string, sortKeys []string) string

Get parameter sortKey

func (*Client) GetVolume

func (c *Client) GetVolume(ctx *c.Context, volID string) (*model.VolumeSpec, error)

GetVolume

func (*Client) GetVolumeGroup added in v0.1.8

func (c *Client) GetVolumeGroup(ctx *c.Context, vgId string) (*model.VolumeGroupSpec, error)

func (*Client) IsInArray added in v0.1.4

func (c *Client) IsInArray(e string, s []string) bool

IsInArray

func (*Client) ListDocks

func (c *Client) ListDocks(ctx *c.Context) ([]*model.DockSpec, error)

ListDocks

func (*Client) ListDocksWithFilter added in v0.1.4

func (c *Client) ListDocksWithFilter(ctx *c.Context, m map[string][]string) ([]*model.DockSpec, error)

func (*Client) ListPools

func (c *Client) ListPools(ctx *c.Context) ([]*model.StoragePoolSpec, error)

ListPools

func (*Client) ListPoolsWithFilter added in v0.1.4

func (c *Client) ListPoolsWithFilter(ctx *c.Context, m map[string][]string) ([]*model.StoragePoolSpec, error)

func (*Client) ListVolumes

func (c *Client) ListVolumes(ctx *c.Context) ([]*model.VolumeSpec, error)

ListVolumes

func (*Client) ListVolumesByGroupId added in v0.1.8

func (c *Client) ListVolumesByGroupId(ctx *c.Context, vgId string) ([]*model.VolumeSpec, error)

func (*Client) ParameterFilter added in v0.1.4

func (c *Client) ParameterFilter(m map[string][]string, size int, sortKeys []string) *Parameter

ParameterFilter

func (*Client) SelectOrNot added in v0.1.4

func (c *Client) SelectOrNot(m map[string][]string) bool

func (*Client) UpdateDock

func (c *Client) UpdateDock(ctx *c.Context, dckID, name, desp string) (*model.DockSpec, error)

UpdateDock

func (*Client) UpdatePool

func (c *Client) UpdatePool(ctx *c.Context, polID, name, desp string, usedCapacity int64, used bool) (*model.StoragePoolSpec, error)

UpdatePool

func (*Client) UpdateStatus added in v0.1.8

func (c *Client) UpdateStatus(ctx *c.Context, in interface{}, status string) error

func (*Client) UpdateVolume

func (c *Client) UpdateVolume(ctx *c.Context, vol *model.VolumeSpec) (*model.VolumeSpec, error)

UpdateVolume ...

func (*Client) UpdateVolumeGroup added in v0.1.8

func (c *Client) UpdateVolumeGroup(ctx *c.Context, vgUpdate *model.VolumeGroupSpec) (*model.VolumeGroupSpec, error)

func (*Client) VolumesToUpdate added in v0.1.8

func (c *Client) VolumesToUpdate(ctx *c.Context, volumeList []*model.VolumeSpec) ([]*model.VolumeSpec, error)

type Parameter added in v0.1.4

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

Parameter

type Request

type Request struct {
	Url        string `json:"url"`
	Content    string `json:"content"`
	NewContent string `json:"newContent"`
}

Request

type Response

type Response struct {
	Status  string   `json:"status"`
	Message []string `json:"message"`
	Error   string   `json:"error"`
}

Response

Jump to

Keyboard shortcuts

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