Documentation
¶
Index ¶
- type Client
- func (c *Client) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)
- func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)
- func (c *Client) Find(ctx context.Context, req *FindRequest) (*FindResponse, error)
- func (c *Client) Index(ctx context.Context) (*IndexResponse, error)
- func (c *Client) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)
- type CreateRequest
- type CreateResponse
- type DeleteRequest
- type DeleteResponse
- type FindRequest
- type FindResponse
- type HTTPClient
- type IndexResponse
- type UpdateRequest
- type UpdateResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func New ¶
func New(c HTTPClient) *Client
func (*Client) Create ¶
func (c *Client) Create(ctx context.Context, req *CreateRequest) (*CreateResponse, error)
Create Create new role.
func (*Client) Delete ¶
func (c *Client) Delete(ctx context.Context, req *DeleteRequest) (*DeleteResponse, error)
Delete Delete role.
func (*Client) Find ¶
func (c *Client) Find(ctx context.Context, req *FindRequest) (*FindResponse, error)
Find Get role configuration.
func (*Client) Index ¶
func (c *Client) Index(ctx context.Context) (*IndexResponse, error)
Index Role index.
func (*Client) Update ¶
func (c *Client) Update(ctx context.Context, req *UpdateRequest) (*UpdateResponse, error)
Update Update an existing role.
type CreateRequest ¶
type CreateResponse ¶
type CreateResponse map[string]interface{}
type DeleteRequest ¶
type DeleteRequest struct {
Roleid string `url:"roleid",json:"roleid"`
}
type DeleteResponse ¶
type DeleteResponse map[string]interface{}
type FindRequest ¶
type FindRequest struct {
Roleid string `url:"roleid",json:"roleid"`
}
type FindResponse ¶
type FindResponse struct {
// The following parameters are optional
DatastoreAllocate *util.SpecialBool `url:"Datastore.Allocate,omitempty",json:"Datastore.Allocate,omitempty"`
DatastoreAllocatespace *util.SpecialBool `url:"Datastore.AllocateSpace,omitempty",json:"Datastore.AllocateSpace,omitempty"`
DatastoreAllocatetemplate *util.SpecialBool `url:"Datastore.AllocateTemplate,omitempty",json:"Datastore.AllocateTemplate,omitempty"`
DatastoreAudit *util.SpecialBool `url:"Datastore.Audit,omitempty",json:"Datastore.Audit,omitempty"`
GroupAllocate *util.SpecialBool `url:"Group.Allocate,omitempty",json:"Group.Allocate,omitempty"`
PermissionsModify *util.SpecialBool `url:"Permissions.Modify,omitempty",json:"Permissions.Modify,omitempty"`
PoolAllocate *util.SpecialBool `url:"Pool.Allocate,omitempty",json:"Pool.Allocate,omitempty"`
PoolAudit *util.SpecialBool `url:"Pool.Audit,omitempty",json:"Pool.Audit,omitempty"`
RealmAllocate *util.SpecialBool `url:"Realm.Allocate,omitempty",json:"Realm.Allocate,omitempty"`
RealmAllocateuser *util.SpecialBool `url:"Realm.AllocateUser,omitempty",json:"Realm.AllocateUser,omitempty"`
SdnAllocate *util.SpecialBool `url:"SDN.Allocate,omitempty",json:"SDN.Allocate,omitempty"`
SdnAudit *util.SpecialBool `url:"SDN.Audit,omitempty",json:"SDN.Audit,omitempty"`
SysAudit *util.SpecialBool `url:"Sys.Audit,omitempty",json:"Sys.Audit,omitempty"`
SysConsole *util.SpecialBool `url:"Sys.Console,omitempty",json:"Sys.Console,omitempty"`
SysIncoming *util.SpecialBool `url:"Sys.Incoming,omitempty",json:"Sys.Incoming,omitempty"`
SysModify *util.SpecialBool `url:"Sys.Modify,omitempty",json:"Sys.Modify,omitempty"`
SysPowermgmt *util.SpecialBool `url:"Sys.PowerMgmt,omitempty",json:"Sys.PowerMgmt,omitempty"`
SysSyslog *util.SpecialBool `url:"Sys.Syslog,omitempty",json:"Sys.Syslog,omitempty"`
UserModify *util.SpecialBool `url:"User.Modify,omitempty",json:"User.Modify,omitempty"`
VmAllocate *util.SpecialBool `url:"VM.Allocate,omitempty",json:"VM.Allocate,omitempty"`
VmAudit *util.SpecialBool `url:"VM.Audit,omitempty",json:"VM.Audit,omitempty"`
VmBackup *util.SpecialBool `url:"VM.Backup,omitempty",json:"VM.Backup,omitempty"`
VmClone *util.SpecialBool `url:"VM.Clone,omitempty",json:"VM.Clone,omitempty"`
VmConfigCdrom *util.SpecialBool `url:"VM.Config.CDROM,omitempty",json:"VM.Config.CDROM,omitempty"`
VmConfigCloudinit *util.SpecialBool `url:"VM.Config.Cloudinit,omitempty",json:"VM.Config.Cloudinit,omitempty"`
VmConfigCpu *util.SpecialBool `url:"VM.Config.CPU,omitempty",json:"VM.Config.CPU,omitempty"`
VmConfigDisk *util.SpecialBool `url:"VM.Config.Disk,omitempty",json:"VM.Config.Disk,omitempty"`
VmConfigHwtype *util.SpecialBool `url:"VM.Config.HWType,omitempty",json:"VM.Config.HWType,omitempty"`
VmConfigMemory *util.SpecialBool `url:"VM.Config.Memory,omitempty",json:"VM.Config.Memory,omitempty"`
VmConfigNetwork *util.SpecialBool `url:"VM.Config.Network,omitempty",json:"VM.Config.Network,omitempty"`
VmConfigOptions *util.SpecialBool `url:"VM.Config.Options,omitempty",json:"VM.Config.Options,omitempty"`
VmConsole *util.SpecialBool `url:"VM.Console,omitempty",json:"VM.Console,omitempty"`
VmMigrate *util.SpecialBool `url:"VM.Migrate,omitempty",json:"VM.Migrate,omitempty"`
VmMonitor *util.SpecialBool `url:"VM.Monitor,omitempty",json:"VM.Monitor,omitempty"`
VmPowermgmt *util.SpecialBool `url:"VM.PowerMgmt,omitempty",json:"VM.PowerMgmt,omitempty"`
VmSnapshot *util.SpecialBool `url:"VM.Snapshot,omitempty",json:"VM.Snapshot,omitempty"`
VmSnapshotRollback *util.SpecialBool `url:"VM.Snapshot.Rollback,omitempty",json:"VM.Snapshot.Rollback,omitempty"`
}
type HTTPClient ¶
type IndexResponse ¶
type IndexResponse []*struct {
Roleid string `url:"roleid",json:"roleid"`
// The following parameters are optional
Privs *string `url:"privs,omitempty",json:"privs,omitempty"`
Special *util.SpecialBool `url:"special,omitempty",json:"special,omitempty"`
}
type UpdateRequest ¶
type UpdateRequest struct {
Roleid string `url:"roleid",json:"roleid"`
// The following parameters are optional
Append *util.SpecialBool `url:"append,omitempty",json:"append,omitempty"`
Privs *string `url:"privs,omitempty",json:"privs,omitempty"`
}
type UpdateResponse ¶
type UpdateResponse map[string]interface{}
Click to show internal directories.
Click to hide internal directories.