cis

package
v0.0.0-...-a592c90 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2021 License: Apache-2.0, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrokerClient

type BrokerClient interface {
	Deprovision(instance internal.Instance) (string, error)
}

type CisClient

type CisClient interface {
	FetchSubAccountsToDelete() ([]string, error)
}

type CisResponse

type CisResponse struct {
	Total      int     `json:"total"`
	TotalPages int     `json:"totalPages"`
	PageNum    int     `json:"pageNum"`
	Events     []Event `json:"events"`
}

type CisResponseVer1

type CisResponseVer1 struct {
	Total      int         `json:"totalResults"`
	TotalPages int         `json:"totalPages"`
	Events     []EventVer1 `json:"events"`
}

type Client

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

func NewClient

func NewClient(ctx context.Context, config Config, log logrus.FieldLogger) *Client

func (*Client) FetchSubAccountsToDelete

func (c *Client) FetchSubAccountsToDelete() ([]string, error)

func (*Client) SetHttpClient

func (c *Client) SetHttpClient(httpClient *http.Client)

SetHttpClient auxiliary method of testing to get rid of oAuth client wrapper

type ClientVer1

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

func NewClientVer1

func NewClientVer1(ctx context.Context, config Config, log logrus.FieldLogger) *ClientVer1

func (*ClientVer1) FetchSubAccountsToDelete

func (c *ClientVer1) FetchSubAccountsToDelete() ([]string, error)

func (*ClientVer1) SetHttpClient

func (c *ClientVer1) SetHttpClient(httpClient *http.Client)

SetHttpClient auxiliary method of testing to get rid of oAuth client wrapper

type Config

type Config struct {
	ClientID        string
	ClientSecret    string
	AuthURL         string
	EventServiceURL string
	PageSize        string `envconfig:"optional"`
}

type Event

type Event struct {
	CreationTime int64  `json:"creationTime"`
	SubAccount   string `json:"entityId"`
	Type         string `json:"eventType"`
}

type EventDataVer1

type EventDataVer1 struct {
	SubAccount string `json:"subaccountGuid"`
}

type EventVer1

type EventVer1 struct {
	Type string        `json:"type"`
	Data EventDataVer1 `json:"eventData"`
}

type SubAccountCleanupService

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

func NewSubAccountCleanupService

func NewSubAccountCleanupService(client CisClient, brokerClient BrokerClient, storage storage.Instances, log logrus.FieldLogger) *SubAccountCleanupService

func (*SubAccountCleanupService) Run

func (ac *SubAccountCleanupService) Run() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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