etcd

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2018 License: Apache-2.0 Imports: 17 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) bool

func Init

func Init(edps []string) *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(edps []string) *Client

NewClient

func (*Client) AddExtraProperty

func (c *Client) AddExtraProperty(ctx *c.Context, prfID string, ext model.ExtraSpec) (*model.ExtraSpec, error)

AddExtraProperty

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) CreateProfile

func (c *Client) CreateProfile(ctx *c.Context, prf *model.ProfileSpec) (*model.ProfileSpec, error)

CreateProfile

func (*Client) CreateVolume

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

CreateVolume

func (*Client) CreateVolumeAttachment

func (c *Client) CreateVolumeAttachment(ctx *c.Context, attachment *model.VolumeAttachmentSpec) (*model.VolumeAttachmentSpec, error)

CreateVolumeAttachment

func (*Client) CreateVolumeSnapshot

func (c *Client) CreateVolumeSnapshot(ctx *c.Context, snp *model.VolumeSnapshotSpec) (*model.VolumeSnapshotSpec, error)

CreateVolumeSnapshot

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) DeleteProfile

func (c *Client) DeleteProfile(ctx *c.Context, prfID string) error

DeleteProfile

func (*Client) DeleteVolume

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

DeleteVolume

func (*Client) DeleteVolumeAttachment

func (c *Client) DeleteVolumeAttachment(ctx *c.Context, attachmentId string) error

DeleteVolumeAttachment

func (*Client) DeleteVolumeSnapshot

func (c *Client) DeleteVolumeSnapshot(ctx *c.Context, snpID string) error

DeleteVolumeSnapshot

func (*Client) ExtendVolume added in v0.1.1

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

ExtendVolume ...

func (*Client) FindAttachmentValue added in v0.1.4

func (c *Client) FindAttachmentValue(k string, p *model.VolumeAttachmentSpec) string

func (*Client) FindDockValue added in v0.1.4

func (c *Client) FindDockValue(k string, d *model.DockSpec) string

func (*Client) FindPoolValue added in v0.1.4

func (c *Client) FindPoolValue(k string, p *model.StoragePoolSpec) string

func (*Client) FindProfileValue added in v0.1.4

func (c *Client) FindProfileValue(k string, p *model.ProfileSpec) string

func (*Client) FindSnapshotsValue added in v0.1.4

func (c *Client) FindSnapshotsValue(k string, p *model.VolumeSnapshotSpec) string

func (*Client) FindVolumeValue added in v0.1.4

func (c *Client) FindVolumeValue(k string, p *model.VolumeSpec) string

func (*Client) GetDefaultProfile

func (c *Client) GetDefaultProfile(ctx *c.Context) (*model.ProfileSpec, error)

GetDefaultProfile

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) GetProfile

func (c *Client) GetProfile(ctx *c.Context, prfID string) (*model.ProfileSpec, error)

GetProfile

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) GetVolumeAttachment

func (c *Client) GetVolumeAttachment(ctx *c.Context, attachmentId string) (*model.VolumeAttachmentSpec, error)

func (*Client) GetVolumeSnapshot

func (c *Client) GetVolumeSnapshot(ctx *c.Context, snpID string) (*model.VolumeSnapshotSpec, 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) ListExtraProperties

func (c *Client) ListExtraProperties(ctx *c.Context, prfID string) (*model.ExtraSpec, error)

ListExtraProperties

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) ListProfiles

func (c *Client) ListProfiles(ctx *c.Context) ([]*model.ProfileSpec, error)

ListProfiles

func (*Client) ListProfilesWithFilter added in v0.1.4

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

func (*Client) ListVolumeAttachments

func (c *Client) ListVolumeAttachments(ctx *c.Context, volumeId string) ([]*model.VolumeAttachmentSpec, error)

ListVolumeAttachments

func (*Client) ListVolumeAttachmentsWithFilter added in v0.1.4

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

func (*Client) ListVolumeSnapshots

func (c *Client) ListVolumeSnapshots(ctx *c.Context) ([]*model.VolumeSnapshotSpec, error)

ListVolumeSnapshots

func (*Client) ListVolumeSnapshotsWithFilter added in v0.1.4

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

func (*Client) ListVolumes

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

ListVolumes

func (*Client) ListVolumesWithFilter added in v0.1.4

func (c *Client) ListVolumesWithFilter(ctx *c.Context, m map[string][]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) RemoveExtraProperty

func (c *Client) RemoveExtraProperty(ctx *c.Context, prfID, extraKey string) error

RemoveExtraProperty

func (*Client) SelectDocks added in v0.1.4

func (c *Client) SelectDocks(m map[string][]string, docks []*model.DockSpec) []*model.DockSpec

func (*Client) SelectOrNot added in v0.1.4

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

func (*Client) SelectPools added in v0.1.4

func (c *Client) SelectPools(m map[string][]string, pools []*model.StoragePoolSpec) []*model.StoragePoolSpec

func (*Client) SelectProfiles added in v0.1.4

func (c *Client) SelectProfiles(m map[string][]string, profiles []*model.ProfileSpec) []*model.ProfileSpec

func (*Client) SelectSnapshots added in v0.1.4

