grapi

package
v0.0.0-...-c88775d Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewULID

func NewULID() string

NewULID generate a new ULID

Types

type Article

type Article struct {
	ID         string
	ReadListID string
	Name       string
	Link       string
}

Article represents the Article model

type ReadList

type ReadList struct {
	ID     string
	Name   string
	Status Status
}

ReadList represents the ReadList model

type Repository

type Repository interface {
	Store(ReadList) error
	AddArticle(string, Article) error
	FetchArticles(string) ([]Article, error)
}

Repository provide operations to operate read lists

type Status

type Status int

Status type to define the read lists status (enum from proto file)

const (
	// Inactive define inactive read list status
	Inactive Status = iota
	// Active define active read list status
	Active
)

Directories

Path Synopsis
storage

Jump to

Keyboard shortcuts

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