api

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	*babyapi.API[*SessionResource]
	// contains filtered or unexported fields
}

func New

func New() *API

func (*API) Load

func (a *API) Load(dir string) error

Load data from files and store in the API's store

func (*API) Setup

func (a *API) Setup(storeFilename string) error

type SessionResource added in v0.3.0

type SessionResource struct {
	*babyapi.DefaultRenderer
	twchart.Session
}

func NewSessionResource added in v0.3.0

func NewSessionResource(session twchart.Session) *SessionResource

NewSessionResource creates a sessionResource from a Session

func (*SessionResource) Bind added in v0.3.0

func (s *SessionResource) Bind(r *http.Request) error

func (SessionResource) GetID added in v0.3.0

func (s SessionResource) GetID() string

func (SessionResource) HTML added in v0.3.0

func (SessionResource) ParentID added in v0.3.0

func (s SessionResource) ParentID() string

func (*SessionResource) Patch added in v0.3.0

func (s *SessionResource) Patch(newSession *SessionResource) *babyapi.ErrResponse

Jump to

Keyboard shortcuts

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