mark

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveCandidates

func RemoveCandidates(owner string, c cache.Cache, ids []*string) error

func WithinTTLTime

func WithinTTLTime(ttl string, start time.Time) bool

Types

type MarkedCandidate

type MarkedCandidate struct {
	MarkerType    MarkerType        `json:"marker_type"`
	CandidateType string            `json:"candidate_type"`
	Id            string            `json:"id"`
	Owner         string            `json:"owner"`
	Ttl           string            `json:"ttl"`
	Purpose       string            `json:"purpose"`
	Account       string            `json:"account"`
	Tags          map[string]string `json:"tags"`
}

func BuildCandidates

func BuildCandidates(owner string, c cache.Cache) ([]*MarkedCandidate, error)

func (*MarkedCandidate) GenerateSlackAttachmentFields

func (mc *MarkedCandidate) GenerateSlackAttachmentFields() []slack.AttachmentField

type Marker

type Marker interface {
	Mark()
	Sweep()
	GetMarkSchedule() string
	GetSweepSchedule() string
	GetNotifySchedule() string
	GetName() string
	GetType() MarkerType
}

type MarkerType

type MarkerType int
const (
	AWS          MarkerType = 0
	GCP          MarkerType = 1
	K8S          MarkerType = 2
	REQUIRED_TAG            = "ttl"
)

func (MarkerType) Color

func (mt MarkerType) Color() string

func (MarkerType) String

func (mt MarkerType) String() string

type NoCandidatesError

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

func (*NoCandidatesError) Error

func (e *NoCandidatesError) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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