gitacls

package
v0.0.0-...-a0a3655 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package gitacls implements read ACLs for Git/Gerrit data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateConfig

func ValidateConfig(ctx *validation.Context, cfg []*config.Settings_SourceAcls)

ValidateConfig passes all validation errors through validation context.

Types

type ACLs

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

ACLs define readers for git repositories and Gerrits CLs.

func FromConfig

func FromConfig(c context.Context, cfg []*config.Settings_SourceAcls) (*ACLs, error)

FromConfig returns ACLs if config is valid.

func (*ACLs) IsAllowed

func (a *ACLs) IsAllowed(c context.Context, host, project string) (bool, error)

IsAllowed returns whether current identity has been granted read access to given Git/Gerrit project.

Jump to

Keyboard shortcuts

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