models

package
v0.0.0-...-295b365 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAnagrams

func GetAnagrams(word string) []string

Get slice of anagrams for word

func GetDB

func GetDB() *gorm.DB

func WordsToStrings

func WordsToStrings(words []*Words) []string

Types

type Words

type Words struct {
	gorm.Model
	LetterCounter string `gorm:"index:idx_letters,type:hash"`
	Word          string
}

Struct for word and its letters

func (*Words) Create

func (word *Words) Create() bool

func (*Words) Validate

func (word *Words) Validate() bool

Check if this word exists in db

Jump to

Keyboard shortcuts

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