utils

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2023 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PolicyForbidden          = &models.Error{Code: 403, Message: "policy does not allow this request to be performed"}
	NotFound                 = &models.Error{Code: 404, Message: "not found"}
	ProviderUnchangeable     = &models.Error{Code: 400, Message: "provider cannot be changed"}
	InvalidMarker            = &models.Error{Code: 400, Message: "invalid marker"}
	PoolIDImmutable          = &models.Error{Code: 400, Message: "invalid value for 'pool_id': change of immutable attribute 'pool_id' not allowed"}
	PoolIDRequired           = &models.Error{Code: 400, Message: "invalid value for 'pool_id': 'pool_id' is required"}
	DuplicateMember          = &models.Error{Code: 409, Message: "invalid value for 'address' and 'port': endpoint already exists in pool"}
	DuplicateDomain          = &models.Error{Code: 409, Message: "invalid value for 'domain' and 'provider': domain already exists"}
	DatacenterInUse          = &models.Error{Code: 409, Message: "datacenter is in use"}
	MySQLForeignKeyViolation = &mysql.MySQLError{Number: 1451}
)
View Source
var (
	SwaggerSpec *loads.Document
)

Functions

func ConfigureTransport

func ConfigureTransport() micro.Option

func DeepEqualFields

func DeepEqualFields(x, y interface{}, fieldsToCompare []string) bool

DeepEqualFields like reflect.DeepEqual, but with field array to compare

func GetErrorPoolHasAlreadyAMonitor

func GetErrorPoolHasAlreadyAMonitor(poolID *strfmt.UUID) *models.Error

func GetErrorPoolNotFound

func GetErrorPoolNotFound(poolID *strfmt.UUID) *models.Error

func GetQuotaMetResponse

func GetQuotaMetResponse(resource string) *models.Error

func InetAton

func InetAton(ip net.IP) (uint32, error)

func InetNtoa

func InetNtoa(val uint32) net.IP

func SetModelDefaults

func SetModelDefaults(s interface{}) error

func UUIDsDifference

func UUIDsDifference(a, b []strfmt.UUID) []strfmt.UUID

Types

type ResourcesNotFoundError

type ResourcesNotFoundError struct {
	Ids      []strfmt.UUID
	Resource string
}

func (ResourcesNotFoundError) Error

func (rnf ResourcesNotFoundError) Error() string

Jump to

Keyboard shortcuts

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