plugin

package
v0.0.0-...-af18c7d Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const PluginName = "protoc-gen-go-authz"

Variables

View Source
var PluginVersion = "0.0.0"

Functions

func LoadConfig

func LoadConfig(config string, c *authorize.FileRule) error

func Run

func Run()

Types

type File

type File struct {
	*protogen.File
	Config   *authorize.FileRule
	Services []*Service
	// contains filtered or unexported fields
}

func NewFile

func NewFile(p *protogen.Plugin, f *protogen.File, c *authorize.FileRule) *File

func (*File) Generate

func (f *File) Generate() error

func (*File) Validate

func (f *File) Validate() error

type Method

type Method struct {
	*protogen.Method
	Imports []*protogen.File
	Config  *authorize.FileRule
}

func NewMethod

func NewMethod(m *protogen.Method, c *authorize.FileRule, imports []*protogen.File) *Method

func (*Method) MethodRule

func (m *Method) MethodRule() *authorize.MethodRule

func (*Method) Validate

func (m *Method) Validate() error

type Service

type Service struct {
	*protogen.Service
	Imports []*protogen.File
	Config  *authorize.FileRule
	Methods []*Method
}

func NewService

func NewService(s *protogen.Service, c *authorize.FileRule, imports []*protogen.File) *Service

func (*Service) Validate

func (s *Service) Validate() error

Jump to

Keyboard shortcuts

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