policy

package
v0.0.0-...-4e43573 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PolicyDir = "./policy"

Functions

This section is empty.

Types

type Access

type Access struct {
	Base
}

func (*Access) Check

func (p *Access) Check(ctx context.Context, repo *github.Repository, vs []Violation) ([]Violation, error)

type Base

type Base struct {
	// contains filtered or unexported fields
}

type Checker

type Checker struct {
	// contains filtered or unexported fields
}

func New

func New(op ...OptionInterface) *Checker

func (*Checker) Do

func (re *Checker) Do(ctx context.Context, repo *github.Repository) (*Result, error)

Check policyに則っているか確認

type Option

type Option struct {
	Base
}

func (*Option) Check

func (p *Option) Check(ctx context.Context, repo *github.Repository, vs []Violation) ([]Violation, error)

type OptionInterface

type OptionInterface interface {
	Check(ctx context.Context, repo *github.Repository, vs []Violation) ([]Violation, error)
}

func NewAccess

func NewAccess(client ghc.Client) OptionInterface

func NewOption

func NewOption(client ghc.Client) OptionInterface

func NewProtection

func NewProtection(client ghc.Client) OptionInterface

type Protection

type Protection struct {
	Base
}

func (*Protection) Check

func (p *Protection) Check(ctx context.Context, repo *github.Repository, vs []Violation) ([]Violation, error)

type Result

type Result struct {
	Repository string
	Violations []Violation
}

type Violation

type Violation struct {
	Name    string
	Message string
}

Jump to

Keyboard shortcuts

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