auth

package
v0.0.0-...-ce32d93 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddUser

func AddUser(config *AuthStruct, user User, userType string, service string) error

func MarshalConfig

func MarshalConfig(config AuthStruct) ([]byte, error)

func RemoveUser

func RemoveUser(config *AuthStruct, username string, userType string) error

Types

type AuthStruct

type AuthStruct struct {
	Users []User `json:"users"`
}

func LoadConfig

func LoadConfig(path string) (*AuthStruct, error)

type User

type User struct {
	Username string `json:"username"`
	Password string `json:"password"`
	Role     string `json:"role"`
	Service  string `json:"service"`
}

Jump to

Keyboard shortcuts

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