Skip to content

Commit

Permalink
Merge pull request #32 from themue/maintenance/31/status-code
Browse files Browse the repository at this point in the history
Added status codes and some doc renamings
  • Loading branch information
Frank Mueller committed Nov 10, 2017
2 parents bcd39d5 + 3fcc4e2 commit 22ece46
Show file tree
Hide file tree
Showing 41 changed files with 75 additions and 64 deletions.
17 changes: 11 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,27 @@
# Tideland Go REST Server Library
# Tideland GoREST

## 2017-10-25
## Version 2.15.5 (2017-11-09)

- Added needed status codes
- Renamings in docs and comments due to new project name

## Version 2.15.4 (2017-10-25)

- Function `jwt.AddTokenToRequest()` is deprecated, now it
is `AddToRequest()`; sadly forgot backward compatability,
so now are both available but first with an according
comment

## 2017-09-10
## Version 2.15.3 (2017-09-10)

- Fixed return code in case of not implemented HTTP methods
to `405` (method not allowed)

## 2017-06-19
## Version 2.15.2 (2017-06-19)

- Reduced job handling complexity

## 2017-05-15
## Version 2.15.1 (2017-05-15)

- Changed `Job.Path()` to return a `Path` instance
- This instance provides access to the different parts
Expand All @@ -26,7 +31,7 @@
`ResourceID()`) while the method `ResourceID()` of path
returns only the third part of the path

## 2017-04-26
## Version 2.15.0 (2017-04-26)

- Added access to URL path parts via `Job.Path()`
- Added interfaces for handler methods directly mapping
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Tideland Go REST Server Library
# Tideland GoREST

## Description

The *Tideland Go REST Server Library* helps developing RESTful server
systems. It provides a convenient mapping of URL to handlers and methods
specific to the called HTTP method. Additionally there are helpers for
marshalling and unmarshalling.
*Tideland GoREST* helps developing RESTful server systems. It
provides a convenient mapping of URL to handlers and methods
specific to the called HTTP method. Additionally there are helpers
for marshalling and unmarshalling.

The library earlier has been known as `web` package of the
[Tideland Go Library](https://github.com/tideland/golib).
Expand All @@ -20,7 +20,7 @@ I hope you like it. ;)

## Version

Version 2.15.4
Version 2.15.5

## Packages

Expand Down
2 changes: 1 addition & 1 deletion handlers/audit.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - Handlers - Audit Handler
// Tideland GoREST - Handlers - Audit Handler
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
6 changes: 3 additions & 3 deletions handlers/doc.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Tideland Go REST Server Library - Handlers
// Tideland GoREST - Handlers
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
// All rights reserved. Use of this source code is governed
// by the new BSD license.

// Package handlers of the Tideland Go REST Server Library implements
// some initial resource handlers to integrate into own solutions.
// Package handlers of Tideland GoREST implements some initial
// resource handlers to integrate into own solutions.
package handlers

// EOF
2 changes: 1 addition & 1 deletion handlers/errors.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - Handlers - Errors
// Tideland GoREST - Handlers - Errors
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion handlers/fileserve.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - Handlers - File Serve
// Tideland GoREST - Handlers - File Serve
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion handlers/fileupload.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - Handlers - File Upload
// Tideland GoREST - Handlers - File Upload
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion handlers/handlers_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - Handlers - Unit Tests
// Tideland GoREST - Handlers - Unit Tests
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion handlers/jwtauth.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - Handlers - JWT Authorization
// Tideland GoREST - Handlers - JWT Authorization
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion handlers/wrapper.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - Handlers - Wrapper
// Tideland GoREST - Handlers - Wrapper
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion jwt/algorithm.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - JSON Web Token - Algorithm
// Tideland GoREST - JSON Web Token - Algorithm
//
// Copyright (C) 2016-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion jwt/cache.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - JSON Web Token - Cache
// Tideland GoREST - JSON Web Token - Cache
//
// Copyright (C) 2016-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion jwt/cache_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - JSON Web Token - Unit Tests
// Tideland GoREST - JSON Web Token - Unit Tests
//
// Copyright (C) 2016-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion jwt/claims.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - JSON Web Token - Claims
// Tideland GoREST - JSON Web Token - Claims
//
// Copyright (C) 2016-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion jwt/claims_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - JSON Web Token - Unit Tests
// Tideland GoREST - JSON Web Token - Unit Tests
//
// Copyright (C) 2016-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
4 changes: 2 additions & 2 deletions jwt/doc.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Tideland Go REST Server Library - JSON Web Token
// Tideland GoREST - JSON Web Token
//
// Copyright (C) 2016-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
// All rights reserved. Use of this source code is governed
// by the new BSD license.

// Package jwt of the Tideland Go REST Server Library provides the generation,
// Package jwt of Tideland GoREST provides the generation,
// verification, and analyzing of JSON Web Tokens.
package jwt

