cloudexportstub

package
v0.0.0-...-92e41f0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

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 Logger

func Logger(inner http.Handler, name string) http.Handler

func NewRouter

func NewRouter(routers ...Router) *mux.Router

NewRouter creates a new router for any number of api routers

func ReadFormFileToTempFile

func ReadFormFileToTempFile(r *http.Request, key string) (*os.File, error)

ReadFormFileToTempFile reads file data from a request form and writes it to a temporary file

func ReadFormFilesToTempFiles

func ReadFormFilesToTempFiles(r *http.Request, key string) ([]*os.File, error)

ReadFormFilesToTempFiles reads files array data from a request form and writes it to a temporary files

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

ExportCreate - Create Cloud Export.

func (*CloudExportAdminServiceApiController) ExportDelete

ExportDelete - Delete an export.

func (*CloudExportAdminServiceApiController) ExportGet

ExportGet - Get information about an export.

func (*CloudExportAdminServiceApiController) ExportList

ExportList - List Cloud Export.

func (*CloudExportAdminServiceApiController) ExportPatch

ExportPatch - Patch an export.

func (*CloudExportAdminServiceApiController) ExportUpdate

ExportUpdate - Update an export.

func (*CloudExportAdminServiceApiController) 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

ExportCreate - Create Cloud Export.

func (*CloudExportAdminServiceApiService) ExportDelete

ExportDelete - Delete an export.

func (*CloudExportAdminServiceApiService) ExportGet

ExportGet - Get information about an export.

func (*CloudExportAdminServiceApiService) ExportList

ExportList - List Cloud Export.

func (*CloudExportAdminServiceApiService) ExportPatch

ExportPatch - Patch an export.

func (*CloudExportAdminServiceApiService) ExportUpdate

ExportUpdate - Update an export.

type CloudExportAdminServiceApiServicer

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 (*CloudExportRepo) Delete

func (r *CloudExportRepo) Delete(id string) error

func (*CloudExportRepo) Get

func (*CloudExportRepo) List

func (*CloudExportRepo) Update

type CloudExportv202101beta1Status

type CloudExportv202101beta1Status struct {
	Status string `json:"status,omitempty"`

	ErrorMessage string `json:"errorMessage,omitempty"`

	FlowFound bool `json:"flowFound,omitempty"`

	ApiAccess bool `json:"apiAccess,omitempty"`

	StorageAccountAccess bool `json:"storageAccountAccess,omitempty"`
}

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 ProtobufAny struct {
	TypeUrl string `json:"typeUrl,omitempty"`

	Value string `json:"value,omitempty"`
}

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 Routes

type Routes []Route

Routes are a collection of defined api endpoints

type V202101beta1AwsProperties

type V202101beta1AwsProperties struct {
	Bucket string `json:"bucket,omitempty"`

	IamRoleArn string `json:"iamRoleArn,omitempty"`

	Region string `json:"region,omitempty"`

	DeleteAfterRead bool `json:"deleteAfterRead,omitempty"`

	MultipleBuckets bool `json:"multipleBuckets,omitempty"`
}

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 V202101beta1GceProperties

type V202101beta1GceProperties struct {
	Project string `json:"project,omitempty"`

	Subscription string `json:"subscription,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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL