roles

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

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 CreateRequest struct {
	Roleid string `url:"roleid",json:"roleid"`

	// The following parameters are optional
	Privs *string `url:"privs,omitempty",json:"privs,omitempty"`
}

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         *bool `url:"Datastore.Allocate,omitempty",json:"Datastore.Allocate,omitempty"`
	DatastoreAllocatespace    *bool `url:"Datastore.AllocateSpace,omitempty",json:"Datastore.AllocateSpace,omitempty"`
	DatastoreAllocatetemplate *bool `url:"Datastore.AllocateTemplate,omitempty",json:"Datastore.AllocateTemplate,omitempty"`
	DatastoreAudit            *bool `url:"Datastore.Audit,omitempty",json:"Datastore.Audit,omitempty"`
	GroupAllocate             *bool `url:"Group.Allocate,omitempty",json:"Group.Allocate,omitempty"`
	PermissionsModify         *bool `url:"Permissions.Modify,omitempty",json:"Permissions.Modify,omitempty"`
	PoolAllocate              *bool `url:"Pool.Allocate,omitempty",json:"Pool.Allocate,omitempty"`
	PoolAudit                 *bool `url:"Pool.Audit,omitempty",json:"Pool.Audit,omitempty"`
	RealmAllocate             *bool `url:"Realm.Allocate,omitempty",json:"Realm.Allocate,omitempty"`
	RealmAllocateuser         *bool `url:"Realm.AllocateUser,omitempty",json:"Realm.AllocateUser,omitempty"`
	SdnAllocate               *bool `url:"SDN.Allocate,omitempty",json:"SDN.Allocate,omitempty"`
	SdnAudit                  *bool `url:"SDN.Audit,omitempty",json:"SDN.Audit,omitempty"`
	SysAudit                  *bool `url:"Sys.Audit,omitempty",json:"Sys.Audit,omitempty"`
	SysConsole                *bool `url:"Sys.Console,omitempty",json:"Sys.Console,omitempty"`
	SysIncoming               *bool `url:"Sys.Incoming,omitempty",json:"Sys.Incoming,omitempty"`
	SysModify                 *bool `url:"Sys.Modify,omitempty",json:"Sys.Modify,omitempty"`
	SysPowermgmt              *bool `url:"Sys.PowerMgmt,omitempty",json:"Sys.PowerMgmt,omitempty"`
	SysSyslog                 *bool `url:"Sys.Syslog,omitempty",json:"Sys.Syslog,omitempty"`
	UserModify                *bool `url:"User.Modify,omitempty",json:"User.Modify,omitempty"`
	VmAllocate                *bool `url:"VM.Allocate,omitempty",json:"VM.Allocate,omitempty"`
	VmAudit                   *bool `url:"VM.Audit,omitempty",json:"VM.Audit,omitempty"`
	VmBackup                  *bool `url:"VM.Backup,omitempty",json:"VM.Backup,omitempty"`
	VmClone                   *bool `url:"VM.Clone,omitempty",json:"VM.Clone,omitempty"`
	VmConfigCdrom             *bool `url:"VM.Config.CDROM,omitempty",json:"VM.Config.CDROM,omitempty"`
	VmConfigCloudinit         *bool `url:"VM.Config.Cloudinit,omitempty",json:"VM.Config.Cloudinit,omitempty"`
	VmConfigCpu               *bool `url:"VM.Config.CPU,omitempty",json:"VM.Config.CPU,omitempty"`
	VmConfigDisk              *bool `url:"VM.Config.Disk,omitempty",json:"VM.Config.Disk,omitempty"`
	VmConfigHwtype            *bool `url:"VM.Config.HWType,omitempty",json:"VM.Config.HWType,omitempty"`
	VmConfigMemory            *bool `url:"VM.Config.Memory,omitempty",json:"VM.Config.Memory,omitempty"`
	VmConfigNetwork           *bool `url:"VM.Config.Network,omitempty",json:"VM.Config.Network,omitempty"`
	VmConfigOptions           *bool `url:"VM.Config.Options,omitempty",json:"VM.Config.Options,omitempty"`
	VmConsole                 *bool `url:"VM.Console,omitempty",json:"VM.Console,omitempty"`
	VmMigrate                 *bool `url:"VM.Migrate,omitempty",json:"VM.Migrate,omitempty"`
	VmMonitor                 *bool `url:"VM.Monitor,omitempty",json:"VM.Monitor,omitempty"`
	VmPowermgmt               *bool `url:"VM.PowerMgmt,omitempty",json:"VM.PowerMgmt,omitempty"`
	VmSnapshot                *bool `url:"VM.Snapshot,omitempty",json:"VM.Snapshot,omitempty"`
	VmSnapshotRollback        *bool `url:"VM.Snapshot.Rollback,omitempty",json:"VM.Snapshot.Rollback,omitempty"`
}

type HTTPClient

type HTTPClient interface {
	Do(context.Context, string, string, interface{}, interface{}) error
}

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 *bool   `url:"special,omitempty",json:"special,omitempty"`
}

type UpdateRequest

type UpdateRequest struct {
	Roleid string `url:"roleid",json:"roleid"`

	// The following parameters are optional
	Append *bool   `url:"append,omitempty",json:"append,omitempty"`
	Privs  *string `url:"privs,omitempty",json:"privs,omitempty"`
}

type UpdateResponse

type UpdateResponse map[string]interface{}

Jump to

Keyboard shortcuts

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