category

package
v0.0.0-...-3a26ebd Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Read

func Read(name string) (*[]byte, error)

func Remove

func Remove(name string) error

Remove deletes the Category data stored in the dependencies folder.

func Write

func Write(category *Category) error

Write stores and Category pointer to the dependencies folder.

Types

type Category

type Category struct {
	Anchor        string       `json:"anchor"`
	Emoji         *slice.Slice `json:"emoji"`
	Href          string       `json:"href"`
	Name          string       `json:"name"`
	Number        int          `json:"number"`
	Position      int          `json:"position"`
	Subcategories *slice.Slice `json:"subcategories"`
}

Category stores the categorical superset of the emoji data.

func Get

func Get(name string) *Category

Get attempts to open a Category from the emojipedia/categories folder, but panics if an error occurs.

func New

func New() *Category

New instantiates a new empty Category pointer.

func NewCategory

func NewCategory(anchor, href, name string, number, position int, emoji, subcategories *slice.Slice) *Category

NewCategory creates a new Category pointer, requiring all struct features as arguments.

func Open

func Open(name string) (*Category, error)

Open attempts to open a Category from the emojipedia/categories folder.

func Parse

func Parse(content *[]byte) (*Category, error)

func (*Category) SetAnchor

func (pointer *Category) SetAnchor(anchor string) *Category

SetAnchor sets the Category.Anchor property.

func (*Category) SetEmoji

func (pointer *Category) SetEmoji(emoji *slice.Slice) *Category

SetEmoji sets the Category.Emoji property.

func (*Category) SetHref

func (pointer *Category) SetHref(href string) *Category

SetHref sets the Category.Href property.

func (*Category) SetName

func (pointer *Category) SetName(name string) *Category

SetName sets the Category.Name property.

func (*Category) SetNumber

func (pointer *Category) SetNumber(number int) *Category

SetNumber sets the Category.Number property.

func (*Category) SetPosition

func (pointer *Category) SetPosition(position int) *Category

SetPosition sets the Category.Position property.

func (*Category) SetSubcategories

func (pointer *Category) SetSubcategories(subcategories *slice.Slice) *Category

SetSubcategories sets the Category.Subcategories property.

Jump to

Keyboard shortcuts

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