Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/bndr/gopencils
/ functions
Functions
31 in github.com/bndr/gopencils
⨍
Functions
31
◇
Types & classes
6
↓ 22 callers
Method
Res
Creates a new Resource.
resource.go:43
↓ 18 callers
Method
Get
Performs a GET request on given Resource Accepts map[string]string as parameter, will be used as querystring.
resource.go:105
↓ 18 callers
Method
Id
Same as Res() Method, but returns a Resource with url resource/:id
resource.go:68
↓ 11 callers
Function
Api
Create a new API Instance and returns a Resource Accepts URL as parameter, and either a Basic Auth or a OAuth2 Client.
api.go:42
↓ 8 callers
Function
readJson
(path string)
resource_test.go:233
↓ 7 callers
Method
do
Main method, opens the connection, sets basic auth, applies headers, parses response json.
resource.go:185
↓ 5 callers
Method
SetQuery
Sets QueryValues for current Resource
resource.go:95
↓ 3 callers
Method
Post
Performs a POST request on given Resource. Accepts interface{} as parameter, will be used as payload.
resource.go:141
↓ 3 callers
Method
SetPayload
Sets Payload for current Resource
resource.go:238
↓ 2 callers
Method
SetHeader
Sets Headers
resource.go:246
↓ 1 callers
Method
Delete
Performs a Delete request on given Resource. Accepts map[string]string as parameter, will be used as querystring.
resource.go:150
↓ 1 callers
Method
Put
Performs a PUT request on given Resource. Accepts interface{} as parameter, will be used as payload.
resource.go:132
Method
Head
Performs a HEAD request on given Resource Accepts map[string]string as parameter, will be used as querystring.
resource.go:119
Method
Options
Performs a Delete request on given Resource. Accepts map[string]string as parameter, will be used as querystring.
resource.go:163
Method
Patch
Performs a PATCH request on given Resource. Accepts interface{} as parameter, will be used as payload.
resource.go:176
Method
SetClient
Overwrites the client that will be used for requests. For example if you want to use your own client with OAuth2
resource.go:252
Function
TestCanCreateResource
(t *testing.T)
resource_test.go:109
Function
TestCanDeleteResource
(t *testing.T)
resource_test.go:143
Function
TestCanGetResource
(t *testing.T)
resource_test.go:72
Function
TestCanPutResource
(t *testing.T)
resource_test.go:126
Function
TestCanUseAuthForApi
(t *testing.T)
resource_test.go:64
Function
TestCanUsePathInResourceUrl
(t *testing.T)
resource_test.go:47
Function
TestDoNotDecodeBodyOnErr
(t *testing.T)
resource_test.go:196
Function
TestPathSuffix
(t *testing.T)
resource_test.go:157
Function
TestPathSuffixWithQueryParam
(t *testing.T)
resource_test.go:171
Function
TestResouceUrl
(t *testing.T)
resource_test.go:37
Function
TestResourceId
(t *testing.T)
resource_test.go:186
Function
handler
The user will be redirected back to this handler, that takes the "code" query parameter and Exchanges it for an access token.
examples/example_oauth.go:37
Function
init
()
resource_test.go:19
Function
landing
A landing page redirects to the OAuth provider to get the auth code.
examples/example_oauth.go:31
Function
main
()
examples/example_basic_auth.go:7