Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Languages ¶
func Languages() []string
Languages returns a sorted list of the language of the registered compiler constructors
func Register ¶
func Register(language string, cnstr Constructor)
Register makes a compiler constructor available for the specified language. panic if Register is called twice with the same language or if compiler is nil
Types ¶
type Compiler ¶
type Compiler interface { // Compile compiles a set of policies into a string Compile(pkgname string, pols *ast.Policies, swaggerTypes []types.Type) (string, error) }
compiler defines the interface for the language specific compiler backends
type Constructor ¶
Constructor defines the type for a compiler constructor
type IPolicyCompiler ¶
type PolicyCompiler ¶
type PolicyCompiler struct {
// contains filtered or unexported fields
}
func NewPolicyCompiler ¶
func NewPolicyCompiler(backend string, swaggerTypes ...string) (*PolicyCompiler, error)
Click to show internal directories.
Click to hide internal directories.