repo

package
v1.20.17 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DashboardKeyRepo

type DashboardKeyRepo interface {
	GetById(id int) (*types.DashKey, error)
	GetByDashId(id int) (types.DashKeys, error)
	GetByPubCached(pub string) (*types.DashKey, error)
	Create(key *types.DashKey, tx *sql.Tx) error
}

type DashboardMemberRepo

type DashboardMemberRepo interface {
	GetByDashId(id int) (types.DashMembers, error)
	GetByUserId(id int) (types.DashMembers, error)
	Create(m *types.DashMember) error
	Remove(id int) error
}

type DashboardRepo

type DashboardRepo interface {
	GetAll() (types.Dashboards, error)
	GetById(id int) (*types.Dashboard, error)
	GetByOwnerId(id int) (types.Dashboards, error)
	GetShared(userId int, role int) (types.Dashboards, error)
	GetSystemIds(role int) []int
	Create(dash *types.Dashboard) error
	Update(dash *types.Dashboard) error
	Remove(id int) error
}

type Repos

type Repos struct {
	User            UserRepo
	Dashboard       DashboardRepo
	DashboardMember DashboardMemberRepo
	DashboardKey    DashboardKeyRepo
}

func GetRepos

func GetRepos() *Repos

type UserRepo

type UserRepo interface {
	GetAll() (types.Users, error)
	GetById(id int) (*types.User, error)
	GetByUsername(username string) (*types.User, error)
	Upsert(githubId int64, username string, role int) (*types.User, error)
	Create(githubId int64, username string, role int) (*types.User, error)
	LoginAt(id int) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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