handler

package
v0.0.0-...-2771b56 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHandler

func NewHandler(service Service, agent Agent) *handler

Types

type Agent

type Agent interface {
	VerifyUser(in rest.AuthServiceRequest) (rest.AuthServiceResponse, error)
}

type Service

type Service interface {
	CreateItem(ctx context.Context, input rest.CreatePostInput, userId string) error
	GetItem(ctx context.Context, id string) (*model.Post, error)
	GetItems(ctx context.Context, userId string) ([]model.Post, error)
	UpdateItem(ctx context.Context, id string, input rest.UpdatePostInput) error
	DeleteItem(ctx context.Context, id string) error
}

Jump to

Keyboard shortcuts

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