webapi

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 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 Duration added in v1.0.2

type Duration int

func (Duration) String added in v1.0.2

func (d Duration) String() string

type Server

type Server struct {
	config.WEBAPIConfig
	Store storage.Storage
}

func NewServer

func NewServer(cfg config.WEBAPIConfig, store storage.Storage) *Server

func (*Server) Run

func (s *Server) Run(ctx context.Context)

type Stats

type Stats struct {
	Name   string `json:"name"`
	URL    string `json:"url"`
	Hours  []int  `json:"hours"`
	Points []int  `json:"points"`
}

func (*Stats) Convert

func (s *Stats) Convert(endpoints []*storage.Endpoint)

Jump to

Keyboard shortcuts

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