Documentation ¶
Index ¶
- func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error
- func Logger(inner http.Handler, name string) http.Handler
- func NewRouter(routers ...Router) *mux.Router
- func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error)
- func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error)
- type CloudExportAdminServiceApiController
- func (c *CloudExportAdminServiceApiController) ExportCreate(w http.ResponseWriter, r *http.Request)
- func (c *CloudExportAdminServiceApiController) ExportDelete(w http.ResponseWriter, r *http.Request)
- func (c *CloudExportAdminServiceApiController) ExportGet(w http.ResponseWriter, r *http.Request)
- func (c *CloudExportAdminServiceApiController) ExportList(w http.ResponseWriter, r *http.Request)
- func (c *CloudExportAdminServiceApiController) ExportPatch(w http.ResponseWriter, r *http.Request)
- func (c *CloudExportAdminServiceApiController) ExportUpdate(w http.ResponseWriter, r *http.Request)
- func (c *CloudExportAdminServiceApiController) Routes() Routes
- type CloudExportAdminServiceApiRouter
- type CloudExportAdminServiceApiService
- func (s *CloudExportAdminServiceApiService) ExportCreate(_ context.Context, body V202101beta1CreateCloudExportRequest) (ImplResponse, error)
- func (s *CloudExportAdminServiceApiService) ExportDelete(_ context.Context, exportId string) (ImplResponse, error)
- func (s *CloudExportAdminServiceApiService) ExportGet(_ context.Context, exportId string) (ImplResponse, error)
- func (s *CloudExportAdminServiceApiService) ExportList(_ context.Context) (ImplResponse, error)
- func (s *CloudExportAdminServiceApiService) ExportPatch(_ context.Context, exportId string, body V202101beta1PatchCloudExportRequest) (ImplResponse, error)
- func (s *CloudExportAdminServiceApiService) ExportUpdate(_ context.Context, exportId string, body V202101beta1UpdateCloudExportRequest) (ImplResponse, error)
- type CloudExportAdminServiceApiServicer
- type CloudExportRepo
- func (r *CloudExportRepo) Create(e V202101beta1CloudExport) (*V202101beta1CloudExport, error)
- func (r *CloudExportRepo) Delete(id string) error
- func (r *CloudExportRepo) Get(id string) *V202101beta1CloudExport
- func (r *CloudExportRepo) List() []V202101beta1CloudExport
- func (r *CloudExportRepo) Update(e V202101beta1CloudExport) (*V202101beta1CloudExport, error)
- type CloudExportv202101beta1Status
- type GooglerpcStatus
- type ImplResponse
- type ProtobufAny
- type Route
- type Router
- type Routes
- type V202101beta1AwsProperties
- type V202101beta1AzureProperties
- type V202101beta1BgpProperties
- type V202101beta1CloudExport
- type V202101beta1CloudExportType
- type V202101beta1CreateCloudExportRequest
- type V202101beta1CreateCloudExportResponse
- type V202101beta1GceProperties
- type V202101beta1GetCloudExportResponse
- type V202101beta1IbmProperties
- type V202101beta1ListCloudExportResponse
- type V202101beta1PatchCloudExportRequest
- type V202101beta1PatchCloudExportResponse
- type V202101beta1UpdateCloudExportRequest
- type V202101beta1UpdateCloudExportResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EncodeJSONResponse ¶
func EncodeJSONResponse(i interface{}, status *int, w http.ResponseWriter) error
EncodeJSONResponse uses the json encoder to write an interface to the http response with an optional status code
func ReadFormFileToTempFile ¶
ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file
Types ¶
type CloudExportAdminServiceApiController ¶
type CloudExportAdminServiceApiController struct {
// contains filtered or unexported fields
}
A CloudExportAdminServiceApiController binds http requests to an api service and writes the service results to the http response
func (*CloudExportAdminServiceApiController) ExportCreate ¶
func (c *CloudExportAdminServiceApiController) ExportCreate(w http.ResponseWriter, r *http.Request)
ExportCreate - Create Cloud Export.
func (*CloudExportAdminServiceApiController) ExportDelete ¶
func (c *CloudExportAdminServiceApiController) ExportDelete(w http.ResponseWriter, r *http.Request)
ExportDelete - Delete an export.
func (*CloudExportAdminServiceApiController) ExportGet ¶
func (c *CloudExportAdminServiceApiController) ExportGet(w http.ResponseWriter, r *http.Request)
ExportGet - Get information about an export.
func (*CloudExportAdminServiceApiController) ExportList ¶
func (c *CloudExportAdminServiceApiController) ExportList(w http.ResponseWriter, r *http.Request)
ExportList - List Cloud Export.
func (*CloudExportAdminServiceApiController) ExportPatch ¶
func (c *CloudExportAdminServiceApiController) ExportPatch(w http.ResponseWriter, r *http.Request)
ExportPatch - Patch an export.
func (*CloudExportAdminServiceApiController) ExportUpdate ¶
func (c *CloudExportAdminServiceApiController) ExportUpdate(w http.ResponseWriter, r *http.Request)
ExportUpdate - Update an export.
func (*CloudExportAdminServiceApiController) Routes ¶
func (c *CloudExportAdminServiceApiController) Routes() Routes
Routes returns all of the api route for the CloudExportAdminServiceApiController
type CloudExportAdminServiceApiRouter ¶
type CloudExportAdminServiceApiRouter interface { ExportCreate(http.ResponseWriter, *http.Request) ExportDelete(http.ResponseWriter, *http.Request) ExportGet(http.ResponseWriter, *http.Request) ExportList(http.ResponseWriter, *http.Request) ExportPatch(http.ResponseWriter, *http.Request) ExportUpdate(http.ResponseWriter, *http.Request) }
CloudExportAdminServiceApiRouter defines the required methods for binding the api requests to a responses for the CloudExportAdminServiceApi The CloudExportAdminServiceApiRouter implementation should parse necessary information from the http request, pass the data to a CloudExportAdminServiceApiServicer to perform the required actions, then write the service results to the http response.
type CloudExportAdminServiceApiService ¶
type CloudExportAdminServiceApiService struct {
// contains filtered or unexported fields
}
CloudExportAdminServiceApiService is a service that implements the logic for the CloudExportAdminServiceApiServicer This service should implement the business logic for every endpoint for the CloudExportAdminServiceApi API. Include any external packages or services that will be required by this service.
func (*CloudExportAdminServiceApiService) ExportCreate ¶
func (s *CloudExportAdminServiceApiService) ExportCreate(_ context.Context, body V202101beta1CreateCloudExportRequest) (ImplResponse, error)
ExportCreate - Create Cloud Export.
func (*CloudExportAdminServiceApiService) ExportDelete ¶
func (s *CloudExportAdminServiceApiService) ExportDelete(_ context.Context, exportId string) (ImplResponse, error)
ExportDelete - Delete an export.
func (*CloudExportAdminServiceApiService) ExportGet ¶
func (s *CloudExportAdminServiceApiService) ExportGet(_ context.Context, exportId string) (ImplResponse, error)
ExportGet - Get information about an export.
func (*CloudExportAdminServiceApiService) ExportList ¶
func (s *CloudExportAdminServiceApiService) ExportList(_ context.Context) (ImplResponse, error)
ExportList - List Cloud Export.
func (*CloudExportAdminServiceApiService) ExportPatch ¶
func (s *CloudExportAdminServiceApiService) ExportPatch(_ context.Context, exportId string, body V202101beta1PatchCloudExportRequest) (ImplResponse, error)
ExportPatch - Patch an export.
func (*CloudExportAdminServiceApiService) ExportUpdate ¶
func (s *CloudExportAdminServiceApiService) ExportUpdate(_ context.Context, exportId string, body V202101beta1UpdateCloudExportRequest) (ImplResponse, error)
ExportUpdate - Update an export.
type CloudExportAdminServiceApiServicer ¶
type CloudExportAdminServiceApiServicer interface { ExportCreate(context.Context, V202101beta1CreateCloudExportRequest) (ImplResponse, error) ExportDelete(context.Context, string) (ImplResponse, error) ExportGet(context.Context, string) (ImplResponse, error) ExportList(context.Context) (ImplResponse, error) ExportPatch(context.Context, string, V202101beta1PatchCloudExportRequest) (ImplResponse, error) ExportUpdate(context.Context, string, V202101beta1UpdateCloudExportRequest) (ImplResponse, error) }
CloudExportAdminServiceApiServicer defines the api actions for the CloudExportAdminServiceApi service This interface intended to stay up to date with the openapi yaml used to generate it, while the service implementation can ignored with the .openapi-generator-ignore file and updated with the logic required for the API.
func NewCloudExportAdminServiceApiService ¶
func NewCloudExportAdminServiceApiService(repo *CloudExportRepo) CloudExportAdminServiceApiServicer
NewCloudExportAdminServiceApiService creates a default api service
type CloudExportRepo ¶
type CloudExportRepo struct {
// contains filtered or unexported fields
}
CloudExportRepo is local storage fro CloudExport data
func NewCloudExportRepo ¶
func NewCloudExportRepo(fileName string) *CloudExportRepo
func (*CloudExportRepo) Create ¶
func (r *CloudExportRepo) Create(e V202101beta1CloudExport) (*V202101beta1CloudExport, error)
func (*CloudExportRepo) Delete ¶
func (r *CloudExportRepo) Delete(id string) error
func (*CloudExportRepo) Get ¶
func (r *CloudExportRepo) Get(id string) *V202101beta1CloudExport
func (*CloudExportRepo) List ¶
func (r *CloudExportRepo) List() []V202101beta1CloudExport
func (*CloudExportRepo) Update ¶
func (r *CloudExportRepo) Update(e V202101beta1CloudExport) (*V202101beta1CloudExport, error)
type GooglerpcStatus ¶
type GooglerpcStatus struct { Code int32 `json:"code,omitempty"` Message string `json:"message,omitempty"` Details []ProtobufAny `json:"details,omitempty"` }
type ImplResponse ¶
type ImplResponse struct { Code int Body interface{} }
Implementation response defines an error code with the associated body
func Response ¶
func Response(code int, body interface{}) ImplResponse
Response return a ImplResponse struct filled
type ProtobufAny ¶
type Route ¶
type Route struct { Name string Method string Pattern string HandlerFunc http.HandlerFunc }
A Route defines the parameters for an api endpoint
type Router ¶
type Router interface {
Routes() Routes
}
Router defines the required methods for retrieving api routes
func NewCloudExportAdminServiceApiController ¶
func NewCloudExportAdminServiceApiController(s CloudExportAdminServiceApiServicer) Router
NewCloudExportAdminServiceApiController creates a default api controller
type V202101beta1AzureProperties ¶
type V202101beta1AzureProperties struct { Location string `json:"location,omitempty"` ResourceGroup string `json:"resourceGroup,omitempty"` StorageAccount string `json:"storageAccount,omitempty"` SubscriptionId string `json:"subscriptionId,omitempty"` SecurityPrincipalEnabled bool `json:"securityPrincipalEnabled,omitempty"` }
type V202101beta1BgpProperties ¶
type V202101beta1BgpProperties struct { // If true, apply BGP data discovered via another device to the flow from this export. ApplyBgp bool `json:"applyBgp,omitempty"` UseBgpDeviceId string `json:"useBgpDeviceId,omitempty"` DeviceBgpType string `json:"deviceBgpType,omitempty"` }
V202101beta1BgpProperties - Optional BGP related settings.
type V202101beta1CloudExport ¶
type V202101beta1CloudExport struct { // The internal cloud export identifier. This is Read-only and assigned by Kentik. Id string `json:"id,omitempty"` Type V202101beta1CloudExportType `json:"type,omitempty"` // Whether this task is enabled and intended to run, or disabled. Enabled bool `json:"enabled,omitempty"` // A short name for this export. Name string `json:"name,omitempty"` // An optional, longer description. Description string `json:"description,omitempty"` ApiRoot *string `json:"apiRoot,omitempty"` // NOTE: updated by hand to pointer type FlowDest *string `json:"flowDest,omitempty"` // NOTE: updated by hand to pointer type // The identifier of the Kentik plan associated with this task. PlanId string `json:"planId,omitempty"` CloudProvider string `json:"cloudProvider,omitempty"` Aws *V202101beta1AwsProperties `json:"aws,omitempty"` // NOTE: updated by hand to pointer type Azure *V202101beta1AzureProperties `json:"azure,omitempty"` // NOTE: updated by hand to pointer type Gce *V202101beta1GceProperties `json:"gce,omitempty"` // NOTE: updated by hand to pointer type Ibm *V202101beta1IbmProperties `json:"ibm,omitempty"` // NOTE: updated by hand to pointer type Bgp *V202101beta1BgpProperties `json:"bgp,omitempty"` // NOTE: updated by hand to pointer type CurrentStatus *CloudExportv202101beta1Status `json:"currentStatus,omitempty"` // NOTE: updated by hand to pointer type }
type V202101beta1CloudExportType ¶
type V202101beta1CloudExportType string
const ( V202101BETA1CLOUDEXPORTTYPE_UNSPECIFIED V202101beta1CloudExportType = "CLOUD_EXPORT_TYPE_UNSPECIFIED" V202101BETA1CLOUDEXPORTTYPE_KENTIK_MANAGED V202101beta1CloudExportType = "CLOUD_EXPORT_TYPE_KENTIK_MANAGED" V202101BETA1CLOUDEXPORTTYPE_CUSTOMER_MANAGED V202101beta1CloudExportType = "CLOUD_EXPORT_TYPE_CUSTOMER_MANAGED" )
List of V202101beta1CloudExportType
type V202101beta1CreateCloudExportRequest ¶
type V202101beta1CreateCloudExportRequest struct {
Export V202101beta1CloudExport `json:"export,omitempty"`
}
type V202101beta1CreateCloudExportResponse ¶
type V202101beta1CreateCloudExportResponse struct {
Export V202101beta1CloudExport `json:"export,omitempty"`
}
type V202101beta1GetCloudExportResponse ¶
type V202101beta1GetCloudExportResponse struct {
Export V202101beta1CloudExport `json:"export,omitempty"`
}
type V202101beta1IbmProperties ¶
type V202101beta1IbmProperties struct {
Bucket string `json:"bucket,omitempty"`
}
type V202101beta1ListCloudExportResponse ¶
type V202101beta1ListCloudExportResponse struct { Exports []V202101beta1CloudExport `json:"exports,omitempty"` InvalidExportsCount int64 `json:"invalidExportsCount,omitempty"` }
type V202101beta1PatchCloudExportRequest ¶
type V202101beta1PatchCloudExportRequest struct { Export V202101beta1CloudExport `json:"export,omitempty"` Mask string `json:"mask,omitempty"` }
type V202101beta1PatchCloudExportResponse ¶
type V202101beta1PatchCloudExportResponse struct {
Export V202101beta1CloudExport `json:"export,omitempty"`
}
type V202101beta1UpdateCloudExportRequest ¶
type V202101beta1UpdateCloudExportRequest struct {
Export V202101beta1CloudExport `json:"export,omitempty"`
}
type V202101beta1UpdateCloudExportResponse ¶
type V202101beta1UpdateCloudExportResponse struct {
Export V202101beta1CloudExport `json:"export,omitempty"`
}
Source Files ¶
- api.go
- api_cloud_export_admin_service.go
- api_cloud_export_admin_service_service.go
- helpers.go
- impl.go
- logger.go
- model_cloud_exportv202101beta1_status.go
- model_googlerpc_status.go
- model_protobuf_any.go
- model_v202101beta1_aws_properties.go
- model_v202101beta1_azure_properties.go
- model_v202101beta1_bgp_properties.go
- model_v202101beta1_cloud_export.go
- model_v202101beta1_cloud_export_type.go
- model_v202101beta1_create_cloud_export_request.go
- model_v202101beta1_create_cloud_export_response.go
- model_v202101beta1_gce_properties.go
- model_v202101beta1_get_cloud_export_response.go
- model_v202101beta1_ibm_properties.go
- model_v202101beta1_list_cloud_export_response.go
- model_v202101beta1_patch_cloud_export_request.go
- model_v202101beta1_patch_cloud_export_response.go
- model_v202101beta1_update_cloud_export_request.go
- model_v202101beta1_update_cloud_export_response.go
- repo.go
- routers.go