wg-portal/internal/server
commonism 19c58fb5af
Fixes & API unit testing (#58)
* api - add OperationID

  helps when using pyswagger and is visible via
  http://localhost:8123/swagger/index.html?displayOperationId=true
  gin-swagger can not set displayOperationId yet

* api - match paramters to their property equivalents

  pascalcase & sometimes replacing the name (e.g. device -> DeviceName)

* api - use ShouldBindJSON instead of BindJSON

 BindJSON sets the content-type text/plain

* api - we renamed, we regenerated

* device - allow - in DeviceName wg-example0.conf etc

* api - more pascalcase & argument renames

* api - marshal DeletedAt as string

  gorm.DeletedAt is of type sql.NullTime
  NullTime declares Time & Valid as properties
  DeletedAt marshals as time.Time
  swaggertype allows only basic types
  -> string

* Peer - export UID/DeviceType in json
 UID/DeviceType is required, skipping in json, skips it in marshalling,
 next unmarshalling fails

* assets - name forms for use with mechanize

* api - match error message

* add python3/pyswagger based unittesting
 - initializes a clean install by configuration via web service
 - tests the rest api

* tests - test address exhaustion

* tests - test network expansion

Co-authored-by: Markus Koetter <koetter@cispa.de>
2021-09-29 18:41:13 +02:00
..
docs Fixes & API unit testing (#58) 2021-09-29 18:41:13 +02:00
api.go Fixes & API unit testing (#58) 2021-09-29 18:41:13 +02:00
auth.go cleanup 2021-02-26 22:17:04 +01:00
configuration.go Added some more customization options (#43) 2021-09-12 10:17:13 +02:00
handlers_auth.go use LDAP filter strings 2021-05-10 10:31:56 +02:00
handlers_common.go validate user in session (#32) 2021-07-30 13:56:21 +02:00
handlers_interface.go improve client mode, todo: migrate peers (new db schema) 2021-04-05 20:00:11 +02:00
handlers_peer.go sendall button for mails, update icons for peer creation buttons (#35) 2021-07-30 13:43:39 +02:00
handlers_user.go RESTful API for WireGuard Portal (#11) 2021-04-26 22:00:50 +02:00
ldapsync.go Fix typo 2021-07-20 11:02:17 +02:00
routes.go validate user in session (#32) 2021-07-30 13:56:21 +02:00
server_helper.go fix auto-creation of peers on login (#30) 2021-06-30 17:03:16 +02:00
server.go Added some more customization options (#43) 2021-09-12 10:17:13 +02:00
version.go support AllowIPs for peers in server config (#24) 2021-06-18 14:13:44 +02:00