controller

package
v0.0.0-...-04f3e75 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 18 Imported by: 0

README

Controller

The controller package contains the implementation of the application interfaces and adapters, which provide the means for the user to interact with the system and for the system to interact with external services and systems.

This layer includes REST APIs, gRPC services, CLI commands, and other user-facing components that translate user input into use case invocations and present the results of those invocations to the user. By separating the delivery logic from other layers of the application, the delivery package promotes flexibility, scalability, and maintainability of the codebase.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BaseURL

func BaseURL() string

Types

type AuthController

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

func NewAuth

func (*AuthController) GetUserID

func (a *AuthController) GetUserID(c echo.Context) string

func (*AuthController) Login

func (ctrl *AuthController) Login(ctx echo.Context) error

func (*AuthController) OAuthCallback

func (ctrl *AuthController) OAuthCallback(ctx echo.Context) error

func (*AuthController) OAuthLogin

func (ctrl *AuthController) OAuthLogin(ctx echo.Context) error

func (*AuthController) OAuthRefresh

func (ctrl *AuthController) OAuthRefresh(ctx echo.Context) error

func (*AuthController) UseJWT

func (a *AuthController) UseJWT(g *echo.Group)

type DelayController

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

func NewDelay

func NewDelay(cfg config.ServerSettings, task task.Task) DelayController

func (*DelayController) GetUserID

func (a *DelayController) GetUserID(c echo.Context) string

func (*DelayController) ProcessBackground

func (ctrl *DelayController) ProcessBackground(ctx echo.Context) error

func (*DelayController) UseJWT

func (a *DelayController) UseJWT(g *echo.Group)

type HealthcheckController

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

func NewHealthCheck

func NewHealthCheck(cfg config.ServerSettings, healthcheck usecase.Healthcheck) HealthcheckController

func (*HealthcheckController) GetUserID

func (a *HealthcheckController) GetUserID(c echo.Context) string

func (*HealthcheckController) LiveCheck

func (ctrl *HealthcheckController) LiveCheck(ctx echo.Context, params oapi.LiveCheckParams) error

func (*HealthcheckController) ReadyCheck

func (ctrl *HealthcheckController) ReadyCheck(ctx echo.Context, params oapi.ReadyCheckParams) error

func (*HealthcheckController) UseJWT

func (a *HealthcheckController) UseJWT(g *echo.Group)

type JwtCustomClaims

type JwtCustomClaims struct {
	UserID string `json:"user_id"`
	jwt.RegisteredClaims
}

type ProfileController

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

func NewProfile

func NewProfile(cfg config.ServerSettings, profile usecase.Profile) ProfileController

func (*ProfileController) GetProfile

func (ctrl *ProfileController) GetProfile(ctx echo.Context, id oapi.ProfileId) error

func (*ProfileController) GetUserID

func (a *ProfileController) GetUserID(c echo.Context) string

func (*ProfileController) ListProfiles

func (ctrl *ProfileController) ListProfiles(ctx echo.Context, params oapi.ListProfilesParams) error

func (*ProfileController) RemoveProfile

func (ctrl *ProfileController) RemoveProfile(ctx echo.Context, id oapi.ProfileId) error

func (*ProfileController) SaveProfile

func (ctrl *ProfileController) SaveProfile(ctx echo.Context) error

func (*ProfileController) UpdateProfile

func (ctrl *ProfileController) UpdateProfile(ctx echo.Context, id oapi.ProfileId) error

func (*ProfileController) UseJWT

func (a *ProfileController) UseJWT(g *echo.Group)

type TaskController

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

func NewTask

func NewTask(cfg config.ServerSettings, task task.Task) TaskController

func (*TaskController) GetTask

func (ctrl *TaskController) GetTask(ctx echo.Context, queueName string, taskId oapi.TaskId) error

func (*TaskController) GetTaskResponse

func (ctrl *TaskController) GetTaskResponse(ctx echo.Context, queueName string, taskId oapi.TaskId) error

func (*TaskController) GetUserID

func (a *TaskController) GetUserID(c echo.Context) string

func (*TaskController) UseJWT

func (a *TaskController) UseJWT(g *echo.Group)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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