enterpriseprojects

package
v1.0.26 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionBuilder

type ActionBuilder interface {
	ActionMap() (map[string]interface{}, error)
}

type ActionOpts

type ActionOpts struct {
	Action string `json:"action"  required:"true"`
}

func (ActionOpts) ActionMap

func (opts ActionOpts) ActionMap() (map[string]interface{}, error)

type CommonResult

type CommonResult struct {
	gophercloud.Result
}

func Create

func Create(client *gophercloud.ServiceClient, opts CreateBuilder) (r CommonResult)

func FilterResources

func FilterResources(client *gophercloud.ServiceClient, opts FilterResourcesBuilder, epID string) (r CommonResult)

func Get

func Get(client *gophercloud.ServiceClient, epID string) (r CommonResult)

func GetQuotas

func GetQuotas(client *gophercloud.ServiceClient) (r CommonResult)

func Update

func Update(client *gophercloud.ServiceClient, opts UpdateBuilder, epID string) (r CommonResult)

func (CommonResult) ExtractEP

func (r CommonResult) ExtractEP() (EnterpriseProject, error)

func (CommonResult) ExtractFilterResources

func (r CommonResult) ExtractFilterResources() (FilterResourcesResp, error)

func (CommonResult) ExtractQuotas

func (r CommonResult) ExtractQuotas() (QuotasResp, error)

type CreateBuilder

type CreateBuilder interface {
	CreateMap() (map[string]interface{}, error)
}

type CreateEP

type CreateEP struct {
	Enterprise_Project EnterpriseProject `q:"enterprise_project"`
}

type CreateOpts

type CreateOpts struct {
	Name        string `json:"name"  required:"true"`
	Description string `json:"description"`
}

func (CreateOpts) CreateMap

func (opts CreateOpts) CreateMap() (map[string]interface{}, error)

type EnterpriseProject

type EnterpriseProject struct {
	Id          string `q:"id"`
	Name        string `q:"name"`
	Description string `q:"description"`
	Status      int    `q:"status"`
	CreatedAt   string `q:"created_at"`
	UpdatedAt   string `q:"updated_at"`
}

type Error

type Error struct {
	Project_id    string `q:"project_id"`
	Resource_type string `q:"resource_type"`
	Error_code    string `q:"error_code"`
	Error_msg     string `q:"error_msg"`
}

type ErrorResult

type ErrorResult struct {
	gophercloud.ErrResult
}

func EnableOrDisableEP

func EnableOrDisableEP(client *gophercloud.ServiceClient, opts ActionBuilder, epID string) (r ErrorResult)

func MigrateResources

func MigrateResources(client *gophercloud.ServiceClient, opts MigrateResourcesBuilder, epID string) (r ErrorResult)

func (ErrorResult) Extract

func (r ErrorResult) Extract() (*EnterpriseProject, error)

type FilterResourcesBuilder

type FilterResourcesBuilder interface {
	FilterResourcesMap() (map[string]interface{}, error)
}

type FilterResourcesOpts

type FilterResourcesOpts struct {
	Projects      []string `json:"projects"`
	ResourceTypes []string `json:"resource_types"  required:"true"`
	Offset        int      `json:"offset"`
	Limit         int      `json:"limit"`
	Matches       []Match  `json:"matches"`
}

func (FilterResourcesOpts) FilterResourcesMap

func (opts FilterResourcesOpts) FilterResourcesMap() (map[string]interface{}, error)

type FilterResourcesResp

type FilterResourcesResp struct {
	Resources   []Resource `q:"resources"`
	Errors      []Error    `q:"errors"`
	Total_count int        `q:"total_count"`
}

type ListBuilder

type ListBuilder interface {
	ToListQuery() (string, error)
}

type ListEPResp

type ListEPResp struct {
	Enterprise_projects []EnterpriseProject `q:"enterprise_projects"`
	Total_count         int                 `q:"total_count"`
}

type ListOpts

type ListOpts struct {
	Id         string `q:"id" `
	Name       string `q:"name" `
	AuthAction string `q:"auth_action"`
	Offset     int    `q:"offset"`
	Limit      int    `q:"limit"`
	SortKey    string `q:"sort_key"`
	SortDiy    string `q:"sort_dir"`
}

func (ListOpts) ToListQuery

func (opts ListOpts) ToListQuery() (string, error)

type ListResult

type ListResult struct {
	gophercloud.Result
}

func List

func List(client *gophercloud.ServiceClient, opts ListBuilder) (r ListResult)

func (ListResult) Extract

func (r ListResult) Extract() (*ListEPResp, error)

type Match

type Match struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type MigrateResourceOpts

type MigrateResourceOpts struct {
	Action       string `json:"action" required:"true"`
	ProjectId    string `json:"project_id"`
	Associated   bool   `json:"associated"`
	ResourceType string `json:"resource_type" required:"true"`
	ResourceId   string `json:"resource_id" required:"true"`
	RegionId     string `json:"region_id"`
}

func (MigrateResourceOpts) MigrateResourcesMap

func (opts MigrateResourceOpts) MigrateResourcesMap() (map[string]interface{}, error)

type MigrateResourcesBuilder

type MigrateResourcesBuilder interface {
	MigrateResourcesMap() (map[string]interface{}, error)
}

type QuotasResource

type QuotasResource struct {
	Type  string `q:"type"`
	Used  int    `q:"used"`
	Quota int    `q:"quota"`
}

type QuotasResp

type QuotasResp struct {
	Resources []QuotasResource `q:"resources"`
}

type Resource

type Resource struct {
	Project_id            string `q:"project_id"`
	Resource_type         string `q:"resource_type"`
	Project_name          string `q:"project_name"`
	Resource_id           string `q:"resource_id"`
	Resource_name         string `q:"resource_name"`
	Resource_detail       string `q:"resource_detail"`
	Enterprise_project_id string `q:"enterprise_project_id"`
}

type UpdateBuilder

type UpdateBuilder interface {
	UpdateMap() (map[string]interface{}, error)
}

type UpdateOpts

type UpdateOpts struct {
	Name        string `json:"name"  required:"true"`
	Description string `json:"description"`
}

func (UpdateOpts) UpdateMap

func (opts UpdateOpts) UpdateMap() (map[string]interface{}, error)

type VersionLinkResp

type VersionLinkResp struct {
	Rel  string `q:"rel"`
	Href string `q:"href"`
}

type VersionResp

type VersionResp struct {
	Id          string            `q:"id"`
	Links       []VersionLinkResp `json:"links,omitempty"`
	Status      string            `q:"status"`
	Updated     string            `q:"updated"`
	Min_version string            `q:"min_version"`
}

Jump to

Keyboard shortcuts

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