dto

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2021 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateUser

type CreateUser struct {
	User         User   `json:"user,omitempty"  validate:"required"`
	PublicSSHKey string `json:"public_key,omitempty" conform:"trim" validate:"required,base64url"`
}

type DeleteUser

type DeleteUser struct {
	Username string `json:"username" conform:"trim" validate:"required,max=50"`
}

type LinuxUser

type LinuxUser struct {
	Username     string   `json:"username" conform:"trim" validate:"required,max=50"`
	Password     string   `json:"password" conform:"trim" validate:"required,min=6,max=50"`
	Shell        string   `json:"shell" conform:"trim" validate:"required,max=50"`
	SystemGroups []string `json:"system_groups"  validate:"required"`
}

func (LinuxUser) GetDefaultShell

func (u LinuxUser) GetDefaultShell() string

func (LinuxUser) GetPlainTextPassword

func (u LinuxUser) GetPlainTextPassword() string

func (LinuxUser) GetSystemGroups

func (u LinuxUser) GetSystemGroups() []string

func (LinuxUser) GetUsername

func (u LinuxUser) GetUsername() string

type User

type User struct {
	Name         string   `json:"name" conform:"trim" validate:"required,max=50"`
	Surname      string   `json:"surname" conform:"trim" validate:"required,max=50"`
	Email        string   `json:"email" conform:"trim,email" validate:"required,email,max=150"`
	Role         string   `json:"role" conform:"trim" validate:"required,max=50"`
	Groups       []string `json:"groups"`
	Username     string   `json:"username" conform:"trim" validate:"required,max=50"`
	Password     string   `json:"password" conform:"trim" validate:"required,min=6,max=50"`
	Shell        string   `json:"shell" conform:"trim" validate:"required,max=50"`
	SystemGroups []string `json:"system_groups"  validate:"required"`
}

Jump to

Keyboard shortcuts

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