api

package
v0.0.0-...-5684721 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package api implements GraphQL API for any number of locally running macrocosms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server struct {
	Simulations []*macrocosm.Macrocosm // the server's simulations

	Databases []*bolt.DB // a database used to persist macrocosm frames

	Router *gin.Engine // the API router
}

Server is an API server.

func NewServer

func NewServer(sims []*macrocosm.Macrocosm) (Server, error)

NewServer initializes a new

func (*Server) Serve

func (s *Server) Serve(port int)

Serve starts serving the graphql API.

Jump to

Keyboard shortcuts

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