models

package
v0.0.0-...-0601c6c Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2021 License: GPL-3.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 Group

type Group struct {
	Model
	Name  string
	Users []User `gorm:"many2many:user_groups;"`
}

type Model

type Model struct {
	ID uint64
}

type Role

type Role struct {
	Model
	Name string

	Users []User
}

type Server

type Server struct {
	Model

	Name            string
	IpAddress       string
	PublicIpAddress sql.NullString
	GroupID         uint64
	Group           Group
}

type User

type User struct {
	Model        `json:"model,omitempty"`
	Name         string `json:"name,omitempty"`
	Surname      string `json:"surname,omitempty"`
	Username     string `json:"username,omitempty"`
	Email        string `json:"email,omitempty"`
	Password     string `json:"password,omitempty"`
	Shell        string `json:"shell,omitempty"`
	PublicSSHKey string `json:"public_ssh_key"`

	RoleID uint64 `json:"-"`
	Role   Role   `json:"-"`

	Groups []Group `gorm:"many2many:user_groups;" json:"groups,omitempty"`
}

Jump to

Keyboard shortcuts

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