Expand Down
2 changes: 1 addition & 1 deletion jwt/errors.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - JSON Web Token - Errors
// Tideland GoREST - JSON Web Token - Errors
//
// Copyright (C) 2016-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion jwt/header.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - JSON Web Token - Header
// Tideland GoREST - JSON Web Token - Header
//
// Copyright (C) 2016-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion jwt/header_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - JSON Web Token - Unit Tests
// Tideland GoREST - JSON Web Token - Unit Tests
//
// Copyright (C) 2016-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion jwt/jwt.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - JSON Web Token
// Tideland GoREST - JSON Web Token
//
// Copyright (C) 2016-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion jwt/jwt_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - JSON Web Token - Unit Tests
// Tideland GoREST - JSON Web Token - Unit Tests
//
// Copyright (C) 2016 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion jwt/key.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - JSON Web Token - Keys
// Tideland GoREST - JSON Web Token - Keys
//
// Copyright (C) 2016-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
7 changes: 3 additions & 4 deletions request/doc.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
// Tideland Go REST Server Library - Request
// Tideland GoREST - Request
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
// All rights reserved. Use of this source code is governed
// by the new BSD license.

// Package request of the Tideland Go REST Server Library provides
// a simple way to handle cross-server requests in the Tideland
// REST ecosystem.
// Package request of Tideland GoREST provides a simple way to
// handle cross-server requests in the Tideland REST ecosystem.
package request

//--------------------
Expand Down
2 changes: 1 addition & 1 deletion request/errors.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - Request - Errors
// Tideland GoREST - Request - Errors
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion request/request.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - Request
// Tideland GoREST - Request
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion request/request_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - Request - Unit Tests
// Tideland GoREST - Request - Unit Tests
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion rest/context.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - REST - Context
// Tideland GoREST - REST - Context
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
6 changes: 3 additions & 3 deletions rest/doc.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Tideland Go REST Server Library - REST
// Tideland GoREST - REST
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
// All rights reserved. Use of this source code is governed
// by the new BSD license.

// Package rest of the Tideland Go REST Server Library provides types for
// the implementation of servers with a RESTful API. The business has to
// Package rest of Tideland GoREST provides types for the
// implementation of servers with a RESTful API. The business has to
// be implemented in types fullfilling the ResourceHandler interface.
// This basic interface only allows the initialization of the handler.
// More interesting are the other interfaces like GetResourceHandler
Expand Down
2 changes: 1 addition & 1 deletion rest/environment.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - REST - Environment
// Tideland GoREST - REST - Environment
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion rest/errors.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - REST - Errors
// Tideland GoREST - REST - Errors
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
9 changes: 8 additions & 1 deletion rest/formatter.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - REST - Formatter
// Tideland GoREST - REST - Formatter
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down Expand Up @@ -40,6 +40,13 @@ const (
StatusUnauthorized = http.StatusUnauthorized
StatusForbidden = http.StatusForbidden
StatusNotFound = http.StatusNotFound
StatusMethodNotAllowed = http.StatusMethodNotAllowed
StatusNotAcceptable = http.StatusNotAcceptable
StatusGone = http.StatusGone
StatusPreconditionFailed = http.StatusPreconditionFailed
StatusUnprocessableEntity = http.StatusUnprocessableEntity
StatusLocked = http.StatusLocked
StatusTooManyRequests = http.StatusTooManyRequests
StatusConflict = http.StatusConflict
StatusInternalServerError = http.StatusInternalServerError
)
Expand Down
2 changes: 1 addition & 1 deletion rest/handler.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - REST - Handlers
// Tideland GoREST - REST - Handlers
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion rest/job.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - REST - Job
// Tideland GoREST - REST - Job
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion rest/mapping.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - REST - Mapping
// Tideland GoREST - REST - Mapping
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion rest/multiplexer.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - REST - Multiplexer
// Tideland GoREST - REST - Multiplexer
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion rest/path.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - REST - Path
// Tideland GoREST - REST - Path
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion rest/rest_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - REST - Unit Tests
// Tideland GoREST - REST - Unit Tests
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion rest/templates.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - REST - templatesCache
// Tideland GoREST - REST - Templates
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
2 changes: 1 addition & 1 deletion rest/tools.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - REST - Tools
// Tideland GoREST - REST - Tools
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down
12 changes: 6 additions & 6 deletions restaudit/doc.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Tideland Go REST Server Library - REST Audit
// Tideland GoREST - REST Audit
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
// All rights reserved. Use of this source code is governed
// by the new BSD license.

// Package restaudit of the Tideland Go REST Server Library is a little
// helper package for the unit testing of the rest package and the
// resource handlers. Requests can easily be created, marshalling data
// based on the content-type is done automatically. Response also
// provides assert methods for the tests.
// Package restaudit of Tideland GoREST is a little helper package
// for the unit testing of the rest package and the resource handlers.
// Requests can easily be created, marshalling data based on the
// content-type is done automatically. Response also provides assert
// methods for the tests.
//
// So first step is to create a test server and register the handler(s)
// to test. Could best be done with a little helper function, depending
Expand Down
2 changes: 1 addition & 1 deletion restaudit/restaudit.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Tideland Go REST Server Library - REST Audit
// Tideland GoREST - REST Audit
//
// Copyright (C) 2009-2017 Frank Mueller / Tideland / Oldenburg / Germany
//
Expand Down

0 comments on commit 22ece46

Please sign in to comment.