user

package
v0.0.0-...-270f78c Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Zlib Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BucketName represents the name of the bucket where this service stores data.
	BucketName = "users"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service represents a service for managing environment(endpoint) data.

func NewService

func NewService(connection portainer.Connection) (*Service, error)

NewService creates a new instance of a service.

func (*Service) BucketName

func (service *Service) BucketName() string

func (*Service) Create

func (service *Service) Create(user *portainer.User) error

CreateUser creates a new user.

func (*Service) DeleteUser

func (service *Service) DeleteUser(ID portainer.UserID) error

DeleteUser deletes a user.

func (*Service) UpdateUser

func (service *Service) UpdateUser(ID portainer.UserID, user *portainer.User) error

UpdateUser saves a user.

func (*Service) User

func (service *Service) User(ID portainer.UserID) (*portainer.User, error)

User returns a user by ID

func (*Service) UserByUsername

func (service *Service) UserByUsername(username string) (*portainer.User, error)

UserByUsername returns a user by username.

func (*Service) Users

func (service *Service) Users() ([]portainer.User, error)

Users return an array containing all the users.

func (*Service) UsersByRole

func (service *Service) UsersByRole(role portainer.UserRole) ([]portainer.User, error)

UsersByRole return an array containing all the users with the specified role.

Jump to

Keyboard shortcuts

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