api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: 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 ActionResponse

type ActionResponse struct {
	ID        string                     `json:"id"`
	PolicyID  string                     `json:"policyId"`
	Event     recommendations.AWSEvent   `json:"event"`
	Status    string                     `json:"status"`
	Time      time.Time                  `json:"time"`
	Resources []recommendations.Resource `json:"resources"`

	Recommendations    []recommendations.RecommendationDetails `json:"recommendations"`
	HasRecommendations bool                                    `json:"hasRecommendations"`
}

type Check

type Check struct {
	Log *zap.SugaredLogger
}

Check provides support for orchestration health checks.

func (*Check) Health

func (c *Check) Health(w http.ResponseWriter, r *http.Request)

Health validates the service is healthy and ready to accept requests.

type CreateEventBatchResponse

type CreateEventBatchResponse struct {
	AlertIDs []string `json:"alertIDs"`
}

type CreateTokenRequest

type CreateTokenRequest struct {
	Name string `json:"name"`
}

type Handlers

type Handlers struct {
	Log           *zap.SugaredLogger
	TokenStore    tokens.TokenStorer
	ActionStorage storage.ActionStorage
	PolicyStorage storage.PolicyStorage
	Demo          bool
}

Handlers is the configuration for the handlers with required objects

func (*Handlers) CreateEventBatch

func (h *Handlers) CreateEventBatch(w http.ResponseWriter, r *http.Request)

CreateEventBatch creates a batch of events Design assumption - all events in a given batch are dispatched for the same token and role

func (*Handlers) CreateToken

func (h *Handlers) CreateToken(w http.ResponseWriter, r *http.Request)

func (*Handlers) DeleteToken

func (h *Handlers) DeleteToken(w http.ResponseWriter, r *http.Request)

func (*Handlers) EditAction

func (h *Handlers) EditAction(w http.ResponseWriter, r *http.Request)

func (*Handlers) GetAction

func (h *Handlers) GetAction(w http.ResponseWriter, r *http.Request)

func (*Handlers) GetPolicy

func (h *Handlers) GetPolicy(w http.ResponseWriter, r *http.Request)

func (*Handlers) ListActions

func (h *Handlers) ListActions(w http.ResponseWriter, r *http.Request)

func (*Handlers) ListActionsForPolicy

func (h *Handlers) ListActionsForPolicy(w http.ResponseWriter, r *http.Request)

func (*Handlers) ListPolicies

func (h *Handlers) ListPolicies(w http.ResponseWriter, r *http.Request)

ListPolicies lists policies stored by IAM Zero. If the `status` query parameter is passed only policies matching the status will be returned

func (*Handlers) ListTokens

func (h *Handlers) ListTokens(w http.ResponseWriter, r *http.Request)

func (*Handlers) SetPolicyStatus

func (h *Handlers) SetPolicyStatus(w http.ResponseWriter, r *http.Request)

type ListTokensResponse

type ListTokensResponse struct {
	Tokens []tokens.Token `json:"tokens"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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