Documentation ¶
Index ¶
- Constants
- Variables
- func CallAPI(cliConnection plugin.CliConnection, url string) (string, error)
- func CallPagableAPI(cliConnection plugin.CliConnection, url string, ...) error
- func GetIntValueByFieldName(n interface{}, field_name string) (int64, bool)
- func GetObjectValueByFieldName(n interface{}, field_name string) (interface{}, bool)
- func GetStringValueByFieldName(n interface{}, field_name string) (string, bool)
- func RegisterMetadataHandler(dataType DataType, metadataHandler MetadataHandler)
- type APIVersion
- type CommonMetadataManager
- func (commonMgr *CommonMetadataManager) AddItem(metadataItem IMetadata)
- func (commonMgr *CommonMetadataManager) CacheSize() int
- func (commonMgr *CommonMetadataManager) Clear()
- func (commonMgr *CommonMetadataManager) DelayedRemovalFromCache(guid string, itemName string)
- func (commonMgr *CommonMetadataManager) DeleteItem(guid string)
- func (commonMgr *CommonMetadataManager) FindItemInternal(guid string, requestLoadIfNotFound bool, createEmptyObjectIfNotFound bool) (IMetadata, bool)
- func (commonMgr *CommonMetadataManager) GetMdGlobalManager() MdGlobalManagerInterface
- func (commonMgr *CommonMetadataManager) GetUrl() string
- func (commonMgr *CommonMetadataManager) IsDeletedFromCache(guid string) bool
- func (commonMgr *CommonMetadataManager) IsPendingDeleteFromCache(guid string) bool
- func (commonMgr *CommonMetadataManager) LastLoadTime(dataKey string) *time.Time
- func (commonMgr *CommonMetadataManager) LoadItem(guid string) error
- func (commonMgr *CommonMetadataManager) MetadataLoadMethod(guid string) error
- func (commonMgr *CommonMetadataManager) MinimumReloadDuration() time.Duration
- func (commonMgr *CommonMetadataManager) PostProcessLoad(metadataArray []IMetadata, err error)
- type CommonV2ResponseManager
- func (commonV2ResponseMgr *CommonV2ResponseManager) Count(response IResponse) int
- func (commonV2ResponseMgr *CommonV2ResponseManager) FindItemInternal(guid string, requestLoadIfNotFound bool, createEmptyObjectIfNotFound bool) IMetadata
- func (commonV2ResponseMgr *CommonV2ResponseManager) GetMetadata() ([]IMetadata, error)
- func (commonV2ResponseMgr *CommonV2ResponseManager) GetMetadataFromUrl(url string) ([]IMetadata, error)
- func (commonV2ResponseMgr *CommonV2ResponseManager) GetNextUrl(response IResponse) string
- func (commonV2ResponseMgr *CommonV2ResponseManager) LoadAllItems() error
- func (commonV2ResponseMgr *CommonV2ResponseManager) LoadAllItemsAysnc()
- func (commonV2ResponseMgr *CommonV2ResponseManager) LoadAllItemsInternal() ([]IMetadata, error)
- func (commonV2ResponseMgr *CommonV2ResponseManager) LoadItemInternal(guid string) (IMetadata, error)
- func (commonV2ResponseMgr *CommonV2ResponseManager) MetadataLoadMethod(guid string) error
- type DataType
- type EntityCommon
- type ICommonResponseManager
- type IEntity
- type IMetadata
- type IResource
- type IResourceMetadata
- type IResponse
- type IResponseV3
- type Link
- type LoadHandler
- type LoadRequest
- type MdGlobalManagerInterface
- type Meta
- type MetaV3
- type Metadata
- type MetadataHandler
- type MetadataManager
- type Pagination
- type ResponseError
- type V2MetadataManager
Constants ¶
View Source
const ( APP DataType = "APP" APP_INST = "APP_INST" APP_STATS = "APP_STATS" SPACE = "SPACE" ORG = "ORG" DOMAIN_PRIVATE = "DOMAIN_PRIVATE" DOMAIN_SHARED = "DOMAIN_SHARED" ISO_SEG = "ISO_SEG" ORG_QUOTA = "ORG_QUOTA" SPACE_QUOTA = "SPACE_QUOTA" ROUTE = "ROUTE" STACK = "STACK" EVENTS_CRASH = "EVENTS_CRASH" )
View Source
const ALL = "ALL"
View Source
const AUTH_ERROR = "Authentication has expired"
View Source
const DefaultMinimumReloadDuration = time.Millisecond * 10000
View Source
const DelayedRemovalFromCacheDuration = 15 * time.Second
View Source
const Infinity time.Duration = 1<<63 - 1
View Source
const MaxLoadAttempts = 5
View Source
const WaitToReloadOnErrorDuration = time.Second * 30
Variables ¶
View Source
var DataTypeDisplay = map[DataType]string{ APP: "Application", APP_INST: "Application Instance", APP_STATS: "Application Stat", SPACE: "Space", ORG: "Organization", DOMAIN_PRIVATE: "Private Domain", DOMAIN_SHARED: "Shared Domain", ISO_SEG: "Isolation Segment", ORG_QUOTA: "Organization Quota", SPACE_QUOTA: "Space Quota", ROUTE: "Route", STACK: "Stack", EVENTS_CRASH: "Event Crash", }
Functions ¶
func CallPagableAPI ¶
func CallPagableAPI(cliConnection plugin.CliConnection, url string, handleResponse handleResponseFunc) error
func GetIntValueByFieldName ¶ added in v0.9.2
func GetObjectValueByFieldName ¶ added in v0.9.4
func RegisterMetadataHandler ¶ added in v0.9.0
func RegisterMetadataHandler(dataType DataType, metadataHandler MetadataHandler)
Types ¶
type APIVersion ¶ added in v0.9.4
type APIVersion int
const ( API_V2 APIVersion = 2 API_V3 APIVersion = 3 )
type CommonMetadataManager ¶ added in v0.9.0
type CommonMetadataManager struct { MetadataMapMutex sync.Mutex MetadataMap map[string]IMetadata // contains filtered or unexported fields }
func NewCommonMetadataManager ¶ added in v0.9.0
func NewCommonMetadataManager( mdGlobalManager MdGlobalManagerInterface, dataType DataType, url string, mm MetadataManager, minimumReloadDuration time.Duration) *CommonMetadataManager
func (*CommonMetadataManager) AddItem ¶ added in v0.9.0
func (commonMgr *CommonMetadataManager) AddItem(metadataItem IMetadata)
func (*CommonMetadataManager) CacheSize ¶ added in v0.9.0
func (commonMgr *CommonMetadataManager) CacheSize() int
func (*CommonMetadataManager) Clear ¶ added in v0.9.0
func (commonMgr *CommonMetadataManager) Clear()
func (*CommonMetadataManager) DelayedRemovalFromCache ¶ added in v0.9.0
func (commonMgr *CommonMetadataManager) DelayedRemovalFromCache(guid string, itemName string)
Called via a seperate thread - after a delay, remove the requested guid from cache
func (*CommonMetadataManager) DeleteItem ¶ added in v0.9.0
func (commonMgr *CommonMetadataManager) DeleteItem(guid string)
func (*CommonMetadataManager) FindItemInternal ¶ added in v0.9.0
func (*CommonMetadataManager) GetMdGlobalManager ¶ added in v0.9.0
func (commonMgr *CommonMetadataManager) GetMdGlobalManager() MdGlobalManagerInterface
func (*CommonMetadataManager) GetUrl ¶ added in v0.9.0
func (commonMgr *CommonMetadataManager) GetUrl() string
func (*CommonMetadataManager) IsDeletedFromCache ¶ added in v0.9.0
func (commonMgr *CommonMetadataManager) IsDeletedFromCache(guid string) bool
func (*CommonMetadataManager) IsPendingDeleteFromCache ¶ added in v0.9.0
func (commonMgr *CommonMetadataManager) IsPendingDeleteFromCache(guid string) bool
func (*CommonMetadataManager) LastLoadTime ¶ added in v0.9.0
func (commonMgr *CommonMetadataManager) LastLoadTime(dataKey string) *time.Time
Last time data was loaded or nil if never
func (*CommonMetadataManager) LoadItem ¶ added in v0.9.0
func (commonMgr *CommonMetadataManager) LoadItem(guid string) error
func (*CommonMetadataManager) MetadataLoadMethod ¶ added in v0.9.0
func (commonMgr *CommonMetadataManager) MetadataLoadMethod(guid string) error
func (*CommonMetadataManager) MinimumReloadDuration ¶ added in v0.9.0
func (commonMgr *CommonMetadataManager) MinimumReloadDuration() time.Duration
func (*CommonMetadataManager) PostProcessLoad ¶ added in v0.9.4
func (commonMgr *CommonMetadataManager) PostProcessLoad(metadataArray []IMetadata, err error)
type CommonV2ResponseManager ¶ added in v0.9.0
type CommonV2ResponseManager struct { *CommonMetadataManager // contains filtered or unexported fields }
func NewCommonV2ResponseManager ¶ added in v0.9.0
func NewCommonV2ResponseManager(mdGlobalManager MdGlobalManagerInterface, dataType DataType, url string, mm V2MetadataManager, autoFullLoadIfNotFound bool) *CommonV2ResponseManager
func (*CommonV2ResponseManager) Count ¶ added in v0.9.4
func (commonV2ResponseMgr *CommonV2ResponseManager) Count(response IResponse) int
func (*CommonV2ResponseManager) FindItemInternal ¶ added in v0.9.0
func (commonV2ResponseMgr *CommonV2ResponseManager) FindItemInternal(guid string, requestLoadIfNotFound bool, createEmptyObjectIfNotFound bool) IMetadata
func (*CommonV2ResponseManager) GetMetadata ¶ added in v0.9.0
func (commonV2ResponseMgr *CommonV2ResponseManager) GetMetadata() ([]IMetadata, error)
func (*CommonV2ResponseManager) GetMetadataFromUrl ¶ added in v0.9.0
func (commonV2ResponseMgr *CommonV2ResponseManager) GetMetadataFromUrl(url string) ([]IMetadata, error)
func (*CommonV2ResponseManager) GetNextUrl ¶ added in v0.9.4
func (commonV2ResponseMgr *CommonV2ResponseManager) GetNextUrl(response IResponse) string
func (*CommonV2ResponseManager) LoadAllItems ¶ added in v0.9.0
func (commonV2ResponseMgr *CommonV2ResponseManager) LoadAllItems() error
func (*CommonV2ResponseManager) LoadAllItemsAysnc ¶ added in v0.9.0
func (commonV2ResponseMgr *CommonV2ResponseManager) LoadAllItemsAysnc()
func (*CommonV2ResponseManager) LoadAllItemsInternal ¶ added in v0.9.0
func (commonV2ResponseMgr *CommonV2ResponseManager) LoadAllItemsInternal() ([]IMetadata, error)
func (*CommonV2ResponseManager) LoadItemInternal ¶ added in v0.9.0
func (commonV2ResponseMgr *CommonV2ResponseManager) LoadItemInternal(guid string) (IMetadata, error)
func (*CommonV2ResponseManager) MetadataLoadMethod ¶ added in v0.9.0
func (commonV2ResponseMgr *CommonV2ResponseManager) MetadataLoadMethod(guid string) error
type EntityCommon ¶ added in v0.8.0
func (*EntityCommon) GetGuid ¶ added in v0.8.0
func (entity *EntityCommon) GetGuid() string
func (*EntityCommon) SetGuid ¶ added in v0.8.0
func (entity *EntityCommon) SetGuid(guid string)
type ICommonResponseManager ¶ added in v0.9.0
type IResourceMetadata ¶ added in v0.8.0
type IResourceMetadata interface { }
type IResponseV3 ¶ added in v0.9.0
type IResponseV3 interface {
GetPagination() Pagination
}
type LoadHandler ¶ added in v0.9.0
type LoadHandler struct {
// contains filtered or unexported fields
}
func NewLoadHandler ¶ added in v0.9.0
func NewLoadHandler(conn plugin.CliConnection) *LoadHandler
func (*LoadHandler) RequestLoad ¶ added in v0.9.0
func (lh *LoadHandler) RequestLoad(loadRequest *LoadRequest)
func (*LoadHandler) RequestLoadOfAll ¶ added in v0.9.0
func (lh *LoadHandler) RequestLoadOfAll(dataType DataType, delayBeforeLoad time.Duration)
func (*LoadHandler) RequestLoadOfItem ¶ added in v0.9.0
func (lh *LoadHandler) RequestLoadOfItem(dataType DataType, guid string, delayBeforeLoad time.Duration)
type LoadRequest ¶ added in v0.9.0
type LoadRequest struct {
// contains filtered or unexported fields
}
type MdGlobalManagerInterface ¶ added in v0.9.0
type Metadata ¶ added in v0.8.0
type Metadata struct {
// contains filtered or unexported fields
}
func NewMetadata ¶ added in v0.9.0
func NewMetadata() *Metadata
func (*Metadata) GetCacheTime ¶ added in v0.8.0
func (*Metadata) SetCacheTime ¶ added in v0.8.0
type MetadataHandler ¶ added in v0.9.0
type MetadataManager ¶ added in v0.9.0
type Pagination ¶ added in v0.9.0
type ResponseError ¶ added in v0.9.2
type V2MetadataManager ¶ added in v0.9.0
type V2MetadataManager interface { MetadataManager LoadAllItemsInternal() ([]IMetadata, error) CreateResponseObject() IResponse CreateResourceObject() IResource CreateMetadataEntityObject(guid string) IMetadata ProcessResponse(IResponse, []IMetadata) []IMetadata ProcessResource(resource IResource) IMetadata GetNextUrl(response IResponse) string Count(response IResponse) int PostProcessLoad([]IMetadata, error) }
Click to show internal directories.
Click to hide internal directories.