Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMiddelware ¶
Types ¶
type Application ¶
type Application struct {
Config *Config
Models data.Models
Middleware Middleware
Migrations migrations.Migrations
GIT git.Repo
}
func NewApplication ¶
func NewApplication(db *sql.DB, cfg *Config) (*Application, error)
func (*Application) Routes ¶
func (app *Application) Routes() *gin.Engine
type Middleware ¶
type Middleware interface {
// Authenticate determines if a user is allowed visibility on an object
Authenticate(c *gin.Context)
// Authorize determines if current subject has been authorized to read an object
Authorize(code string) gin.HandlerFunc
// HasPermission
HasPermission(code string, permission []string) bool
}
Middleware is the interface used to control permissioning for the app
type Team ¶
type Team struct {
ID int64 `json:"id"`
Name string `json:"name"`
CreatedAt time.Time `json:"created_at"`
Version int `json:"version"`
NumMembers int `json:"num_members"`
Meta meta `json:"meta"`
UserAccounts []*UserAccount `json:"user_accounts"`
}
Team represents the domain for our team entity
type UserAccount ¶
Click to show internal directories.
Click to hide internal directories.