api

package
v0.0.0-...-f45d926 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2021 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultUserId = "c5177e5e-1f54-48f6-aba8-9a816b1d7599"

Functions

This section is empty.

Types

type Constants

type Constants struct {
	APIBaseEndpoint  string
	APIVersion       string
	UsersAPIEndpoint string
	FrontendEndpoint string
	StaticFileRoot   string
	LogStringFormat  string
}

type Server

type Server struct {
	EchoServer *echo.Echo
	UsersList  *UsersList
	Constants  Constants
}

func NewServer

func NewServer(usersList *UsersList, constants *Constants) *Server

func (*Server) GetUser

func (s *Server) GetUser(c echo.Context) error

func (*Server) ListUsers

func (s *Server) ListUsers(c echo.Context) error

type User

type User struct {
	Id string `json:"id"`
}

type UsersList

type UsersList struct {
	Items []*User
}

func GetStaticUsersList

func GetStaticUsersList() *UsersList

func (*UsersList) GetUserById

func (uL *UsersList) GetUserById(id string) (*User, error)

Jump to

Keyboard shortcuts

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