models

package
v0.0.0-...-fcc202b Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGroups

func AddGroups(name, info string) (int64, error)

func AddHost

func AddHost(name, ip, user, pass string, port int, group int) (int64, error)

func AddUser

func AddUser(name, pass, email string) (int64, error)

func ChangeHostPass

func ChangeHostPass(pass string, id int) (int64, error)

func ChangeUserPass

func ChangeUserPass(pass string, id int) (int64, error)

func DeleteGroups

func DeleteGroups(id int) (int64, error)

func DeleteHost

func DeleteHost(id int) (int64, error)

func DeleteUser

func DeleteUser(id int) (int64, error)

func EditGroups

func EditGroups(name, info string, id int) (int64, error)

func EditHost

func EditHost(name, ip, user string, port int, group int, id int) (int64, error)

func EditUser

func EditUser(email string, right, id int) (int64, error)

func GroupsExistCheck

func GroupsExistCheck(name string) bool

func NameExistCheck

func NameExistCheck(name string) bool

func UserExistCheck

func UserExistCheck(name string) bool

Types

type HostAll

type HostAll struct {
	Hostinfo
	Gname string
}

func FindAllHostinfo

func FindAllHostinfo() ([]HostAll, error)

func FindHostByGroupname

func FindHostByGroupname(gname string) ([]HostAll, error)

type Hostgroups

type Hostgroups struct {
	Id    int
	Gname string
	Info  string
}

func FindAllGroups

func FindAllGroups() ([]Hostgroups, error)

func FindGroupsById

func FindGroupsById(id int) (Hostgroups, error)

func FindGroupsByName

func FindGroupsByName(gname string) ([]Hostgroups, error)

type Hostinfo

type Hostinfo struct {
	Id         int
	Name       string
	Ip         string
	User       string
	Pass       string
	Port       int
	Skey       int
	Groups     *Hostgroups `orm:"rel(fk)"`
	Created_at string
}

func FindHostById

func FindHostById(id int) (Hostinfo, error)

func FindHostByIp

func FindHostByIp(str string) (Hostinfo, error)

func FindHostByName

func FindHostByName(str string) (Hostinfo, error)

type Rights

type Rights struct {
	Id    int
	Rname string
}

func FindAllRights

func FindAllRights() ([]Rights, error)

type User

type User struct {
	Id         int
	Name       string
	Pass       string
	Email      string
	Rights     *Rights `orm:"rel(fk)"`
	Created_at string
}

func FindAllUser

func FindAllUser() ([]User, error)

func FindUserById

func FindUserById(id int) (User, error)

func FindUserByName

func FindUserByName(name string) (User, error)

Jump to

Keyboard shortcuts

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