api

package
v0.0.0-...-2a922c4 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EventSource

func EventSource(m mediator.Mediator, log *slog.Logger) http.HandlerFunc

func KeepAlive

func KeepAlive(m mediator.Mediator)

func New

func New(ctx context.Context, serviceName string, mediator mediator.Mediator, storage storage.Storage, policies io.Reader) (chi.Router, error)

Types

type ApiResponse

type ApiResponse struct {
	Meta  *meta  `json:"meta,omitempty"`
	Data  any    `json:"data"`
	Links *links `json:"links,omitempty"`
}

func NewApiResponse

func NewApiResponse(r *http.Request, data any, count, total, offset, limit uint64) ApiResponse

func (ApiResponse) Byte

func (r ApiResponse) Byte() []byte

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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