config

package
v0.0.0-...-e184c60 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authorization

type Authorization struct {
	Client string `yaml:"client"`
	Scope  string `yaml:"scope"`
	Via    string `yaml:"via"`
}

type Config

type Config struct {
	Scopes         []Scope         `yaml:"scopes"`
	Clients        []string        `yaml:"clients"`
	Authorizations []Authorization `yaml:"authorizations"`
}

func LoadConfig

func LoadConfig(fileName string) (*Config, error)

func (Config) FindAuthorization

func (c Config) FindAuthorization(client, target string) string

func (Config) FindClient

func (c Config) FindClient(name string) bool

func (Config) FindScope

func (c Config) FindScope(name string) *Scope

type Scope

type Scope struct {
	Name    string `yaml:"name"`
	Service string `yaml:"service"`
	Method  string `yaml:"method"`
}

Jump to

Keyboard shortcuts

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