lister

package
v2.17.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Overview

Package lister offers a service to retrieve credentials for an organization.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsInvalidConfig

func IsInvalidConfig(err error) bool

IsInvalidConfig asserts invalidConfigError.

Types

type Config

type Config struct {
	K8sClient kubernetes.Interface
	Logger    micrologger.Logger
}

Config is the service configuration data structure.

type Request

type Request struct {
	Organization string
}

Request is the request the lister service expects.

type Response

type Response struct {
	ID       string
	Provider string
	AWS      ResponseAWS
	Azure    ResponseAzure
}

Response is the response data structure our lister service will return.

type ResponseAWS

type ResponseAWS struct {
	Roles ResponseAWSRoles
}

type ResponseAWSRoles

type ResponseAWSRoles struct {
	Admin       string
	AWSOperator string
}

type ResponseAzure

type ResponseAzure struct {
	ClientID       string
	SubscriptionID string
	TenantID       string
}

type Service

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

Service is our actual service.

func New

func New(config Config) (*Service, error)

New creates a new lister service based on a configutation.

func (*Service) List

func (c *Service) List(ctx context.Context, request Request) ([]Response, error)

List returns metadata on all credentials found.

Jump to

Keyboard shortcuts

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