etcd

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: Apache-2.0 Imports: 21 Imported by: 4

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) AddCustomProperty added in v0.3.1

func (c *Client) AddCustomProperty(ctx *c.Context, prfID string, ext model.CustomPropertiesSpec) (*model.CustomPropertiesSpec, error)

AddCustomProperty

func (*Client) CreateDock

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

CreateDock

func (*Client) CreateFileShare added in v0.5.2

func (c *Client) CreateFileShare(ctx *c.Context, fshare *model.FileShareSpec) (*model.FileShareSpec, error)

func (*Client) CreateFileShareAcl added in v0.5.3

func (c *Client) CreateFileShareAcl(ctx *c.Context, fshare *model.FileShareAclSpec) (*model.FileShareAclSpec, error)

func (*Client) CreateFileShareSnapshot added in v0.5.2

func (c *Client) CreateFileShareSnapshot(ctx *c.Context, snp *model.FileShareSnapshotSpec) (*model.FileShareSnapshotSpec, error)

CreateFileShareSnapshot

func (*Client) CreateHost added in v0.12.0

func (c *Client) CreateHost(ctx *c.Context, host *model.HostSpec) (*model.HostSpec, error)

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) CreateReplication added in v0.1.8

func (c *Client) CreateReplication(ctx *c.Context, r *model.ReplicationSpec) (*model.ReplicationSpec, error)

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) CreateVolumeGroup added in v0.1.8

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

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) DeleteFileShare added in v0.5.2

func (c *Client) DeleteFileShare(ctx *c.Context, fileshareID string) error

DeleteFileShare

func (*Client) DeleteFileShareAcl added in v0.5.3

func (c *Client) DeleteFileShareAcl(ctx *c.Context, aclID string) error

DeleteFileShareAcl

func (*Client) DeleteFileShareSnapshot added in v0.5.2

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

DeleteFileShareSnapshot

func (*Client) DeleteHost added in v0.12.0

func (c *Client) DeleteHost(ctx *c.Context, hostId string) error

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) DeleteReplication added in v0.1.8

func (c *Client) DeleteReplication(ctx *c.Context, replicationId string) error

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) DeleteVolumeGroup added in v0.1.8

func (c *Client) DeleteVolumeGroup(ctx *c.Context, volumeGroupId string) error

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) FilterAndSort added in v0.12.0

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

func (*Client) FindFileShareValue added in v0.5.2

func (c *Client) FindFileShareValue(k string, p *model.FileShareSpec) 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) GetDefaultProfileFileShare added in v0.5.3

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

GetDefaultProfileFileShare

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) GetFileShare added in v0.5.2

func (c *Client) GetFileShare(ctx *c.Context, fshareID string) (*model.FileShareSpec, error)

GetFileShare

func (*Client) GetFileShareAcl added in v0.5.3

func (c *Client) GetFileShareAcl(ctx *c.Context, aclID string) (*model.FileShareAclSpec, error)

GetFileShareAcl

func (*Client) GetFileShareSnapshot added in v0.5.2

func (c *Client) GetFileShareSnapshot(ctx *c.Context, snpID string) (*model.FileShareSnapshotSpec, error)

func (*Client) GetHost added in v0.12.0

func (c *Client) GetHost(ctx *c.Context, hostId string) (*model.HostSpec, error)

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) GetReplication added in v0.1.8

func (c *Client) GetReplication(ctx *c.Context, replicationId string) (*model.ReplicationSpec, error)

func (*Client) GetReplicationByVolumeId added in v0.2.1

func (c *Client) GetReplicationByVolumeId(ctx *c.Context, volumeId string) (*model.ReplicationSpec, error)

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) GetVolumeGroup added in v0.1.8

func (c *Client) GetVolumeGroup(ctx *c.Context, vgId string) (*model.VolumeGroupSpec, 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) ListAttachmentsByVolumeId added in v0.5.1

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

func (*Client) ListAvailabilityZones added in v0.3.0

func (c *Client) ListAvailabilityZones(ctx *c.Context) ([]string, error)

ListAvailabilityZones

func (*Client) ListCustomProperties added in v0.3.1

func (c *Client) ListCustomProperties(ctx *c.Context, prfID string) (*model.CustomPropertiesSpec, error)

ListCustomProperties

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) ListFileShareAclsByShareId added in v0.5.5

func (c *Client) ListFileShareAclsByShareId(ctx *c.Context, fileshareId string) ([]*model.FileShareAclSpec, error)

func (*Client) ListFileShareSnapshots added in v0.5.2

func (c *Client) ListFileShareSnapshots(ctx *c.Context) ([]*model.FileShareSnapshotSpec, error)

ListFileShareSnapshots

func (*Client) ListFileShareSnapshotsWithFilter added in v0.5.2

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

func (*Client) ListFileShares added in v0.5.2

func (c *Client) ListFileShares(ctx *c.Context) ([]*model.FileShareSpec, error)

ListFileShares

func (*Client) ListFileSharesAcl added in v0.5.3

func (c *Client) ListFileSharesAcl(ctx *c.Context) ([]*model.FileShareAclSpec, error)

func (*Client) ListFileSharesAclWithFilter added in v0.5.3

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

func (*Client) ListFileSharesByProfileId added in v0.5.5

func (c *Client) ListFileSharesByProfileId(ctx *c.Context, prfId string) ([]string, error)

ListFileSharesByProfileId

func (*Client) ListFileSharesWithFilter added in v0.5.2

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

func (*Client) ListHosts added in v0.12.0

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

func (*Client) ListHostsByName added in v0.12.0