func (c *Client) SelectSnapshots(m map[string][]string, snapshots []*model.VolumeSnapshotSpec) []*model.VolumeSnapshotSpec

func (*Client) SelectVolumeAttachments added in v0.1.4

func (c *Client) SelectVolumeAttachments(m map[string][]string, attachments []*model.VolumeAttachmentSpec) []*model.VolumeAttachmentSpec

func (*Client) SelectVolumes added in v0.1.4

func (c *Client) SelectVolumes(m map[string][]string, volumes []*model.VolumeSpec) []*model.VolumeSpec

func (*Client) SortDocks added in v0.1.4

func (c *Client) SortDocks(dcks []*model.DockSpec, p *Parameter) []*model.DockSpec

func (*Client) SortPools added in v0.1.4

func (c *Client) SortPools(pools []*model.StoragePoolSpec, p *Parameter) []*model.StoragePoolSpec

func (*Client) SortProfiles added in v0.1.4

func (c *Client) SortProfiles(profiles []*model.ProfileSpec, p *Parameter) []*model.ProfileSpec

func (*Client) SortSnapshots added in v0.1.4

func (c *Client) SortSnapshots(snapshots []*model.VolumeSnapshotSpec, p *Parameter) []*model.VolumeSnapshotSpec

func (*Client) SortVolumeAttachments added in v0.1.4

func (c *Client) SortVolumeAttachments(attachments []*model.VolumeAttachmentSpec, p *Parameter) []*model.VolumeAttachmentSpec

func (*Client) SortVolumes added in v0.1.4

func (c *Client) SortVolumes(volumes []*model.VolumeSpec, p *Parameter) []*model.VolumeSpec

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) UpdateProfile

func (c *Client) UpdateProfile(ctx *c.Context, prfID string, input *model.ProfileSpec) (*model.ProfileSpec, error)

UpdateProfile

func (*Client) UpdateVolume

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

UpdateVolume ...

func (*Client) UpdateVolumeAttachment

func (c *Client) UpdateVolumeAttachment(ctx *c.Context, attachmentId string, attachment *model.VolumeAttachmentSpec) (*model.VolumeAttachmentSpec, error)

UpdateVolumeAttachment

func (*Client) UpdateVolumeSnapshot

func (c *Client) UpdateVolumeSnapshot(ctx *c.Context, snpID string, snp *model.VolumeSnapshotSpec) (*model.VolumeSnapshotSpec, error)

UpdateVolumeSnapshot

type DockSlice added in v0.1.4

type DockSlice []*model.DockSpec

func (DockSlice) Len added in v0.1.4

func (dock DockSlice) Len() int

func (DockSlice) Less added in v0.1.4

func (dock DockSlice) Less(i, j int) bool

func (DockSlice) Swap added in v0.1.4

func (dock DockSlice) Swap(i, j int)

type Parameter added in v0.1.4

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

Parameter

type ProfileSlice added in v0.1.4

type ProfileSlice []*model.ProfileSpec

func (ProfileSlice) Len added in v0.1.4

func (profile ProfileSlice) Len() int

func (ProfileSlice) Less added in v0.1.4

func (profile ProfileSlice) Less(i, j int) bool

func (ProfileSlice) Swap added in v0.1.4

func (profile ProfileSlice) Swap(i, j int)

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

type StoragePoolSlice added in v0.1.4

type StoragePoolSlice []*model.StoragePoolSpec

func (StoragePoolSlice) Len added in v0.1.4

func (pool StoragePoolSlice) Len() int

func (StoragePoolSlice) Less added in v0.1.4

func (pool StoragePoolSlice) Less(i, j int) bool

func (StoragePoolSlice) Swap added in v0.1.4

func (pool StoragePoolSlice) Swap(i, j int)

type VolumeAttachmentSlice added in v0.1.4

type VolumeAttachmentSlice []*model.VolumeAttachmentSpec

func (VolumeAttachmentSlice) Len added in v0.1.4

func (volumeAttachment VolumeAttachmentSlice) Len() int

func (VolumeAttachmentSlice) Less added in v0.1.4

func (volumeAttachment VolumeAttachmentSlice) Less(i, j int) bool

func (VolumeAttachmentSlice) Swap added in v0.1.4

func (volumeAttachment VolumeAttachmentSlice) Swap(i, j int)

type VolumeSlice added in v0.1.4

type VolumeSlice []*model.VolumeSpec

func (VolumeSlice) Len added in v0.1.4

func (volume VolumeSlice) Len() int

func (VolumeSlice) Less added in v0.1.4

func (volume VolumeSlice) Less(i, j int) bool

func (VolumeSlice) Swap added in v0.1.4

func (volume VolumeSlice) Swap(i, j int)

type VolumeSnapshotSlice added in v0.1.4

type VolumeSnapshotSlice []*model.VolumeSnapshotSpec

func (VolumeSnapshotSlice) Len added in v0.1.4

func (volumeSnapshot VolumeSnapshotSlice) Len() int

func (VolumeSnapshotSlice) Less added in v0.1.4

func (volumeSnapshot VolumeSnapshotSlice) Less(i, j int) bool

func (VolumeSnapshotSlice) Swap added in v0.1.4

func (volumeSnapshot VolumeSnapshotSlice) Swap(i, j int)

Jump to

Keyboard shortcuts

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