Documentation ¶
Index ¶
- func GetFirstResource(space cfclient.Space, apps []cfclient.App, ...) (time.Time, error)
- func ListOrgResources(client *cfclient.Client, org cfclient.Org) (spaces []cfclient.Space, apps []cfclient.App, ...)
- func ListPurgeSpaces(spaces []cfclient.Space, apps []cfclient.App, ...) (toNotify []SpaceDetails, toPurge []SpaceDetails, err error)
- func ListRecipients(userGUIDs map[string]bool, roles []cfclient.SpaceRole) (addresses, developers, managers []string)
- func ListSandboxOrgs(client *cfclient.Client, prefix string) ([]cfclient.Org, error)
- func PurgeSpace(client *cfclient.Client, space cfclient.Space) error
- func RenderTemplate(tmpl *template.Template, data map[string]interface{}) (string, error)
- func SendMail(opts SMTPOptions, sender string, subject string, body string, ...) error
- type SMTPOptions
- type SpaceDetails
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetFirstResource ¶
func GetFirstResource( space cfclient.Space, apps []cfclient.App, instances []cfclient.ServiceInstance, ) (time.Time, error)
GetFirstResource gets the creation timestamp of the earliest-created resource in a space
func ListOrgResources ¶
func ListOrgResources( client *cfclient.Client, org cfclient.Org, ) ( spaces []cfclient.Space, apps []cfclient.App, instances []cfclient.ServiceInstance, err error, )
ListOrgResources fetches apps, service instances, and spaces within an organization
func ListPurgeSpaces ¶
func ListPurgeSpaces( spaces []cfclient.Space, apps []cfclient.App, instances []cfclient.ServiceInstance, now time.Time, notifyThreshold int, purgeThreshold int, timeStartsAt time.Time, ) ( toNotify []SpaceDetails, toPurge []SpaceDetails, err error, )
ListPurgeSpaces identifies spaces that will be notified or purged
func ListRecipients ¶
func ListRecipients(userGUIDs map[string]bool, roles []cfclient.SpaceRole) (addresses, developers, managers []string)
ListRecipients get a list of recipient emails from space roles
func ListSandboxOrgs ¶
ListSandboxOrgs lists all sandbox organizations
func PurgeSpace ¶
func PurgeSpace(client *cfclient.Client, space cfclient.Space) error
PurgeSpace deletes a space; if the delete fails, it deletes all applications within the space
func RenderTemplate ¶
RenderTemplate renders a template to string
Types ¶
type SMTPOptions ¶
type SMTPOptions struct { SMTPHost string `envconfig:"smtp_host" required:"true"` SMTPPort int `envconfig:"smtp_port" default:"587"` SMTPUser string `envconfig:"smtp_user" required:"true"` SMTPPass string `envconfig:"smtp_pass" required:"true"` SMTPCert string `envconfig:"smtp_cert"` }
SMTPOptions describes configation for sending mail via SMTP
type SpaceDetails ¶
SpaceDetails describes a space and its first resource creation time
Click to show internal directories.
Click to hide internal directories.