correction

package
v0.0.0-...-3778cc8 Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetReq

type GetReq struct {
	ID string `json:"id"`
}

func (GetReq) MarshalEasyJSON

func (v GetReq) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetReq) MarshalJSON

func (v GetReq) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetReq) UnmarshalEasyJSON

func (v *GetReq) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetReq) UnmarshalJSON

func (v *GetReq) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type GetResp

type GetResp struct {
	ID        string     `json:"id"`
	CreatedAt time.Time  `json:"created_at"`
	UpdatedAt *time.Time `json:"updated_at"`
	Payload   string     `json:"payload"`
	IsError   bool       `json:"is_error"`
}

func (GetResp) MarshalEasyJSON

func (v GetResp) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (GetResp) MarshalJSON

func (v GetResp) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*GetResp) UnmarshalEasyJSON

func (v *GetResp) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*GetResp) UnmarshalJSON

func (v *GetResp) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

type Repo

type Repo interface {
	GetCorrectionByID(ctx context.Context, id string) (*model.Correction, error)
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(
	repo Repo,
) *Service

func (*Service) Get

func (s *Service) Get(ctx context.Context, req *GetReq) (*GetResp, error)

func (Service) MarshalEasyJSON

func (v Service) MarshalEasyJSON(w *jwriter.Writer)

MarshalEasyJSON supports easyjson.Marshaler interface

func (Service) MarshalJSON

func (v Service) MarshalJSON() ([]byte, error)

MarshalJSON supports json.Marshaler interface

func (*Service) UnmarshalEasyJSON

func (v *Service) UnmarshalEasyJSON(l *jlexer.Lexer)

UnmarshalEasyJSON supports easyjson.Unmarshaler interface

func (*Service) UnmarshalJSON

func (v *Service) UnmarshalJSON(data []byte) error

UnmarshalJSON supports json.Unmarshaler interface

Jump to

Keyboard shortcuts

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