Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/brunoga/go-webservice-sample
/ functions
Functions
18 in github.com/brunoga/go-webservice-sample
⨍
Functions
18
◇
Types & classes
3
↓ 1 callers
Method
AddEntry
AddEntry adds a new GuestBookEntry with the provided data.
guestbook/guestbook.go:47
↓ 1 callers
Method
GetAllEntries
GetAllEntries returns all non-nil entries in the Guest Book.
guestbook/guestbook.go:104
↓ 1 callers
Method
GetEntry
GetEntry returns the entry identified by the given id or an error if it can not find it.
guestbook/guestbook.go:92
↓ 1 callers
Method
GetPath
GetPath returns the path to be associated with the service.
webservice/webservice.go:27
↓ 1 callers
Method
RemoveAllEntries
RemoveAllEntries removes all entries from the Guest Book.
guestbook/guestbook.go:120
↓ 1 callers
Method
RemoveEntry
RemoveEntry removes the entry with the given id. Return nil in case of success or a specific error in case of failure.
guestbook/guestbook.go:72
↓ 1 callers
Function
doRequest
doRequest executes an HTTP request to the given requestUrl using the given requestMethod and requestData.
client.go:44
Method
GetPath
GetPath implements webservice.GetPath.
guestbook/guestbook-webservice.go:29
Function
NewGuestBook
NewGuestBook returns a new empty GuestBook instance.
guestbook/guestbook.go:39
Function
RegisterWebService
RegisterWebService adds martini routes to the relevant webservice methods based on the path returned by GetPath. Each method is registered once for th
webservice/webservice.go:51
Method
WebDelete
WebDelete implements webservice.WebDelete.
guestbook/guestbook-webservice.go:35
Method
WebDelete
WebDelete wraps a DELETE method request. The given params might be empty, in case it was applied to the collection itself (i.e. all entries instead of
webservice/webservice.go:33
Method
WebGet
WebGet implements webservice.WebGet.
guestbook/guestbook-webservice.go:61
Method
WebGet
WebGet is Just as above, but for the GET method. If params is empty, it returns all the entries in the collection. Otherwise it returns the entry with
webservice/webservice.go:38
Method
WebPost
WebPost implements webservice.WebPost.
guestbook/guestbook-webservice.go:100
Method
WebPost
WebPost wraps the POST method. Again an empty params means that the request should be applied to the collection. A non-empty param will have an "id" k
webservice/webservice.go:45
Function
main
()
server.go:23
Function
main
()
client.go:102