Documentation ¶
Index ¶
- func AuthorizeProjectContext(ctx *c.Context) bool
- func Init(edps []string) *client
- func IsAdminContext(ctx *c.Context) bool
- type Client
- func (c *Client) AddExtraProperty(ctx *c.Context, prfID string, ext model.ExtraSpec) (*model.ExtraSpec, error)
- func (c *Client) CreateDock(ctx *c.Context, dck *model.DockSpec) (*model.DockSpec, error)
- func (c *Client) CreatePool(ctx *c.Context, pol *model.StoragePoolSpec) (*model.StoragePoolSpec, error)
- func (c *Client) CreateProfile(ctx *c.Context, prf *model.ProfileSpec) (*model.ProfileSpec, error)
- func (c *Client) CreateVolume(ctx *c.Context, vol *model.VolumeSpec) (*model.VolumeSpec, error)
- func (c *Client) CreateVolumeAttachment(ctx *c.Context, attachment *model.VolumeAttachmentSpec) (*model.VolumeAttachmentSpec, error)
- func (c *Client) CreateVolumeSnapshot(ctx *c.Context, snp *model.VolumeSnapshotSpec) (*model.VolumeSnapshotSpec, error)
- func (c *Client) DeleteDock(ctx *c.Context, dckID string) error
- func (c *Client) DeletePool(ctx *c.Context, polID string) error
- func (c *Client) DeleteProfile(ctx *c.Context, prfID string) error
- func (c *Client) DeleteVolume(ctx *c.Context, volID string) error
- func (c *Client) DeleteVolumeAttachment(ctx *c.Context, attachmentId string) error
- func (c *Client) DeleteVolumeSnapshot(ctx *c.Context, snpID string) error
- func (c *Client) ExtendVolume(ctx *c.Context, vol *model.VolumeSpec) (*model.VolumeSpec, error)
- func (c *Client) FindAttachmentValue(k string, p *model.VolumeAttachmentSpec) string
- func (c *Client) FindDockValue(k string, d *model.DockSpec) string
- func (c *Client) FindPoolValue(k string, p *model.StoragePoolSpec) string
- func (c *Client) FindProfileValue(k string, p *model.ProfileSpec) string
- func (c *Client) FindSnapshotsValue(k string, p *model.VolumeSnapshotSpec) string
- func (c *Client) FindVolumeValue(k string, p *model.VolumeSpec) string
- func (c *Client) GetDefaultProfile(ctx *c.Context) (*model.ProfileSpec, error)
- func (c *Client) GetDock(ctx *c.Context, dckID string) (*model.DockSpec, error)
- func (c *Client) GetDockByPoolId(ctx *c.Context, poolId string) (*model.DockSpec, error)
- func (c *Client) GetLimit(m map[string][]string) int
- func (c *Client) GetOffset(m map[string][]string, size int) int
- func (c *Client) GetPool(ctx *c.Context, polID string) (*model.StoragePoolSpec, error)
- func (c *Client) GetProfile(ctx *c.Context, prfID string) (*model.ProfileSpec, error)
- func (c *Client) GetSortDir(m map[string][]string) string
- func (c *Client) GetSortKey(m map[string][]string, sortKeys []string) string
- func (c *Client) GetVolume(ctx *c.Context, volID string) (*model.VolumeSpec, error)
- func (c *Client) GetVolumeAttachment(ctx *c.Context, attachmentId string) (*model.VolumeAttachmentSpec, error)
- func (c *Client) GetVolumeSnapshot(ctx *c.Context, snpID string) (*model.VolumeSnapshotSpec, error)
- func (c *Client) IsInArray(e string, s []string) bool
- func (c *Client) ListDocks(ctx *c.Context) ([]*model.DockSpec, error)
- func (c *Client) ListDocksWithFilter(ctx *c.Context, m map[string][]string) ([]*model.DockSpec, error)
- func (c *Client) ListExtraProperties(ctx *c.Context, prfID string) (*model.ExtraSpec, error)
- func (c *Client) ListPools(ctx *c.Context) ([]*model.StoragePoolSpec, error)
- func (c *Client) ListPoolsWithFilter(ctx *c.Context, m map[string][]string) ([]*model.StoragePoolSpec, error)
- func (c *Client) ListProfiles(ctx *c.Context) ([]*model.ProfileSpec, error)
- func (c *Client) ListProfilesWithFilter(ctx *c.Context, m map[string][]string) ([]*model.ProfileSpec, error)
- func (c *Client) ListVolumeAttachments(ctx *c.Context, volumeId string) ([]*model.VolumeAttachmentSpec, error)
- func (c *Client) ListVolumeAttachmentsWithFilter(ctx *c.Context, m map[string][]string) ([]*model.VolumeAttachmentSpec, error)
- func (c *Client) ListVolumeSnapshots(ctx *c.Context) ([]*model.VolumeSnapshotSpec, error)
- func (c *Client) ListVolumeSnapshotsWithFilter(ctx *c.Context, m map[string][]string) ([]*model.VolumeSnapshotSpec, error)
- func (c *Client) ListVolumes(ctx *c.Context) ([]*model.VolumeSpec, error)
- func (c *Client) ListVolumesWithFilter(ctx *c.Context, m map[string][]string) ([]*model.VolumeSpec, error)
- func (c *Client) ParameterFilter(m map[string][]string, size int, sortKeys []string) *Parameter
- func (c *Client) RemoveExtraProperty(ctx *c.Context, prfID, extraKey string) error
- func (c *Client) SelectDocks(m map[string][]string, docks []*model.DockSpec) []*model.DockSpec
- func (c *Client) SelectOrNot(m map[string][]string) bool
- func (c *Client) SelectPools(m map[string][]string, pools []*model.StoragePoolSpec) []*model.StoragePoolSpec
- func (c *Client) SelectProfiles(m map[string][]string, profiles []*model.ProfileSpec) []*model.ProfileSpec
- func (c *Client) SelectSnapshots(m map[string][]string, snapshots []*model.VolumeSnapshotSpec) []*model.VolumeSnapshotSpec
- func (c *Client) SelectVolumeAttachments(m map[string][]string, attachments []*model.VolumeAttachmentSpec) []*model.VolumeAttachmentSpec
- func (c *Client) SelectVolumes(m map[string][]string, volumes []*model.VolumeSpec) []*model.VolumeSpec
- func (c *Client) SortDocks(dcks []*model.DockSpec, p *Parameter) []*model.DockSpec
- func (c *Client) SortPools(pools []*model.StoragePoolSpec, p *Parameter) []*model.StoragePoolSpec
- func (c *Client) SortProfiles(profiles []*model.ProfileSpec, p *Parameter) []*model.ProfileSpec
- func (c *Client) SortSnapshots(snapshots []*model.VolumeSnapshotSpec, p *Parameter) []*model.VolumeSnapshotSpec
- func (c *Client) SortVolumeAttachments(attachments []*model.VolumeAttachmentSpec, p *Parameter) []*model.VolumeAttachmentSpec
- func (c *Client) SortVolumes(volumes []*model.VolumeSpec, p *Parameter) []*model.VolumeSpec
- func (c *Client) UpdateDock(ctx *c.Context, dckID, name, desp string) (*model.DockSpec, error)
- func (c *Client) UpdatePool(ctx *c.Context, polID, name, desp string, usedCapacity int64, used bool) (*model.StoragePoolSpec, error)
- func (c *Client) UpdateProfile(ctx *c.Context, prfID string, input *model.ProfileSpec) (*model.ProfileSpec, error)
- func (c *Client) UpdateVolume(ctx *c.Context, vol *model.VolumeSpec) (*model.VolumeSpec, error)
- func (c *Client) UpdateVolumeAttachment(ctx *c.Context, attachmentId string, attachment *model.VolumeAttachmentSpec) (*model.VolumeAttachmentSpec, error)
- func (c *Client) UpdateVolumeSnapshot(ctx *c.Context, snpID string, snp *model.VolumeSnapshotSpec) (*model.VolumeSnapshotSpec, error)
- type DockSlice
- type Parameter
- type ProfileSlice
- type Request
- type Response
- type StoragePoolSlice
- type VolumeAttachmentSlice
- type VolumeSlice
- type VolumeSnapshotSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthorizeProjectContext ¶ added in v0.1.4
func IsAdminContext ¶ added in v0.1.4
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client
func (*Client) AddExtraProperty ¶
func (c *Client) AddExtraProperty(ctx *c.Context, prfID string, ext model.ExtraSpec) (*model.ExtraSpec, error)
AddExtraProperty
func (*Client) CreateDock ¶
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 ¶
DeleteDock
func (*Client) DeletePool ¶
DeletePool
func (*Client) DeleteProfile ¶
DeleteProfile
func (*Client) DeleteVolume ¶
DeleteVolume
func (*Client) DeleteVolumeAttachment ¶
DeleteVolumeAttachment
func (*Client) DeleteVolumeSnapshot ¶
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 (*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 ¶
GetDefaultProfile
func (*Client) GetDockByPoolId ¶
GetDockByPoolId
func (*Client) GetProfile ¶
GetProfile
func (*Client) GetSortDir ¶ added in v0.1.4
Get parameter sortDir
func (*Client) GetSortKey ¶ added in v0.1.4
Get parameter sortKey
func (*Client) GetVolumeAttachment ¶
func (*Client) GetVolumeSnapshot ¶
func (*Client) ListDocksWithFilter ¶ added in v0.1.4
func (*Client) ListExtraProperties ¶
ListExtraProperties
func (*Client) ListPoolsWithFilter ¶ added in v0.1.4
func (*Client) ListProfiles ¶
ListProfiles
func (*Client) ListProfilesWithFilter ¶ added in v0.1.4
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 (*Client) ListVolumeSnapshots ¶
ListVolumeSnapshots
func (*Client) ListVolumeSnapshotsWithFilter ¶ added in v0.1.4
func (*Client) ListVolumes ¶
ListVolumes
func (*Client) ListVolumesWithFilter ¶ added in v0.1.4
func (*Client) ParameterFilter ¶ added in v0.1.4
ParameterFilter
func (*Client) RemoveExtraProperty ¶
RemoveExtraProperty
func (*Client) SelectDocks ¶ added in v0.1.4
func (*Client) SelectOrNot ¶ added in v0.1.4
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) 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 ¶
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 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)
Click to show internal directories.
Click to hide internal directories.