Skip to content

joshcarp/sysl-ci

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sysl-template

Simple REST endpoint generation in Go

Prerequisites

How to use this template;

  • Click the Use this template button up the top
  • ctrl-f and replace all instances of github.com/joshcarp/sysl-ci with your import path, eg github.com/foobar/myrepo
  • run make
    • note: make must be run with a working internet connection, as it fetches transforms and grammars over the network.
  • run go run main.go
  • congrats! you've just made your first sysl application!

Development

  • Refer to the Makefile to generate client and server code for all of your applications

File structure

api/: contains all API specifications for the generated application

gen/: contains all the generated code for the service

internal/server/server.go: The hand-written code that's written; Server config and such

pkg/defaultcallback: contains code that sets up the defaults for generated code. (This will no longer be necessary in future Sysl versions)

When new endpoints are added, they need to be added to the simple.ServiceInterface variable in server.go

main.go: runs the actual server

run make to regenerate application code First you need to edit the start of the Makefile:

input = your input sysl file
app = < the app you want to develop>
down = <downstreams in a list separated by spaces>
basepath = <Your current go module path>

so: make input=model/simple.sysl app=Simple for this example

run go run main.go to start the server

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published