repository

package
v0.0.0-...-0ef8f77 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthRepository

type AuthRepository interface {
	IsValid(token string) (bool, error)
	CreateCookie(token string, expiresIn time.Duration) (string, error)
	IsValidCookie(cookie string) (bool, error)
}

type OGP

type OGP interface {
	FindByURL(url string) (*opengraph.OpenGraph, error)
	Set(ogp *opengraph.OpenGraph)
}

type Post

type Post interface {
	FindByID(id string) (*entity.Post, error)
	FindAll(offset, pageSize int, condition string, params []interface{}, sortCondition string) ([]*entity.Post, error)
	FindByPermalink(permalink string) (*entity.Post, error)
	Create(post *entity.Post) error
	Update(post *entity.Post) error
	Delete(id string) error
	Count(condition string, params []interface{}) (int, error)
}

type PostsTags

type PostsTags interface {
	FindByPostIDAndTagName(postID, tagName string) (*entity.PostsTags, error)
	Store(postsTags []*entity.PostsTags) error
	Delete(id string) error
	DeleteByPostID(postID string) error
}

type Tag

type Tag interface {
	FindByID(id string) (*entity.Tag, error)
	FindAll(offset, pageSize int, condition string, params []interface{}) ([]*entity.Tag, error)
	FindByName(name string) (*entity.Tag, error)
	Store(tag *entity.Tag) error
	Delete(id string) error
	Count() (int, error)
}

type User

type User interface {
	FindByID(id string) (*entity.User, error)
	FindAll(offset, pageSize int, condition string, params []interface{}) ([]*entity.User, error)
	FindByMailAddress(mailAddress string) (*entity.User, error)
	Create(user *entity.User) error
	UpdateLastLoggedinAt(user *entity.User) error
	DeleteByMailAddress(id string) error
}

Jump to

Keyboard shortcuts

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