user

package
v0.0.0-...-e4d4a11 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Permission

type Permission struct {
	Editor     bool
	Prediction bool
}

type Protected

type Protected struct {
	EditorFor     []string
	CurrentUserID string
}

type UserAdmin

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

func NewUserAdmin

func NewUserAdmin(cfg *config.Config, db *store.Database, helixClient helixclient.Client) *UserAdmin

func (*UserAdmin) CheckEditor

func (u *UserAdmin) CheckEditor(r *http.Request, userConfig UserConfig) (string, api.Error)

func (*UserAdmin) ConvertUserConfig

func (u *UserAdmin) ConvertUserConfig(uCfg UserConfig, toNames bool) (UserConfig, api.Error)

func (*UserAdmin) GetUserConfig

func (u *UserAdmin) GetUserConfig(userID string) UserConfig

func (*UserAdmin) ProcessConfig

func (u *UserAdmin) ProcessConfig(ctx context.Context, userID string, login string, newConfig UserConfig, managing string) api.Error

type UserConfig

type UserConfig struct {
	Permissions map[string]Permission
	Protected   Protected
}

Jump to

Keyboard shortcuts

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