store

package
v0.0.0-...-b55fc50 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store struct {
	Users map[string]User
	// contains filtered or unexported fields
}

func FromFile

func FromFile(pathname string) (*Store, error)

func New

func New(pathname string) *Store

func (*Store) AddUser

func (s *Store) AddUser(id string, user User)

func (*Store) GetUser

func (s *Store) GetUser(id string) (User, error)

func (*Store) ListUsers

func (s *Store) ListUsers() map[string]User

func (*Store) RemoveUser

func (s *Store) RemoveUser(id string)

func (*Store) Save

func (s *Store) Save() error

type User

type User struct {
	Email string
	Name  string
}

Jump to

Keyboard shortcuts

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