mappings

package
v0.0.0-...-b3ac2b6 Latest Latest
Warning

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

Go to latest
Published: May 18, 2020 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RoleMapper

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

RoleMapper handles relevant logic around associating IPs with a given RAM role

func NewRoleMapper

func NewRoleMapper(roleKey string, defaultRole string, namespaceRestriction bool, namespaceKey string, ramInstance *ram.Client, kubeStore store, namespaceRestrictionFormat string) *RoleMapper

NewRoleMapper returns a new RoleMapper for use.

func (*RoleMapper) DumpDebugInfo

func (r *RoleMapper) DumpDebugInfo() map[string]interface{}

DumpDebugInfo outputs all the roles by IP address.

func (*RoleMapper) GetRoleMapping

func (r *RoleMapper) GetRoleMapping(IP string) (*RoleMappingResult, error)

GetRoleMapping returns the normalized ram RoleMappingResult based on IP address

type RoleMappingResult

type RoleMappingResult struct {
	Role      string
	IP        string
	Namespace string
}

RoleMappingResult represents the relevant information for a given mapping request

Jump to

Keyboard shortcuts

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