user

package
v0.0.0-...-19fb9ea Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UserWireSet = wire.NewSet(
	UserAuditWireSet,

	NewUserAuthRouterImpl,
	wire.Bind(new(UserAuthRouter), new(*UserAuthRouterImpl)),
	NewUserAuthHandlerImpl,
	wire.Bind(new(UserAuthHandler), new(*UserAuthHandlerImpl)),
	user.NewUserAuthServiceImpl,
	wire.Bind(new(user.UserAuthService), new(*user.UserAuthServiceImpl)),
	repository.NewUserAuthRepositoryImpl,
	wire.Bind(new(repository.UserAuthRepository), new(*repository.UserAuthRepositoryImpl)),
	repository.NewDefaultAuthPolicyRepositoryImpl,
	wire.Bind(new(repository.DefaultAuthPolicyRepository), new(*repository.DefaultAuthPolicyRepositoryImpl)),
	repository.NewDefaultAuthRoleRepositoryImpl,
	wire.Bind(new(repository.DefaultAuthRoleRepository), new(*repository.DefaultAuthRoleRepositoryImpl)),

	NewUserRouterImpl,
	wire.Bind(new(UserRouter), new(*UserRouterImpl)),
	NewUserRestHandlerImpl,
	wire.Bind(new(UserRestHandler), new(*UserRestHandlerImpl)),
	user.NewUserServiceImpl,
	wire.Bind(new(user.UserService), new(*user.UserServiceImpl)),
	repository.NewUserRepositoryImpl,
	wire.Bind(new(repository.UserRepository), new(*repository.UserRepositoryImpl)),
	user.NewRoleGroupServiceImpl,
	wire.Bind(new(user.RoleGroupService), new(*user.RoleGroupServiceImpl)),
	repository.NewRoleGroupRepositoryImpl,
	wire.Bind(new(repository.RoleGroupRepository), new(*repository.RoleGroupRepositoryImpl)),

	casbin.NewEnforcerImpl,
	wire.Bind(new(casbin.Enforcer), new(*casbin.EnforcerImpl)),
	casbin.Create,

	user.NewUserCommonServiceImpl,
	wire.Bind(new(user.UserCommonService), new(*user.UserCommonServiceImpl)),
)

Functions

This section is empty.

Types

type UserAuthHandler

type UserAuthHandler interface {
	LoginHandler(w http.ResponseWriter, r *http.Request)
	CallbackHandler(w http.ResponseWriter, r *http.Request)
	RefreshTokenHandler(w http.ResponseWriter, r *http.Request)
	AddDefaultPolicyAndRoles(w http.ResponseWriter, r *http.Request)
	AuthVerification(w http.ResponseWriter, r *http.Request)
}

type UserAuthHandlerImpl

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

func NewUserAuthHandlerImpl

func NewUserAuthHandlerImpl(
	userAuthService user.UserAuthService,
	validator *validator.Validate,
	logger *zap.SugaredLogger) *UserAuthHandlerImpl

func (UserAuthHandlerImpl) AddDefaultPolicyAndRoles

func (handler UserAuthHandlerImpl) AddDefaultPolicyAndRoles(w http.ResponseWriter, r *http.Request)

func (UserAuthHandlerImpl) AuthVerification

func (handler UserAuthHandlerImpl) AuthVerification(w http.ResponseWriter, r *http.Request)

func (UserAuthHandlerImpl) CallbackHandler

func (handler UserAuthHandlerImpl) CallbackHandler(w http.ResponseWriter, r *http.Request)

func (UserAuthHandlerImpl) LoginHandler

func (handler UserAuthHandlerImpl) LoginHandler(w http.ResponseWriter, r *http.Request)

func (UserAuthHandlerImpl) RefreshTokenHandler

func (handler UserAuthHandlerImpl) RefreshTokenHandler(w http.ResponseWriter, r *http.Request)

type UserAuthRouter

type UserAuthRouter interface {
	InitUserAuthRouter(router *mux.Router)
}

type UserAuthRouterImpl

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

func NewUserAuthRouterImpl

func NewUserAuthRouterImpl(logger *zap.SugaredLogger, userAuthHandler UserAuthHandler, selfRegistrationRolesService user.SelfRegistrationRolesService, dexConfig *client.DexConfig) (*UserAuthRouterImpl, error)

func (UserAuthRouterImpl) InitUserAuthRouter

func (router UserAuthRouterImpl) InitUserAuthRouter(userAuthRouter *mux.Router)

