controller

package
v0.0.0-...-d65c52b Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2024 License: MPL-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	JwtTokenContextKey = "jwt_token"
)

Variables

This section is empty.

Functions

func AddControllers

func AddControllers(r *chi.Mux, engine *xorm.Engine)

func Unauthorized

func Unauthorized(w http.ResponseWriter, r *http.Request)

Types

type ConfigureController

type ConfigureController struct {
	TxnController

	ConfigureHandler *domains.ConfigureHandler
	UserHandler      *domains.UserHandler
}

func (*ConfigureController) AddAppEnvAndDc

func (c *ConfigureController) AddAppEnvAndDc(w http.ResponseWriter, r *http.Request)

func (*ConfigureController) AddAppNamespace

func (c *ConfigureController) AddAppNamespace(w http.ResponseWriter, r *http.Request)

func (*ConfigureController) AddConfiguration

func (c *ConfigureController) AddConfiguration(w http.ResponseWriter, r *http.Request)

func (*ConfigureController) AddEnvAndDc

func (c *ConfigureController) AddEnvAndDc(w http.ResponseWriter, r *http.Request)

func (*ConfigureController) Applications

func (c *ConfigureController) Applications(w http.ResponseWriter, r *http.Request)

func (*ConfigureController) CreateApplication

func (c *ConfigureController) CreateApplication(w http.ResponseWriter, r *http.Request)

func (*ConfigureController) EnvDcList

func (c *ConfigureController) EnvDcList(w http.ResponseWriter, r *http.Request)

func (*ConfigureController) QueryAppConfigList

func (c *ConfigureController) QueryAppConfigList(w http.ResponseWriter, r *http.Request)

func (*ConfigureController) QueryAppNamespaces

func (c *ConfigureController) QueryAppNamespaces(w http.ResponseWriter, r *http.Request)

func (*ConfigureController) QueryConfigById

func (c *ConfigureController) QueryConfigById(w http.ResponseWriter, r *http.Request)

func (*ConfigureController) UpdateConfigById

func (c *ConfigureController) UpdateConfigById(w http.ResponseWriter, r *http.Request)

type ControllerContainer

type ControllerContainer struct {
	CfgVal *atomic.Value

	UserHandler *domains.UserHandler
}

type RenderFn

type RenderFn func(http.ResponseWriter, *http.Request)

type TxnController

type TxnController struct {
	Engine *xorm.Engine
}

func (*TxnController) RunInTxn

func (tc *TxnController) RunInTxn(w http.ResponseWriter, r *http.Request, fn func(ctx context.Context) (RenderFn, TxnStatus))

type TxnStatus

type TxnStatus int
const (
	TxnStatusCommit   TxnStatus = 1
	TxnStatusRollback TxnStatus = 2
)

type UserController

type UserController struct {
	TxnController
	UserHandler *domains.UserHandler
}

func (*UserController) AddOwnerToOrg

func (u *UserController) AddOwnerToOrg(w http.ResponseWriter, r *http.Request)

func (*UserController) ChangePassword

func (u *UserController) ChangePassword(w http.ResponseWriter, r *http.Request)

func (*UserController) CreateOrganization

func (u *UserController) CreateOrganization(w http.ResponseWriter, r *http.Request)

func (*UserController) QueryUserOrganizations

func (u *UserController) QueryUserOrganizations(w http.ResponseWriter, r *http.Request)

func (*UserController) UserLogin

func (u *UserController) UserLogin(w http.ResponseWriter, r *http.Request)

func (*UserController) UserRegister

func (u *UserController) UserRegister(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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