blog

package
v0.0.0-...-e46c3b8 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2021 License: GPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blog

type Blog struct {
	ID            string        `json:"id"`
	FeedURL       string        `json:"feedURL"`
	Author        string        `json:"author"`
	Title         string        `json:"title"`
	Description   string        `json:"descrition,omitempty"`
	Rating        rating.Rating `json:"rating"`
	Level         level.Level   `json:"level"`
	Tags          []tag.Tag     `json:"tags"`
	QuickNote     QuickNote     `json:"quickNote"`
	SavedAt       time.Time     `json:"savedAt"`
	StartedAt     *time.Time    `json:"startedAt,omitempty"`
	FinishedAt    *time.Time    `json:"finishedAt,omitempty"`
	LastSyncedAt  *time.Time    `json:"lastSyncedAt,omitempty"`
	LastUpdatedAt *time.Time    `json:"lastUpdatedAt,omitempty"`
}

Blog is the expoxed blog data.

type QuickNote

type QuickNote struct {
	Text   string `json:"text,omitempty"`
	Public bool   `json:"public"`
}

QuickNote is the expoxed quick note data.

type Service

type Service interface {
	Save(ctx context.Context, userID uuid.UUID, data *data.Blog) (primitive.ObjectID, ctxerr.Error)
	Fetch(ctx context.Context, userID uuid.UUID, data *data.FetchBlogs) ([]*Blog, ctxerr.Error)
}

Service is an abstraction for the Blog service.

func Use

func Use(blogRepo repo.Repo, logger *zap.Logger, validate *validator.Validate) Service

Use returns a Service instance wich uses the given arguments.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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