policy

package
v0.0.0-...-130476d Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IsAuthorizedReq

type IsAuthorizedReq struct {
	Subjects             []string `` /* 129-byte string literal not displayed */
	Resource             string   `` /* 129-byte string literal not displayed */
	Action               string   `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty" toml:"action,omitempty" mapstructure:"action,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_unrecognized     []byte   `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_sizecache        int32    `json:"-" toml:"-" mapstructure:"-,omitempty"`
}

type Module

type Module struct {
	*pgs.ModuleBase
	// contains filtered or unexported fields
}

Module generates the policy mapping calls according to the proto file annotations.

func Policy

func Policy() *Module

Policy returns an initialized policy.Module

func (*Module) Execute

func (m *Module) Execute(targets map[string]pgs.File, pkgs map[string]pgs.Package) []pgs.Artifact

Execute satisfies the pgs.Module interface

func (*Module) InitContext

func (m *Module) InitContext(c pgs.BuildContext)

func (*Module) Name

func (m *Module) Name() string

Name satisfies the pgs.Module interface

type ValidateV2ResourceAndActions

type ValidateV2ResourceAndActions struct {
	Subjects             []string `` /* 129-byte string literal not displayed */
	Resource             string   `` /* 129-byte string literal not displayed */
	Action               string   `protobuf:"bytes,3,opt,name=action,proto3" json:"action,omitempty" toml:"action,omitempty" mapstructure:"action,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_unrecognized     []byte   `json:"-" toml:"-" mapstructure:"-,omitempty"`
	XXX_sizecache        int32    `json:"-" toml:"-" mapstructure:"-,omitempty"`
}

We were re-using the IAM V2 IsAuthorizedReq's Validate function to validate our V2 AuthZ annotations. Preserving that code here so we can continue to validate.

func (*ValidateV2ResourceAndActions) GetAction

func (m *ValidateV2ResourceAndActions) GetAction() string

func (*ValidateV2ResourceAndActions) GetResource

func (m *ValidateV2ResourceAndActions) GetResource() string

func (*ValidateV2ResourceAndActions) GetSubjects

func (m *ValidateV2ResourceAndActions) GetSubjects() []string

type ValidateV2ResourceAndActionsValidationError

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

func (ValidateV2ResourceAndActionsValidationError) Error

Jump to

Keyboard shortcuts

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