Documentation
¶
Overview ¶
Package api is the base for all aep rest functions.
Copyright 2021 Michael Bungenstock ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package api is the base for all aep rest functions.
Copyright 2021 Michael Bungenstock ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package api is the base for all aep rest functions.
Copyright 2021 Michael Bungenstock ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package api is the base for all aep rest functions.
Copyright 2021 Michael Bungenstock ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Package od contains offer decisiong related functions.
Copyright 2021 Michael Bungenstock ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func DADownload(ctx context.Context, p *AuthenticationConfig, fileId, path string) (*http.Response, error)
- func DAGetFile(ctx context.Context, p *AuthenticationConfig, fileId, start, limit string) (*http.Response, error)
- func DAGetFiles(ctx context.Context, p *AuthenticationConfig, batchId, start, limit string) (*http.Response, error)
- func FlowGetConnections(ctx context.Context, auth *AuthenticationConfig, p *FlowGetConnectionsParams) (*http.Response, error)
- func FlowGetNext(ctx context.Context, auth *AuthenticationConfig, url string) (*http.Response, error)
- func HandleStatusCode(res *http.Response, err error) (*http.Response, error)
- func NewJSONFilterIterator(filter []string, res *http.Response, err error) (*util.JSONFilterIterator, error)
- func NewJSONIterator(res *http.Response, err error) (*util.JSONIterator, error)
- func NewQuery(res *http.Response, err error) (*util.Query, error)
- func UPSGetEntities(ctx context.Context, auth *AuthenticationConfig, p *UPSEntitiesParams) (*http.Response, error)
- type AuthenticationConfig
- func (o *AuthenticationConfig) DeleteRequest(ctx context.Context, url string, a ...interface{}) (interface{}, error)
- func (o *AuthenticationConfig) FullRequest(ctx context.Context, verb string, header map[string]string, body io.Reader, ...) (interface{}, error)
- func (o *AuthenticationConfig) FullRequestRaw(ctx context.Context, verb string, header map[string]string, body io.Reader, ...) (*http.Response, error)
- func (o *AuthenticationConfig) GetRequest(ctx context.Context, url string, a ...interface{}) (interface{}, error)
- func (o *AuthenticationConfig) GetRequestRaw(ctx context.Context, url string, a ...interface{}) (*http.Response, error)
- func (o *AuthenticationConfig) GetToken() (*BearerToken, error)
- func (o *AuthenticationConfig) GetTokenRaw() (*http.Response, error)
- func (o *AuthenticationConfig) NoDryRun() *AuthenticationConfig
- func (o *AuthenticationConfig) PatchRequest(ctx context.Context, header map[string]string, data []byte, url string, ...) (interface{}, error)
- func (o *AuthenticationConfig) PostJSONRequest(ctx context.Context, obj interface{}, url string, a ...interface{}) (interface{}, error)
- func (o *AuthenticationConfig) PostJSONRequestRaw(ctx context.Context, obj interface{}, url string, a ...interface{}) (*http.Response, error)
- func (o *AuthenticationConfig) PostRequest(ctx context.Context, header map[string]string, data []byte, url string, ...) (interface{}, error)
- func (o *AuthenticationConfig) Request(ctx context.Context, verb, url string, a ...interface{}) (interface{}, error)
- func (o *AuthenticationConfig) UpdateHeader(req *http.Request) error
- type BearerToken
- type CMD
- type FlowGetConnectionsParams
- type FlowPaged
- type Paged
- type UPSEntitiesParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DADownload ¶ added in v0.2.0
func DAGetFile ¶ added in v0.2.0
func DAGetFile(ctx context.Context, p *AuthenticationConfig, fileId, start, limit string) (*http.Response, error)
DAGetFile returns a list of files for the passed fileId
func DAGetFiles ¶ added in v0.2.0
func DAGetFiles(ctx context.Context, p *AuthenticationConfig, batchId, start, limit string) (*http.Response, error)
DAGetFiles returns a list of files for the passed batchId
func FlowGetConnections ¶ added in v0.2.0
func FlowGetConnections(ctx context.Context, auth *AuthenticationConfig, p *FlowGetConnectionsParams) (*http.Response, error)
DAGetFile returns a list of files for the passed fileId
func FlowGetNext ¶ added in v0.2.0
func HandleStatusCode ¶ added in v0.2.0
func NewJSONFilterIterator ¶ added in v0.2.0
func NewJSONIterator ¶ added in v0.2.0
func UPSGetEntities ¶ added in v0.2.0
func UPSGetEntities(ctx context.Context, auth *AuthenticationConfig, p *UPSEntitiesParams) (*http.Response, error)
Types ¶
type AuthenticationConfig ¶
type AuthenticationConfig struct {
Cache bool
DryRun bool
Server string
Organization string
TechnicalAccount string
Audience string
ClientID string
ClientSecret string
Key string
Sandbox string
LoadToken func() (*BearerToken, error)
SaveToken func(token *BearerToken) error
}
AuthenticationConfig contains the configuraion for getting the bearer token
func (*AuthenticationConfig) DeleteRequest ¶
func (o *AuthenticationConfig) DeleteRequest(ctx context.Context, url string, a ...interface{}) (interface{}, error)
DeleteRequest sends a http delete request to the passed url
func (*AuthenticationConfig) FullRequest ¶
func (o *AuthenticationConfig) FullRequest(ctx context.Context, verb string, header map[string]string, body io.Reader, url string, a ...interface{}) (interface{}, error)
FullRequest sends a http request with the passed verb to the passed url
func (*AuthenticationConfig) FullRequestRaw ¶ added in v0.2.0
func (o *AuthenticationConfig) FullRequestRaw(ctx context.Context, verb string, header map[string]string, body io.Reader, url string, a ...interface{}) (*http.Response, error)
FullRequestRaw sends a http request with the passed verb to the passed url
func (*AuthenticationConfig) GetRequest ¶
func (o *AuthenticationConfig) GetRequest(ctx context.Context, url string, a ...interface{}) (interface{}, error)
GetRequest sends a http get request to the passed url
func (*AuthenticationConfig) GetRequestRaw ¶ added in v0.2.0
func (o *AuthenticationConfig) GetRequestRaw(ctx context.Context, url string, a ...interface{}) (*http.Response, error)
GetRequestRaw sends a http get request to the passed url
func (*AuthenticationConfig) GetToken ¶
func (o *AuthenticationConfig) GetToken() (*BearerToken, error)
GetToken uses JWT to get a bearer token
func (*AuthenticationConfig) GetTokenRaw ¶ added in v0.2.0
func (o *AuthenticationConfig) GetTokenRaw() (*http.Response, error)
GetTokenRaw uses JWT to get a bearer token
func (*AuthenticationConfig) NoDryRun ¶ added in v0.2.0
func (o *AuthenticationConfig) NoDryRun() *AuthenticationConfig
func (*AuthenticationConfig) PatchRequest ¶
func (o *AuthenticationConfig) PatchRequest(ctx context.Context, header map[string]string, data []byte, url string, a ...interface{}) (interface{}, error)
PatchRequest sends a http patch request to the passed url
func (*AuthenticationConfig) PostJSONRequest ¶
func (o *AuthenticationConfig) PostJSONRequest(ctx context.Context, obj interface{}, url string, a ...interface{}) (interface{}, error)
PostJSONRequest serializes the passed object to JSON and sends a http post request to the passed url
func (*AuthenticationConfig) PostJSONRequestRaw ¶ added in v0.2.0
func (o *AuthenticationConfig) PostJSONRequestRaw(ctx context.Context, obj interface{}, url string, a ...interface{}) (*http.Response, error)
PostJSONRequestRaw serializes the passed object to JSON and sends a http post request to the passed url
func (*AuthenticationConfig) PostRequest ¶
func (o *AuthenticationConfig) PostRequest(ctx context.Context, header map[string]string, data []byte, url string, a ...interface{}) (interface{}, error)
PostRequest sends a http post request to the passed url
func (*AuthenticationConfig) Request ¶
func (o *AuthenticationConfig) Request(ctx context.Context, verb, url string, a ...interface{}) (interface{}, error)
Request sends a http request with the passed verb to the passed url
func (*AuthenticationConfig) UpdateHeader ¶
func (o *AuthenticationConfig) UpdateHeader(req *http.Request) error
UpdateHeader adds the authentication headers to the passed http request
type BearerToken ¶
BearerToken contains a token and an expiration date
func (*BearerToken) LocalTime ¶
func (t *BearerToken) LocalTime() string
LocalTime returns the expiry date as string in the local time zone
type FlowGetConnectionsParams ¶ added in v0.2.0
type FlowPaged ¶ added in v0.2.0
type FlowPaged struct {
// contains filtered or unexported fields
}
func NewFlowPaged ¶ added in v0.2.0
func NewFlowPaged(ctx context.Context, auth *AuthenticationConfig, p *FlowGetConnectionsParams) *FlowPaged
type Paged ¶ added in v0.2.0
type Paged interface {
First() (util.JSONResponse, error)
Execute([]string, func(util.JSONResponse) error) error
}
Directories
¶
| Path | Synopsis |
|---|---|
|
Package acl consists of access control list functions.
|
Package acl consists of access control list functions. |
|
Package catalog consists of catalog functions.
|
Package catalog consists of catalog functions. |
|
Package od contains offer decisiong related functions.
|
Package od contains offer decisiong related functions. |
|
Package sandbox contains all sandbox related functions.
|
Package sandbox contains all sandbox related functions. |
|
Package token contains all token related functions.
|
Package token contains all token related functions. |
|
Package token contains all token related functions.
|
Package token contains all token related functions. |