repository

package
v0.0.0-...-995e40d Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Invitation

type Invitation struct {
	Token   uuid.UUID // Invitation token uuid - Key
	Email   string    // User Email
	Created time.Time
}

type Peer

type Peer struct {
	PeerKey string // Hash Email+Device - Key
	Email   string // User Email
	Device  string // User Device Name
	Created time.Time
}

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(dbFile string) (r *Repository, err error)

NewRepository Creates a new repository to a specified file

func (*Repository) AddInvitation

func (r *Repository) AddInvitation(i Invitation) error

AddInvitation adds a new Invitation to the repostitory

func (*Repository) Close

func (r *Repository) Close() error

Close will close the repository including the database

func (*Repository) GetInvitation

func (r *Repository) GetInvitation(token uuid.UUID) (i *Invitation, err error)

GetInvitation adds a new Invitation to the repostitory

func (*Repository) RevokeInvitation

func (r *Repository) RevokeInvitation(token uuid.UUID) error

RevokeInvitation adds a new Invitation to the repostitory

Jump to

Keyboard shortcuts

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