nanoapiauthpostgres

package module
v0.0.0-...-c77ed09 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2022 License: MIT Imports: 13 Imported by: 0

README

nanoapi-auth-postgres

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Setup

func Setup() error

func WithPrefix

func WithPrefix(s string) func() error

Types

type LoginRequest

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type SecGroup

type SecGroup struct {
	VO
	Code  string
	Perms []SecPerm `gorm:"many2many:sec_group_perms;"`
}

type SecPerm

type SecPerm struct {
	VO
	Code string
	Perm string
}

type SecUser

type SecUser struct {
	VO
	Username string
	Password string
	Email    string
	Groups   []SecGroup `gorm:"many2many:sec_user_groups;"`
	Enabled  *bool
	Tenant   string
}

func Check

func Check(u string, p string) *SecUser

type VO

type VO struct {
	ID uint `json:"id"`
}

Jump to

Keyboard shortcuts

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