app

package
v0.0.0-...-01681b2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAppNotFound = errors.New("App not found")
)

Functions

func AppNameExist

func AppNameExist(ctx *models.Context, appName string) (bool, error)

func InitDatabase

func InitDatabase(ctx *models.Context)

Types

type App

type App struct {
	Id           int
	FullName     string
	Secret       string
	RedirectUri  string `db:"redirect_uri"`
	AdminGroupId int    `db:"admin_group_id"`
	AdminRoleId  int    `db:"admin_role_id"`
	Created      string
	Updated      string
}

func CreateApp

func CreateApp(ctx *models.Context, app *App, owner iuser.User) (*App, error)

func GetApp

func GetApp(ctx *models.Context, id int) (*App, error)

func ListAppsByAdminGroupIds

func ListAppsByAdminGroupIds(ctx *models.Context, groupIds []int) ([]App, error)

func UpdateApp

func UpdateApp(ctx *models.Context, app *App) (*App, error)

func (*App) GetId

func (a *App) GetId() string

func (*App) GetRedirectUri

func (a *App) GetRedirectUri() string

func (*App) GetSecret

func (a *App) GetSecret() string

func (*App) GetUserData

func (a *App) GetUserData() interface{}

func (*App) SecretString

func (a *App) SecretString() string

Jump to

Keyboard shortcuts

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