lib

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Check

func Check() bool

Check Token for Current User

func CheckToken

func CheckToken(token string) (*authn.ClientTokenCheckResult, string)

Check Token Validity

func Create

func Create(Email string) error

func Delete

func Delete(id string) error

func FileExists

func FileExists(filename string) bool

func Init

func Init() *authn.AuthN

func InitVault

func InitVault() vault.Client

func IsValidPassword

func IsValidPassword(password string) bool

func ListKeys

func ListKeys(Email string) (*pangea.PangeaResponse[vault.ListResult], error)

func ListSecrets

func ListSecrets(Email string) (*pangea.PangeaResponse[vault.ListResult], error)

func Login

func Login()

func LoginWithEmail

func LoginWithEmail(Email string, Password string) (string, string, error)

func LoginWithPass

func LoginWithPass(Email string, Password string) (*authn.UserLoginResult, string, error)

func Logout

func Logout() error

Logout the Current User's Session

func NewUser

func NewUser(Email string) (string, error)

func PassReset

func PassReset(Id string, Password string) error

func StoreKey

func StoreKey(folder string) (string, error, int)

func Update

func Update(id string, req string) error

Types

type APIError

type APIError struct {
	RequestID    string `json:"request_id"`
	RequestTime  string `json:"request_time"`
	ResponseTime string `json:"response_time"`
	Status       string `json:"status"`
	Summary      string `json:"summary"`
}

type TokenInfo

type TokenInfo struct {
	Token   string    `json:"token"`
	Email   string    `json:"email"`
	Name    string    `json:"name"`
	User_ID string    `json:"userID"`
	Expiry  time.Time `json:"expiry"`
}

Jump to

Keyboard shortcuts

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