configmap

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RoleNotFound = errors.New("Role not found in configmap")

RoleNotFound is the error returned when the role is not found in the config map.

View Source
var UserNotFound = errors.New("User not found in configmap")

UserNotFound is the error returned when the user is not found in the config map.

Functions

func EncodeMap

func EncodeMap(userMappings []config.UserMapping, roleMappings []config.RoleMapping, awsAccounts []string) (m map[string]string, err error)

func ParseMap

func ParseMap(m map[string]string) (userMappings []config.UserMapping, roleMappings []config.RoleMapping, awsAccounts []string, err error)

Types

type ConfigMapMapper

type ConfigMapMapper struct {
	*MapStore
}

func NewConfigMapMapper

func NewConfigMapMapper(cfg config.Config) (*ConfigMapMapper, error)

func (*ConfigMapMapper) IsAccountAllowed

func (m *ConfigMapMapper) IsAccountAllowed(accountID string) bool

func (*ConfigMapMapper) Map

func (m *ConfigMapMapper) Map(canonicalARN string) (*config.IdentityMapping, error)

func (*ConfigMapMapper) Name

func (m *ConfigMapMapper) Name() string

func (*ConfigMapMapper) Start

func (m *ConfigMapMapper) Start(stopCh <-chan struct{}) error

type ErrParsingMap

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

func (ErrParsingMap) Error

func (err ErrParsingMap) Error() string

type MapStore

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

func New

func New(masterURL, kubeConfig string) (*MapStore, error)

func (*MapStore) AWSAccount

func (ms *MapStore) AWSAccount(id string) bool

func (*MapStore) RoleMapping

func (ms *MapStore) RoleMapping(arn string) (config.RoleMapping, error)

func (*MapStore) UserMapping

func (ms *MapStore) UserMapping(arn string) (config.UserMapping, error)

Directories

Path Synopsis
Package client implements client-side operations on auth configmap.
Package client implements client-side operations on auth configmap.

Jump to

Keyboard shortcuts

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