server

package
v0.0.0-...-8eba3d0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigData

type ConfigData struct {
	IngestBucket          string
	StorageBucket         string
	PackagingGroupID      string
	MediapackageRole      string
	MediapackageSource    string
	DeleteIngestFilesFlag bool
	CrowdinToken          string
	CrowdinProjectIDs     []int
}

ConfigData that can be passed to other things

func (ConfigData) GetCrowdinProjectIDs

func (c ConfigData) GetCrowdinProjectIDs() []int

GetCrowdinProjectIDs retrieves the projects the crowdin client should sync to

func (ConfigData) GetCrowdinToken

func (c ConfigData) GetCrowdinToken() string

GetCrowdinToken retrieves the configured Crowdin Token

func (ConfigData) GetDeleteIngestFilesFlag

func (c ConfigData) GetDeleteIngestFilesFlag() bool

GetDeleteIngestFilesFlag controls if the ingest files get deleted after a successful import

func (ConfigData) GetIngestBucket

func (c ConfigData) GetIngestBucket() *string

GetIngestBucket that contains the new assets

func (ConfigData) GetMediapackageRole

func (c ConfigData) GetMediapackageRole() *string

GetMediapackageRole ARN that should be used for ingesting the assets

func (ConfigData) GetMediapackageSource

func (c ConfigData) GetMediapackageSource() *string

GetMediapackageSource S3 ARN that the MediapackageRole has access to

func (ConfigData) GetPackagingGroup

func (c ConfigData) GetPackagingGroup() *string

GetPackagingGroup that the assets should be ingested into

func (ConfigData) GetStorageBucket

func (c ConfigData) GetStorageBucket() *string

GetStorageBucket where the assets are stored for consumption by Mediapackage

type ExternalServices

type ExternalServices struct {
	S3Client          *s3.Client
	MediaPackageVOD   *mediapackagevod.Client
	SearchService     *search.Service
	EventHandler      *events.Handler
	Database          *sql.DB
	RemoteCache       *remotecache.Client
	Queries           *sqlc.Queries
	CrowdinClient     *crowdin.Client
	Scheduler         *scheduler.Service
	StatisticsHandler *statistics.Handler
}

ExternalServices used by the Server

func (ExternalServices) GetCrowdinClient

func (e ExternalServices) GetCrowdinClient() *crowdin.Client

GetCrowdinClient as stored in the struct

func (ExternalServices) GetEventHandler

func (e ExternalServices) GetEventHandler() *events.Handler

GetEventHandler as stored in the struct

func (ExternalServices) GetMediaPackageVOD

func (e ExternalServices) GetMediaPackageVOD() *mediapackagevod.Client

GetMediaPackageVOD as stored in the struct

func (ExternalServices) GetQueries

func (e ExternalServices) GetQueries() *sqlc.Queries

GetQueries as stored in the struct

func (ExternalServices) GetS3Client

func (e ExternalServices) GetS3Client() *s3.Client

GetS3Client as stored in the struct

func (ExternalServices) GetScheduler

func (e ExternalServices) GetScheduler() *scheduler.Service

GetScheduler as stored in the struct

func (ExternalServices) GetSearchService

func (e ExternalServices) GetSearchService() *search.Service

GetSearchService as stored in the struct

func (ExternalServices) GetStatisticHandler

func (e ExternalServices) GetStatisticHandler() *statistics.Handler

type Server

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

Server is the base for all HTTP handler

func NewServer

func NewServer(s ExternalServices, c ConfigData) *Server

NewServer returns a new Server for handling the HTTP requests Yes, go, I know it's "annoying to work with" but in this case you will have to deal with it

func (Server) IngestEventMeta

func (s Server) IngestEventMeta(c *gin.Context)

IngestEventMeta ingests the event meta

func (Server) ProcessAwsMessage

func (s Server) ProcessAwsMessage(c *gin.Context)

ProcessAwsMessage process an event for AWS

func (Server) ProcessMessage

func (s Server) ProcessMessage(c *gin.Context)

ProcessMessage processes the message for ingesting a VOD asset

func (Server) ProcessScheduledTask

func (s Server) ProcessScheduledTask(ctx *gin.Context)

ProcessScheduledTask processes the scheduled task.

Jump to

Keyboard shortcuts

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