controller

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JSONResponse

func JSONResponse(w http.ResponseWriter, code int, response interface{})

JSONResponse writter

func New added in v0.7.0

func New(
	commit string,
	version string,
	delivery Delivery,
	ingestion Ingestion,
) controller

New returns a controller

Types

type Delivery added in v0.7.0

type Delivery interface {
	GetByID(ctx context.Context, id string) (model.Video, error)
}

Delivery usecase

type Ingestion added in v0.7.0

type Ingestion interface {
	Create(ctx context.Context, anyVideo model.Video) (model.Video, error)
}

Ingestion usecase

type Response

type Response struct {
	Message string `json:"message"`
	Status  int    `json:"status"`
}

Response struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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