Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrPostNotFound = errors.New("post not found")
)
Functions ¶
This section is empty.
Types ¶
type Post ¶
type PostCreate ¶
type PostRepository ¶
type PostRepository interface { GetPost(ctx context.Context, id string) (*Post, error) GetPosts(ctx context.Context) ([]*Post, error) // GetPostBySlug(ctx context.Context, slug string) (*Post, error) CreatePost(ctx context.Context, post *PostCreate) (*Post, error) UpdatePost(ctx context.Context, post *Post) (*Post, error) }
type PostUpdate ¶
type PostUsecase ¶
type PostUsecase interface { Get(ctx context.Context, id string) (*Post, error) GetPosts(ctx context.Context) ([]*Post, error) Create(ctx context.Context, title, author, slug, description, content string) (*Post, error) Update(ctx context.Context, id string, title, author, slug, description, content *string, status *Status) (*Post, error) }
Click to show internal directories.
Click to hide internal directories.