services

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: Apache-2.0 Imports: 24 Imported by: 0

README

Services

Services will talk to each other. Actors within the bloopyboi domain will use services as the interaction layer. Each service may have a client to communicate with an external service like authentik, k8s, overseerr, etc.

Documentation

Index

Constants

View Source
const (
	ServiceLoggerFieldKey = "service_name"
	DefaultUUID           = ""
)

Variables

View Source
var (
	InspiroFeatureName  = "inspiro"
	InspiroAPIKey       = "api_url"
	InspiroBackupURLKey = "backup_image_link"
)

Functions

func GetTLSTransport

func GetTLSTransport(insecure bool) http.RoundTripper

GetTLSTransport Get a TLS transport instance, that skips verification if configured via environment variables.

Types

type AuthentikClientGenerator

type AuthentikClientGenerator struct {
	models.ClientGenerator
}

type AuthentikService

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

func NewAuthentikService

func NewAuthentikService(clientgen *AuthentikClientGenerator) *AuthentikService

func (*AuthentikService) GetClient

func (s *AuthentikService) GetClient() *api.APIClient

func (*AuthentikService) Verify

func (s *AuthentikService) Verify(ctx context.Context) bool

type BlissfestService added in v0.4.0

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

func NewBlissfestService added in v0.4.0

func NewBlissfestService(config models.BlissfestConfig) *BlissfestService

func (*BlissfestService) GetEndTime added in v0.4.0

func (bs *BlissfestService) GetEndTime() *time.Time

func (*BlissfestService) GetLineupImageURI added in v0.4.0

func (bs *BlissfestService) GetLineupImageURI() string

func (*BlissfestService) GetStartTime added in v0.4.0

func (bs *BlissfestService) GetStartTime() *time.Time

func (*BlissfestService) GetTimeUntilEnd added in v0.4.0

func (bs *BlissfestService) GetTimeUntilEnd(fromDate *time.Time) time.Duration

Gets time until end of event

func (*BlissfestService) GetTimeUntilStart added in v0.4.0

func (bs *BlissfestService) GetTimeUntilStart(fromDate *time.Time) time.Duration

Gets time until start of event

func (*BlissfestService) IsInProgress added in v0.4.0

func (bs *BlissfestService) IsInProgress() bool

Returns true if event inProgress

type BotK8sMeta added in v0.3.7

type BotK8sMeta struct {
}

type InspiroClient added in v0.3.7

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

func NewInspiroClient added in v0.3.7

func NewInspiroClient() *InspiroClient

Creates New InspiroClient with default service

func NewInspiroHttpClient added in v0.3.7

func NewInspiroHttpClient(inspiro *InspiroService) *InspiroClient

Creates New InspiroClient with specified Service

func (*InspiroClient) GetInspiroImageURL added in v0.3.9

func (ic *InspiroClient) GetInspiroImageURL() string

func (*InspiroClient) GetService added in v0.3.9

func (ic *InspiroClient) GetService() *InspiroService

type InspiroConfig added in v0.3.7

type InspiroConfig struct {
	API_url           string
	Logger            *zap.Logger
	Backup_image_link string
}

Basically a static var for this 'Object'

func GetInspiroConfig added in v0.3.7

func GetInspiroConfig() InspiroConfig

Unmarshal config from file

type InspiroService added in v0.3.7

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

should add uri validation

func NewInspiroService added in v0.3.7

func NewInspiroService() *InspiroService

Abstracted 'Constructor'

func NewInspiroServiceWithConfig added in v0.3.7

func NewInspiroServiceWithConfig(myConfig InspiroConfig) *InspiroService

'Constructs' InspiroService with declared Config

func (*InspiroService) GetInspiro added in v0.3.7

func (inspiroService *InspiroService) GetInspiro() string

returns raw uri as string without validation

type K8sService added in v0.3.7

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

func NewK8sService added in v0.3.7

func NewK8sService() *K8sService

func (*K8sService) GetPodMetrics added in v0.3.7

func (ks *K8sService) GetPodMetrics(ctx context.Context) []v1beta1.PodMetrics

func (*K8sService) GetPodNamespace added in v0.3.7

func (ks *K8sService) GetPodNamespace(ctx context.Context) (string, error)

func (*K8sService) ListNamespaces added in v0.3.7

func (ks *K8sService) ListNamespaces(ctx context.Context) []coreV1.Namespace

type OverseerrClientGenerator added in v0.3.11

type OverseerrClientGenerator struct {
	models.ClientGenerator
}

Jump to

Keyboard shortcuts

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