manage

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 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 CreateRequest

type CreateRequest struct {
	Username string   `json:"username"`
	Groups   []string `json:"groups"`
}

type CreateResponse

type CreateResponse struct {
	Username string `json:"username,omitempty"`

	UserID string `json:"userID"`
	APIKey string `json:"apiKey"`
}

type GroupSchema

type GroupSchema struct {
	Group       string        `json:"group"`
	Permissions []Permissions `json:"permissions"`
}

type Permissions

type Permissions struct {
	Resource string `json:"resource"`
	CanRead  bool   `json:"canRead"`
	CanWrite bool   `json:"canWrite"`
}

type Plugin

type Plugin struct {
	vroomy.BasePlugin

	// Backend
	Jump *jump.Jump `vroomy:"jump"`
}

func (*Plugin) Backend

func (p *Plugin) Backend() interface{}

Backend exposes this plugin's data layer to other plugins

func (*Plugin) Create

func (p *Plugin) Create(ctx *httpserve.Context)

Create will create a new proxy user

func (*Plugin) GetCurrentUser

func (p *Plugin) GetCurrentUser(ctx *httpserve.Context)

GetCurrentUser will get the current user

func (*Plugin) List

func (p *Plugin) List(ctx *httpserve.Context)

List gets a users list

func (*Plugin) Load

func (p *Plugin) Load(env vroomy.Environment) (err error)

New ensures Profiles Database is built and open for access

func (*Plugin) RefreshAPIKey

func (p *Plugin) RefreshAPIKey(ctx *httpserve.Context)

RefreshAPIKey will refresh the API key of a user

Jump to

Keyboard shortcuts

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