app

package
v0.0.0-...-8c3e621 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2016 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDatabase

func CloseDatabase(z *zest.Zest) error

func ConnectDatabase

func ConnectDatabase(z *zest.Zest) error

func InitServer

func InitServer(z *zest.Zest) error

func LaunchGarbageCollector

func LaunchGarbageCollector(z *zest.Zest) error

func MigrateDatabase

func MigrateDatabase(z *zest.Zest) error

func PopulateConstants

func PopulateConstants(z *zest.Zest) error

func Register

func Register(z *zest.Zest) error

func Run

func Run(overrideConst zest.SeqFunc)

func SeedDatabase

func SeedDatabase(z *zest.Zest) error

func SetCli

func SetCli(appli *zest.Zest)

func SetRoutes

func SetRoutes(z *zest.Zest) error

Types

type Config

type Config struct {
	Resources []models.Resource `json:"resources" yaml:"resources"`
	Policies  []models.Policy   `json:"policies" yaml:"policies"`
}

type ConfigImporter

type ConfigImporter struct {
	// contains filtered or unexported fields
}

func (*ConfigImporter) Import

func (ci *ConfigImporter) Import(path string) error

type ConfigImporterPoliciesInter

type ConfigImporterPoliciesInter interface {
	Create(policy *models.Policy) (*models.Policy, error)
}

type ConfigImporterPoliciesValidator

type ConfigImporterPoliciesValidator interface {
	ValidateCreation(policy *models.Policy) error
}

type ConfigImporterResourcesInter

type ConfigImporterResourcesInter interface {
	Create(resource *models.Resource) (*models.Resource, error)
}

type ConfigImporterResourcesValidator

type ConfigImporterResourcesValidator interface {
	ValidateCreation(resource *models.Resource) error
}

type Constants

type Constants struct {
	Swagger struct {
		Location string
	}

	App struct {
		Port        int
		ExitTimeout time.Duration
		Config      string
	}

	Auth struct {
		RedirectURL string
		GrantAll    bool
	}

	GC struct {
		Location string
		Freq     time.Duration
	}

	DB struct {
		Location string
		Timeout  time.Duration
	}

	Session struct {
		Validity    time.Duration
		TokenLength int
	}
}

func NewConstants

func NewConstants() *Constants

func (*Constants) GetGrantAll

func (c *Constants) GetGrantAll() bool

func (*Constants) GetRedirectURL

func (c *Constants) GetRedirectURL() string

func (*Constants) GetSessionTokenLength

func (c *Constants) GetSessionTokenLength() int

func (*Constants) GetSessionValidity

func (c *Constants) GetSessionValidity() time.Duration

type GarbageCollector

type GarbageCollector struct {
	// contains filtered or unexported fields
}

func (*GarbageCollector) Run

func (gc *GarbageCollector) Run(dbLocation string, freq time.Duration) error

type GarbageCollectorSessionsRepo

type GarbageCollectorSessionsRepo interface {
	Update(func(tx *bolt.Tx) error) error
}

type TestApp

type TestApp struct {
	// contains filtered or unexported fields
}

func NewTestApp

func NewTestApp() *TestApp

func (*TestApp) Launch

func (a *TestApp) Launch() (string, error)

func (*TestApp) Seed

func (a *TestApp) Seed() error

func (*TestApp) Stop

func (a *TestApp) Stop() error

Jump to

Keyboard shortcuts

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