database

package
v0.0.0-...-ba647bc Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database

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

func DatabaseInstance

func DatabaseInstance() *Database

func (*Database) AddValue

func (d *Database) AddValue(content *RawValue, guild string)

func (*Database) GetRawValue

func (d *Database) GetRawValue(guild string, tags []string) *RawValue

func (*Database) GetRawValues

func (d *Database) GetRawValues(guild string, tags []string) []RawValue

func (*Database) GetRawValuesByAuthor

func (d *Database) GetRawValuesByAuthor(guild string, author string) []RawValue

func (*Database) Init

func (d *Database) Init()

type RawValue

type RawValue struct {
	Id      uuid.UUID
	Content string
	Author  string
	Tags    []string
}

func Intersection

func Intersection(a []RawValue, b []RawValue) []RawValue

type SpreadSheet

type SpreadSheet struct {
	RawValues map[string][]RawValue
	// contains filtered or unexported fields
}

func SpreadSheetInstance

func SpreadSheetInstance() *SpreadSheet

func (*SpreadSheet) Init

func (s *SpreadSheet) Init()

func (*SpreadSheet) TryAdd

func (s *SpreadSheet) TryAdd(value RawValue, guild string) bool

func (*SpreadSheet) UpdateAllValueFromRemote

func (s *SpreadSheet) UpdateAllValueFromRemote()

type Token

type Token struct {
	Email        string
	PrivateKey   string
	PrivateKeyID string
	TokenURL     string
	Scopes       []string
}

Jump to

Keyboard shortcuts

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