auth

package
v0.0.0-...-595c5f8 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthRoleStrings

func AuthRoleStrings() []string

AuthRoleStrings returns a slice of all String values of the enum

Types

type AuthRole

type AuthRole int
const (
	Demo AuthRole = iota + 1
	Free
	Plus
	Pro
	Enterprise
	Support
	Admin
	SuperAdmin
)

func AuthRoleString

func AuthRoleString(s string) (AuthRole, error)

AuthRoleString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func AuthRoleValues

func AuthRoleValues() []AuthRole

AuthRoleValues returns all values of the enum

func (AuthRole) IsAAuthRole

func (i AuthRole) IsAAuthRole() bool

IsAAuthRole returns "true" if the value is listed in the enum definition. "false" otherwise

func (AuthRole) MarshalJSON

func (i AuthRole) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for AuthRole

func (AuthRole) MarshalText

func (i AuthRole) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface for AuthRole

func (*AuthRole) Scan

func (i *AuthRole) Scan(value interface{}) error

func (AuthRole) String

func (i AuthRole) String() string

func (*AuthRole) UnmarshalJSON

func (i *AuthRole) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for AuthRole

func (*AuthRole) UnmarshalText

func (i *AuthRole) UnmarshalText(text []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface for AuthRole

func (*AuthRole) Validate

func (authRole *AuthRole) Validate() error

func (AuthRole) Value

func (i AuthRole) Value() (driver.Value, error)

func (AuthRole) Values

func (authRole AuthRole) Values() []string

Jump to

Keyboard shortcuts

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