openstack

package
v6.30.0 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: MIT Imports: 3 Imported by: 2 modules, 2 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateUserRequest

type CreateUserRequest struct {
	// ProjectID to grant the user access to
	ProjectID   string `json:"projectId"`
	Username    string `json:"username"`
	Password    string `json:"password"`
	Description string `json:"description"`
	Email       string `json:"email"`
}

CreateUserRequest is a struct used for creating OpenStack users

type Project

type Project struct {
	ID          string `json:"id,omitempty"`
	Name        string `json:"name"`
	Description string `json:"description"`
	// IsLocked is set to true when an ongoing process blocks the project from being modified
	IsLocked bool `json:"isLocked"`
	// IsBlockes is set to true when a project has been administratively blocked
	IsBlocked bool `json:"isBlocked"`
}

Project struct of an OpenStack project

type ProjectRepository

type ProjectRepository repository.RestRepository

ProjectRepository is the repository for creating and modifying OpenStack projects

func (*ProjectRepository) Cancel

func (r *ProjectRepository) Cancel(projectID string) error

Cancel will cancel an OpenStack project, deleting all the resources it contains

func (*ProjectRepository) Create

func (r *ProjectRepository) Create(project Project) error

Create creates a new OpenStack project

func (*ProjectRepository) GetAll

func (r *ProjectRepository) GetAll() ([]Project, error)

GetAll returns all OpenStack projects

func (*ProjectRepository) GetByID

func (r *ProjectRepository) GetByID(projectID string) (Project, error)

GetByID returns information about an OpenStack project by ID

func (*ProjectRepository) Handover

func (r *ProjectRepository) Handover(projectID string, targetCustomerName string) error

Handover initiates a handover procedure to another TransIP account.

func (*ProjectRepository) Update

func (r *ProjectRepository) Update(project Project) error

Update allows for updating the project name and description

type User

type User struct {
	ID          string `json:"id,omitempty"`
	Username    string `json:"username"`
	Description string `json:"description"`
	Email       string `json:"email"`
}

User contains information about an OpenStack user

type UserRepository

type UserRepository repository.RestRepository

UserRepository lists and manages OpenStack users. It can also add and remove users from projects

func (*UserRepository) AddToProject

func (r *UserRepository) AddToProject(userID string, projectID string) error

AddToProject adds a user to an OpenStack project

func (*UserRepository) ChangePassword

func (r *UserRepository) ChangePassword(userID string, newPassword string) error

ChangePassword changes the password of an existing user

func (*UserRepository) Create

func (r *UserRepository) Create(request CreateUserRequest) error

Create creates a new user and grants it access to the provided projectID

func (*UserRepository) Delete

func (r *UserRepository) Delete(userID string) error

Delete removes an OpenStack user entirely

func (*UserRepository) GetAll

func (r *UserRepository) GetAll() ([]User, error)

GetAll list all OpenStack users

func (*UserRepository) GetByID

func (r *UserRepository) GetByID(userID string) (User, error)

GetByID fetches information about an user by their ID

func (*UserRepository) GetByProjectID

func (r *UserRepository) GetByProjectID(projectID string) ([]User, error)

GetByProjectID gets all the users assigned to a project

func (*UserRepository) RemoveFromProject

func (r *UserRepository) RemoveFromProject(userID string, projectID string) error

RemoveFromProject removes a user from an OpenStack project

func (*UserRepository) Update

func (r *UserRepository) Update(user User) error

Update can be used to update the description and email of user. To change the password of as user see ChangePassword

Jump to

Keyboard shortcuts

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