diff --git a/sam/channel.handlers.go b/sam/channel.handlers.go index 52eb72a6c..63d31b805 100644 --- a/sam/channel.handlers.go +++ b/sam/channel.handlers.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `channel.go`, `channel.util.go` or `channel_test.go` to + implement your API calls, helper functions and tests. The file `channel.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "net/http" diff --git a/sam/channel.interfaces.go b/sam/channel.interfaces.go index 2659fd086..e2cc7f5f6 100644 --- a/sam/channel.interfaces.go +++ b/sam/channel.interfaces.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `channel.go`, `channel.util.go` or `channel_test.go` to + implement your API calls, helper functions and tests. The file `channel.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "net/http" ) diff --git a/sam/channel.request.go b/sam/channel.request.go index 7b594723a..ff7ad9567 100644 --- a/sam/channel.request.go +++ b/sam/channel.request.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `channel.go`, `channel.util.go` or `channel_test.go` to + implement your API calls, helper functions and tests. The file `channel.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "github.com/go-chi/chi" "net/http" diff --git a/sam/channel.structs.go b/sam/channel.structs.go index 6c343cc85..a070555ab 100644 --- a/sam/channel.structs.go +++ b/sam/channel.structs.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `channel.go`, `channel.util.go` or `channel_test.go` to + implement your API calls, helper functions and tests. The file `channel.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "time" ) diff --git a/sam/message.handlers.go b/sam/message.handlers.go index ce727a59a..f7cb217de 100644 --- a/sam/message.handlers.go +++ b/sam/message.handlers.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `message.go`, `message.util.go` or `message_test.go` to + implement your API calls, helper functions and tests. The file `message.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "net/http" diff --git a/sam/message.interfaces.go b/sam/message.interfaces.go index b7554124d..68da5cacc 100644 --- a/sam/message.interfaces.go +++ b/sam/message.interfaces.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `message.go`, `message.util.go` or `message_test.go` to + implement your API calls, helper functions and tests. The file `message.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "net/http" ) diff --git a/sam/message.request.go b/sam/message.request.go index a69748a65..2055e0cb9 100644 --- a/sam/message.request.go +++ b/sam/message.request.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `message.go`, `message.util.go` or `message_test.go` to + implement your API calls, helper functions and tests. The file `message.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "github.com/go-chi/chi" "net/http" diff --git a/sam/message.structs.go b/sam/message.structs.go index c60068da1..f1a4a10cb 100644 --- a/sam/message.structs.go +++ b/sam/message.structs.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `message.go`, `message.util.go` or `message_test.go` to + implement your API calls, helper functions and tests. The file `message.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + type ( // Messages Message struct { diff --git a/sam/organisation.handlers.go b/sam/organisation.handlers.go index 501cd7882..4f27b6b21 100644 --- a/sam/organisation.handlers.go +++ b/sam/organisation.handlers.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `organisation.go`, `organisation.util.go` or `organisation_test.go` to + implement your API calls, helper functions and tests. The file `organisation.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "net/http" diff --git a/sam/organisation.interfaces.go b/sam/organisation.interfaces.go index 1c148459c..1e4f6bc6c 100644 --- a/sam/organisation.interfaces.go +++ b/sam/organisation.interfaces.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `organisation.go`, `organisation.util.go` or `organisation_test.go` to + implement your API calls, helper functions and tests. The file `organisation.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "net/http" ) diff --git a/sam/organisation.request.go b/sam/organisation.request.go index 598dfacc2..228cbf9cd 100644 --- a/sam/organisation.request.go +++ b/sam/organisation.request.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `organisation.go`, `organisation.util.go` or `organisation_test.go` to + implement your API calls, helper functions and tests. The file `organisation.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "github.com/go-chi/chi" "net/http" diff --git a/sam/organisation.structs.go b/sam/organisation.structs.go index e873ffcce..fd63627cf 100644 --- a/sam/organisation.structs.go +++ b/sam/organisation.structs.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `organisation.go`, `organisation.util.go` or `organisation_test.go` to + implement your API calls, helper functions and tests. The file `organisation.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "time" ) diff --git a/sam/routes.go b/sam/routes.go index 61fc9236a..574db0695 100644 --- a/sam/routes.go +++ b/sam/routes.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `.go`, `.util.go` or `_test.go` to + implement your API calls, helper functions and tests. The file `.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "github.com/go-chi/chi" ) diff --git a/sam/team.handlers.go b/sam/team.handlers.go index b003de33b..445f0b875 100644 --- a/sam/team.handlers.go +++ b/sam/team.handlers.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `team.go`, `team.util.go` or `team_test.go` to + implement your API calls, helper functions and tests. The file `team.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "net/http" diff --git a/sam/team.interfaces.go b/sam/team.interfaces.go index ad637de08..01423bffb 100644 --- a/sam/team.interfaces.go +++ b/sam/team.interfaces.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `team.go`, `team.util.go` or `team_test.go` to + implement your API calls, helper functions and tests. The file `team.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "net/http" ) diff --git a/sam/team.request.go b/sam/team.request.go index a719fede4..732b0b5c8 100644 --- a/sam/team.request.go +++ b/sam/team.request.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `team.go`, `team.util.go` or `team_test.go` to + implement your API calls, helper functions and tests. The file `team.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "github.com/go-chi/chi" "net/http" diff --git a/sam/team.structs.go b/sam/team.structs.go index 202fbac62..cff87cf7a 100644 --- a/sam/team.structs.go +++ b/sam/team.structs.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `team.go`, `team.util.go` or `team_test.go` to + implement your API calls, helper functions and tests. The file `team.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "time" ) diff --git a/sam/templates/http_handlers.tpl b/sam/templates/http_handlers.tpl index 29fdf4c11..4cb5d854d 100644 --- a/sam/templates/http_handlers.tpl +++ b/sam/templates/http_handlers.tpl @@ -1,5 +1,7 @@ package {package} +{load warning.tpl} + import ( "net/http" diff --git a/sam/templates/http_interfaces.tpl b/sam/templates/http_interfaces.tpl index e9a1b65d7..f23cd14f1 100644 --- a/sam/templates/http_interfaces.tpl +++ b/sam/templates/http_interfaces.tpl @@ -1,5 +1,7 @@ package {package} +{load warning.tpl} + import ( "net/http" ) diff --git a/sam/templates/http_request.tpl b/sam/templates/http_request.tpl index 911832e9c..789625ff5 100644 --- a/sam/templates/http_request.tpl +++ b/sam/templates/http_request.tpl @@ -1,5 +1,7 @@ package {package} +{load warning.tpl} + import ( "net/http" "github.com/go-chi/chi" diff --git a/sam/templates/http_routes.tpl b/sam/templates/http_routes.tpl index 116c30ba7..e39d9ddfd 100644 --- a/sam/templates/http_routes.tpl +++ b/sam/templates/http_routes.tpl @@ -1,5 +1,7 @@ package {package} +{load warning.tpl} + import ( "github.com/go-chi/chi" ) diff --git a/sam/templates/http_structs.tpl b/sam/templates/http_structs.tpl index ba778a1f2..f095b9180 100644 --- a/sam/templates/http_structs.tpl +++ b/sam/templates/http_structs.tpl @@ -1,5 +1,7 @@ package {package} +{load warning.tpl} + {if !empty($imports)} import ( {foreach ($imports as $import)} diff --git a/sam/templates/warning.tpl b/sam/templates/warning.tpl new file mode 100644 index 000000000..87be0f8f1 --- /dev/null +++ b/sam/templates/warning.tpl @@ -0,0 +1,14 @@ +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `{name|strtolower}.go`, `{name|strtolower}.util.go` or `{name|strtolower}_test.go` to + implement your API calls, helper functions and tests. The file `{name|strtolower}.go` + is only generated the first time, and will not be overwritten if it exists. +*/ \ No newline at end of file diff --git a/sam/user.handlers.go b/sam/user.handlers.go index 1ffa1072d..21d262c04 100644 --- a/sam/user.handlers.go +++ b/sam/user.handlers.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `user.go`, `user.util.go` or `user_test.go` to + implement your API calls, helper functions and tests. The file `user.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "net/http" diff --git a/sam/user.interfaces.go b/sam/user.interfaces.go index d6c6a83fd..827911a09 100644 --- a/sam/user.interfaces.go +++ b/sam/user.interfaces.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `user.go`, `user.util.go` or `user_test.go` to + implement your API calls, helper functions and tests. The file `user.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "net/http" ) diff --git a/sam/user.request.go b/sam/user.request.go index 3866e4aa1..f81c62d24 100644 --- a/sam/user.request.go +++ b/sam/user.request.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `user.go`, `user.util.go` or `user_test.go` to + implement your API calls, helper functions and tests. The file `user.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "github.com/go-chi/chi" "net/http" diff --git a/sam/user.structs.go b/sam/user.structs.go index 4b3ba520c..3f8978c4c 100644 --- a/sam/user.structs.go +++ b/sam/user.structs.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `user.go`, `user.util.go` or `user_test.go` to + implement your API calls, helper functions and tests. The file `user.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "time" ) diff --git a/sam/websocket.handlers.go b/sam/websocket.handlers.go index b04a51e2f..283e94cae 100644 --- a/sam/websocket.handlers.go +++ b/sam/websocket.handlers.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `websocket.go`, `websocket.util.go` or `websocket_test.go` to + implement your API calls, helper functions and tests. The file `websocket.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "net/http" diff --git a/sam/websocket.interfaces.go b/sam/websocket.interfaces.go index 82704c85c..ff1d0eed8 100644 --- a/sam/websocket.interfaces.go +++ b/sam/websocket.interfaces.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `websocket.go`, `websocket.util.go` or `websocket_test.go` to + implement your API calls, helper functions and tests. The file `websocket.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "net/http" ) diff --git a/sam/websocket.request.go b/sam/websocket.request.go index 2bcc99af7..ea8dd4737 100644 --- a/sam/websocket.request.go +++ b/sam/websocket.request.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `websocket.go`, `websocket.util.go` or `websocket_test.go` to + implement your API calls, helper functions and tests. The file `websocket.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + import ( "github.com/go-chi/chi" "net/http" diff --git a/sam/websocket.structs.go b/sam/websocket.structs.go index 99f2fe6c2..82657c870 100644 --- a/sam/websocket.structs.go +++ b/sam/websocket.structs.go @@ -1,5 +1,20 @@ package sam +/* + Hello! This file is auto-generated from `docs/src/spec.json`. + + For development: + In order to update the generated files, edit this file under the location, + add your struct fields, imports, API definitions and whatever you want, and: + + 1. run [spec](https://github.com/titpetric/spec) in the same folder, + 2. run `./_gen.php` in this folder. + + You may edit `websocket.go`, `websocket.util.go` or `websocket_test.go` to + implement your API calls, helper functions and tests. The file `websocket.go` + is only generated the first time, and will not be overwritten if it exists. +*/ + type ( // Websocket Websocket struct {