MCPcopy Create free account

hub / github.com/bndr/gopencils / functions

Functions31 in github.com/bndr/gopencils

↓ 22 callersMethodRes
Creates a new Resource.
resource.go:43
↓ 18 callersMethodGet
Performs a GET request on given Resource Accepts map[string]string as parameter, will be used as querystring.
resource.go:105
↓ 18 callersMethodId
Same as Res() Method, but returns a Resource with url resource/:id
resource.go:68
↓ 11 callersFunctionApi
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 callersFunctionreadJson
(path string)
resource_test.go:233
↓ 7 callersMethoddo
Main method, opens the connection, sets basic auth, applies headers, parses response json.
resource.go:185
↓ 5 callersMethodSetQuery
Sets QueryValues for current Resource
resource.go:95
↓ 3 callersMethodPost
Performs a POST request on given Resource. Accepts interface{} as parameter, will be used as payload.
resource.go:141
↓ 3 callersMethodSetPayload
Sets Payload for current Resource
resource.go:238
↓ 2 callersMethodSetHeader
Sets Headers
resource.go:246
↓ 1 callersMethodDelete
Performs a Delete request on given Resource. Accepts map[string]string as parameter, will be used as querystring.
resource.go:150
↓ 1 callersMethodPut
Performs a PUT request on given Resource. Accepts interface{} as parameter, will be used as payload.
resource.go:132
MethodHead
Performs a HEAD request on given Resource Accepts map[string]string as parameter, will be used as querystring.
resource.go:119
MethodOptions
Performs a Delete request on given Resource. Accepts map[string]string as parameter, will be used as querystring.
resource.go:163
MethodPatch
Performs a PATCH request on given Resource. Accepts interface{} as parameter, will be used as payload.
resource.go:176
MethodSetClient
Overwrites the client that will be used for requests. For example if you want to use your own client with OAuth2
resource.go:252
FunctionTestCanCreateResource
(t *testing.T)
resource_test.go:109
FunctionTestCanDeleteResource
(t *testing.T)
resource_test.go:143
FunctionTestCanGetResource
(t *testing.T)
resource_test.go:72
FunctionTestCanPutResource
(t *testing.T)
resource_test.go:126
FunctionTestCanUseAuthForApi
(t *testing.T)
resource_test.go:64
FunctionTestCanUsePathInResourceUrl
(t *testing.T)
resource_test.go:47
FunctionTestDoNotDecodeBodyOnErr
(t *testing.T)
resource_test.go:196
FunctionTestPathSuffix
(t *testing.T)
resource_test.go:157
FunctionTestPathSuffixWithQueryParam
(t *testing.T)
resource_test.go:171
FunctionTestResouceUrl
(t *testing.T)
resource_test.go:37
FunctionTestResourceId
(t *testing.T)
resource_test.go:186
Functionhandler
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
Functioninit
()
resource_test.go:19
Functionlanding
A landing page redirects to the OAuth provider to get the auth code.
examples/example_oauth.go:31
Functionmain
()
examples/example_basic_auth.go:7