controller

package
v0.0.0-...-e9625fd Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Actions

type Actions struct {
	HealthCheck common.Action

	// OAuth2.0/OIDC
	CallbackGetToken common.Action
	GetAuthorize     common.Action
	ShowIndex        common.Action

	// client app
	FetchResource common.Action
}

Action has all actions.

type CallbackGetToken

type CallbackGetToken struct {
	UseCase  usecase.GetTokenUseCase
	Renderer presenter.Renderer

	AuthServerURI string
	RedirectURI   string
}

func NewCallbackGetToken

func NewCallbackGetToken(aURI, rURI string, u usecase.GetTokenUseCase, r presenter.Renderer) *CallbackGetToken

func (*CallbackGetToken) Action

func (c *CallbackGetToken) Action(w http.ResponseWriter, r *http.Request)

type CallbackGetTokenRequest

type CallbackGetTokenRequest struct {
	Code string `schema:"code"`
}

type FetchResource

type FetchResource struct {
	UseCase  usecase.FetchResourceUseCase
	Renderer presenter.Renderer
}

func (*FetchResource) Action

func (f *FetchResource) Action(w http.ResponseWriter, r *http.Request)

type GetAuthorize

type GetAuthorize struct {
	UseCase  usecase.GetAuthorizeUsecase
	Renderer presenter.Renderer

	AuthServerURI string
	ClientID      string
	RedirectURI   string
	ResponseType  string
}

func NewGetAuthorize

func NewGetAuthorize(u usecase.GetAuthorizeUsecase, r presenter.Renderer, uri, cID, rURI, rt string) *GetAuthorize

func (*GetAuthorize) Action

func (a *GetAuthorize) Action(w http.ResponseWriter, r *http.Request)

type ShowIndex

type ShowIndex struct {
	AuthURL  string
	Renderer presenter.Renderer
}

func NewShowIndex

func NewShowIndex(r presenter.Renderer, url string) *ShowIndex

NewShowIndex returns ShowIndex pointerJ

func (*ShowIndex) Action

func (s *ShowIndex) Action(w http.ResponseWriter, r *http.Request)

Action shows index

Jump to

Keyboard shortcuts

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