func (UserAuthRouterImpl) RedirectUrlSanitiser

func (router UserAuthRouterImpl) RedirectUrlSanitiser(redirectUrl string) string

RedirectUrlSanitiser replaces initial "/orchestrator" from url

type UserRestHandler

type UserRestHandler interface {
	CreateUser(w http.ResponseWriter, r *http.Request)
	UpdateUser(w http.ResponseWriter, r *http.Request)
	GetById(w http.ResponseWriter, r *http.Request)
	GetAll(w http.ResponseWriter, r *http.Request)
	DeleteUser(w http.ResponseWriter, r *http.Request)

	FetchRoleGroupById(w http.ResponseWriter, r *http.Request)
	CreateRoleGroup(w http.ResponseWriter, r *http.Request)
	UpdateRoleGroup(w http.ResponseWriter, r *http.Request)
	FetchRoleGroups(w http.ResponseWriter, r *http.Request)
	FetchRoleGroupsByName(w http.ResponseWriter, r *http.Request)
	DeleteRoleGroup(w http.ResponseWriter, r *http.Request)
	CheckUserRoles(w http.ResponseWriter, r *http.Request)
	SyncOrchestratorToCasbin(w http.ResponseWriter, r *http.Request)
	UpdateTriggerPolicyForTerminalAccess(w http.ResponseWriter, r *http.Request)
}

type UserRestHandlerImpl

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

func NewUserRestHandlerImpl

func NewUserRestHandlerImpl(userService user.UserService, validator *validator.Validate,
	logger *zap.SugaredLogger, enforcer casbin.Enforcer, roleGroupService user.RoleGroupService) *UserRestHandlerImpl

func (UserRestHandlerImpl) CheckUserRoles

func (handler UserRestHandlerImpl) CheckUserRoles(w http.ResponseWriter, r *http.Request)

func (UserRestHandlerImpl) CreateRoleGroup

func (handler UserRestHandlerImpl) CreateRoleGroup(w http.ResponseWriter, r *http.Request)

func (UserRestHandlerImpl) CreateUser

func (handler UserRestHandlerImpl) CreateUser(w http.ResponseWriter, r *http.Request)

func (UserRestHandlerImpl) DeleteRoleGroup

func (handler UserRestHandlerImpl) DeleteRoleGroup(w http.ResponseWriter, r *http.Request)

func (UserRestHandlerImpl) DeleteUser

func (handler UserRestHandlerImpl) DeleteUser(w http.ResponseWriter, r *http.Request)

func (UserRestHandlerImpl) FetchRoleGroupById

func (handler UserRestHandlerImpl) FetchRoleGroupById(w http.ResponseWriter, r *http.Request)

func (UserRestHandlerImpl) FetchRoleGroups

func (handler UserRestHandlerImpl) FetchRoleGroups(w http.ResponseWriter, r *http.Request)

func (UserRestHandlerImpl) FetchRoleGroupsByName

func (handler UserRestHandlerImpl) FetchRoleGroupsByName(w http.ResponseWriter, r *http.Request)

func (UserRestHandlerImpl) GetAll

func (handler UserRestHandlerImpl) GetAll(w http.ResponseWriter, r *http.Request)

func (UserRestHandlerImpl) GetById

func (handler UserRestHandlerImpl) GetById(w http.ResponseWriter, r *http.Request)

func (UserRestHandlerImpl) SyncOrchestratorToCasbin

func (handler UserRestHandlerImpl) SyncOrchestratorToCasbin(w http.ResponseWriter, r *http.Request)

func (UserRestHandlerImpl) UpdateRoleGroup

func (handler UserRestHandlerImpl) UpdateRoleGroup(w http.ResponseWriter, r *http.Request)

func (UserRestHandlerImpl) UpdateTriggerPolicyForTerminalAccess

func (handler UserRestHandlerImpl) UpdateTriggerPolicyForTerminalAccess(w http.ResponseWriter, r *http.Request)

func (UserRestHandlerImpl) UpdateUser

func (handler UserRestHandlerImpl) UpdateUser(w http.ResponseWriter, r *http.Request)

type UserRouter

type UserRouter interface {
	InitUserRouter(helmRouter *mux.Router)
}

type UserRouterImpl

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

func NewUserRouterImpl

func NewUserRouterImpl(userRestHandler UserRestHandler) *UserRouterImpl

func (UserRouterImpl) InitUserRouter

func (router UserRouterImpl) InitUserRouter(userAuthRouter *mux.Router)

Jump to

Keyboard shortcuts

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