// FromConfig parses configuration file as bytes and returns authorization
// policies. Supports yaml, json.
FromConfig parses configuration file as bytes and returns authorization
policies. Supports yaml, json.
// FromConfig parses configuration file as bytes and returns authorization // policies . Supports yaml json .
func FromConfig(confBytes []byte) ([]Policy, error) {
	var f []Policy
	if err := yaml.Unmarshal(confBytes, &f); err != nil {
		return nil, err
	}
	for i := range f {
		if err := (&f[i]).validate(); err != nil {
			return nil, err
		}
	}
	return f, nil
}
func FromConfig ( confBytes [ ] byte ) ( [ ] Policy , error ) { var f [ ] Policy if err := yaml . Unmarshal ( confBytes , & f ) ; err != nil { return nil , err } for i := range f { if err := ( & f [ i ] ) . validate ( ) ; err != nil { return nil , err } } return f , nil }
FromConfig parses configuration file as bytes and returns authorization
policies.
FromConfig parses configuration file as bytes and returns authorization policies .
// build source and destination urls