granted

package module
v0.0.0-...-0e49b60 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2017 License: MIT Imports: 4 Imported by: 0

README

Granted Build Status

Filter your struct. More to come.

Simple usage

See examples folder.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Default = New(DefaultConfig)

Default ...

View Source
var DefaultConfig = NewConfig()

DefaultConfig ...

Functions

func AddRole

func AddRole(r Role)

AddRole ...

func Filter

func Filter(i interface{}) interface{}

Filter ...

func FilterToJSON

func FilterToJSON(i interface{}) string

FilterToJSON ...

Types

type Authorize

type Authorize struct {
	*Config
}

Authorize ..

func New

func New(c *Config) *Authorize

New ...

type Config

type Config struct {
	TagName string
	Roles   map[string]Role
	// contains filtered or unexported fields
}

Config ...

func NewConfig

func NewConfig() *Config

NewConfig ...

type Instance

type Instance interface{}

Instance ...

type Role

type Role struct {
	Name      string
	CheckFunc func(i Instance) bool
}

Role ...

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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