userop

package
v0.0.0-...-b94449b Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package userop contains user operators.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	*user.User
	Shell string
}

func Lookup

func Lookup(username string) (*User, error)

func (*User) ToMap

func (u *User) ToMap() map[string]interface{}

type Useradd

type Useradd struct {
	Args interface{}
}

func (Useradd) GetState

func (op Useradd) GetState(octx operator.Context) (state.State, error)

func (Useradd) Info

func (op Useradd) Info() operator.Info

func (Useradd) Run

func (op Useradd) Run(octx operator.Context) error

type UseraddOpts

type UseraddOpts struct {
	User            string   `json:"user"`
	Shell           string   `json:"shell,omitempty"`
	CreateHomeDir   string   `json:"home_dir,omitempty"`
	Comment         string   `json:"comment,omitempty"`
	CreateHome      bool     `json:"create_home,omitempty"`
	SystemUser      bool     `json:"system,omitempty"`
	CreateUserGroup bool     `json:"user_group,omitempty"`
	Groups          []string `json:"groups,omitempty"`
	AddGroups       []string `json:"add_groups,omitempty"`
	RemoveGroups    []string `json:"remove_groups,omitempty"`
}

Jump to

Keyboard shortcuts

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