func (c *Client) ListHostsByName(ctx *c.Context, hostName string) ([]*model.HostSpec, 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) 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) ListReplication added in v0.1.8

func (c *Client) ListReplication(ctx *c.Context) ([]*model.ReplicationSpec, error)

func (*Client) ListReplicationWithFilter added in v0.1.8

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

func (*Client) ListSnapshotsByShareId added in v0.5.5

func (c *Client) ListSnapshotsByShareId(ctx *c.Context, fileshareId string) ([]*model.FileShareSnapshotSpec, error)

func (*Client) ListSnapshotsByVolumeId added in v0.1.8

func (c *Client) ListSnapshotsByVolumeId(ctx *c.Context, volumeId string) ([]*model.VolumeSnapshotSpec, 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) ListVolumeGroups added in v0.1.8

func (c *Client) ListVolumeGroups(ctx *c.Context) ([]*model.VolumeGroupSpec, error)

ListVolumes

func (*Client) ListVolumeGroupsWithFilter added in v0.1.10

func (c *Client) ListVolumeGroupsWithFilter(ctx *c.Context, m map[string][]string) ([]*model.VolumeGroupSpec, 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) ListVolumesByGroupId added in v0.1.8

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

func (*Client) ListVolumesByProfileId added in v0.5.5

func (c *Client) ListVolumesByProfileId(ctx *c.Context, prfID string) ([]string, error)

ListVolumesByProfileId

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) RemoveCustomProperty added in v0.3.1

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

RemoveCustomProperty

func (*Client) SelectOrNot added in v0.1.4

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

func (*Client) SelectReplication added in v0.1.8

func (c *Client) SelectReplication(param map[string][]string, replications []*model.ReplicationSpec) []*model.ReplicationSpec

func (*Client) SelectVolumeGroup added in v0.1.10

func (c *Client) SelectVolumeGroup(param map[string][]string, vgs []*model.VolumeGroupSpec) []*model.VolumeGroupSpec

func (*Client) SortFileShares added in v0.5.2

func (c *Client) SortFileShares(shares []*model.FileShareSpec, p *Parameter) []*model.FileShareSpec

func (*Client) SortReplications added in v0.1.8

func (c *Client) SortReplications(replications []*model.ReplicationSpec, p *Parameter) []*model.ReplicationSpec

func (*Client) SortVolumeGroups added in v0.1.10

func (c *Client) SortVolumeGroups(vgs []*model.VolumeGroupSpec, p *Parameter) []*model.VolumeGroupSpec

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) UpdateFileShare added in v0.5.2

func (c *Client) UpdateFileShare(ctx *c.Context, fshare *model.FileShareSpec) (*model.FileShareSpec, error)

UpdateFileShare ...

func (*Client) UpdateFileShareAcl added in v0.5.4

func (c *Client) UpdateFileShareAcl(ctx *c.Context, acl *model.FileShareAclSpec) (*model.FileShareAclSpec, error)

UpdateFileShareAcl

func (*Client) UpdateFileShareSnapshot added in v0.5.2

func (c *Client) UpdateFileShareSnapshot(ctx *c.Context, snpID string, snp *model.FileShareSnapshotSpec) (*model.FileShareSnapshotSpec, error)

UpdateFileShareSnapshot

func (*Client) UpdateHost added in v0.12.0

func (c *Client) UpdateHost(ctx *c.Context, host *model.HostSpec) (*model.HostSpec, error)

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) UpdateReplication added in v0.1.8

func (c *Client) UpdateReplication(ctx *c.Context, replicationId string, input *model.ReplicationSpec) (*model.ReplicationSpec, error)

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

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

UpdateVolumeAttachment

func (*Client) UpdateVolumeGroup added in v0.1.8

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

func (*Client) UpdateVolumeSnapshot

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

UpdateVolumeSnapshot

func (*Client) VolumesToUpdate added in v0.1.8

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

type FileShareSlice added in v0.5.2

type FileShareSlice []*model.FileShareSpec

func (FileShareSlice) Len added in v0.5.2

func (fileshare FileShareSlice) Len() int

func (FileShareSlice) Less added in v0.5.2

func (fileshare FileShareSlice) Less(i, j int) bool

func (FileShareSlice) Swap added in v0.5.2

func (fileshare FileShareSlice) Swap(i, j int)

type Parameter added in v0.1.4

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

Parameter

type ReplicationSlice added in v0.1.8

type ReplicationSlice []*model.ReplicationSpec

func (ReplicationSlice) Len added in v0.1.8

func (r ReplicationSlice) Len() int

func (ReplicationSlice) Less added in v0.1.8

func (r ReplicationSlice) Less(i, j int) bool

func (ReplicationSlice) Swap added in v0.1.8

func (r ReplicationSlice) Swap(i, j int)

type ReplicationsCompareFunc added in v0.1.8

type ReplicationsCompareFunc func(a *model.ReplicationSpec, b *model.ReplicationSpec) bool

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 VolumeGroupCompareFunc added in v0.1.10

type VolumeGroupCompareFunc func(a *model.VolumeGroupSpec, b *model.VolumeGroupSpec) bool

type VolumeGroupSlice added in v0.1.10

type VolumeGroupSlice []*model.VolumeGroupSpec

func (VolumeGroupSlice) Len added in v0.1.10

func (v VolumeGroupSlice) Len() int

func (VolumeGroupSlice) Less added in v0.1.10

func (v VolumeGroupSlice) Less(i, j int) bool

func (VolumeGroupSlice) Swap added in v0.1.10

func (v VolumeGroupSlice) 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)

Jump to

Keyboard shortcuts

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