Documentation
¶
Index ¶
- Variables
- func ApplyReports(ctx context.Context, reportsService CustomReportsService) error
- func Bool(b bool) *bool
- func Float32(f float32) *float32
- func Float64(f float64) *float64
- func Int(i int) *int
- func Int64(i int64) *int64
- func Pointer[T any](v T) *T
- func String(s string) *string
- type CustomReports
- func (s *CustomReports) CreateReport(ctx context.Context, request *components.ReportInput, ...) (*operationsReports.CreateReportResponse, error)
- func (s *CustomReports) GetReport(ctx context.Context, reportID string, opts ...operationsReports.Option) (*operationsReports.GetReportResponse, error)
- func (s *CustomReports) GetReports(ctx context.Context, pageSize *int64, pageNumber *int64, ...) (*operationsReports.GetReportsResponse, error)
- func (s *CustomReports) UpdateReport(ctx context.Context, reportID string, report *components.ReportInput, ...) (*operationsReports.UpdateReportResponse, error)
- type CustomReportsService
- type HTTPClient
- type SDK
- type SDKOption
- func WithClient(client HTTPClient) SDKOption
- func WithRetryConfig(retryConfig retry.Config) SDKOption
- func WithSecurity(security components.Security) SDKOption
- func WithSecuritySource(security func(context.Context) (components.Security, error)) SDKOption
- func WithServerIndex(serverIndex int) SDKOption
- func WithServerURL(serverURL string) SDKOption
- func WithTemplatedServerURL(serverURL string, params map[string]string) SDKOption
- func WithTimeout(timeout time.Duration) SDKOption
Constants ¶
This section is empty.
Variables ¶
var ServerList = []string{
"https://global.api.konghq.com",
"https://us.api.konghq.com",
"https://eu.api.konghq.com",
"https://au.api.konghq.com",
}
ServerList contains the list of servers available to the SDK
Functions ¶
func ApplyReports ¶
func ApplyReports( ctx context.Context, reportsService CustomReportsService, ) error
If you change the name of a report, a new one will be created and the old one remains
Types ¶
type CustomReports ¶
type CustomReports struct {
// contains filtered or unexported fields
}
func (*CustomReports) CreateReport ¶
func (s *CustomReports) CreateReport(ctx context.Context, request *components.ReportInput, opts ...operationsReports.Option) (*operationsReports.CreateReportResponse, error)
CreateReport - New Custom Report Creates a new custom report.
func (*CustomReports) GetReport ¶
func (s *CustomReports) GetReport(ctx context.Context, reportID string, opts ...operationsReports.Option) (*operationsReports.GetReportResponse, error)
GetReport - Fetch Custom Report Returns a single report.
func (*CustomReports) GetReports ¶
func (s *CustomReports) GetReports(ctx context.Context, pageSize *int64, pageNumber *int64, opts ...operationsReports.Option, ) (*operationsReports.GetReportsResponse, error)
GetReports - List Custom Reports Returns a list of custom reports.
func (*CustomReports) UpdateReport ¶
func (s *CustomReports) UpdateReport(ctx context.Context, reportID string, report *components.ReportInput, opts ...operationsReports.Option) (*operationsReports.UpdateReportResponse, error)
UpdateReport - Update Report Updates a custom report.
type CustomReportsService ¶
type CustomReportsService interface {
GetReports(ctx context.Context,
pageSize *int64,
pageNumber *int64,
opts ...operations.Option) (*operations.GetReportsResponse, error)
CreateReport(ctx context.Context,
request *components.ReportInput,
opts ...operations.Option) (*operations.CreateReportResponse, error)
}
type HTTPClient ¶
HTTPClient provides an interface for suplying the SDK with a custom HTTP client
type SDK ¶
type SDK struct {
CustomReports *CustomReports
// contains filtered or unexported fields
}
type SDKOption ¶
type SDKOption func(*SDK)
func WithClient ¶
func WithClient(client HTTPClient) SDKOption
WithClient allows the overriding of the default HTTP client used by the SDK
func WithRetryConfig ¶
func WithSecurity ¶
func WithSecurity(security components.Security) SDKOption
WithSecurity configures the SDK to use the provided security details
func WithSecuritySource ¶
WithSecuritySource configures the SDK to invoke the Security Source function on each method call to determine authentication
func WithServerIndex ¶
WithServerIndex allows the overriding of the default server by index
func WithServerURL ¶
WithServerURL allows the overriding of the default server URL
func WithTemplatedServerURL ¶
WithTemplatedServerURL allows the overriding of the default server URL with a templated URL populated with the provided parameters
func WithTimeout ¶
WithTimeout Optional request timeout applied to each operation