common

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const AUTH_ERROR = "Authentication has expired"

Variables

This section is empty.

Functions

func CallAPI

func CallAPI(cliConnection plugin.CliConnection, url string) (string, error)

func CallPagableAPI

func CallPagableAPI(cliConnection plugin.CliConnection, url string, handleResponse handleResponseFunc) error

func GetStringValueByFieldName

func GetStringValueByFieldName(n interface{}, field_name string) (string, bool)

Types

type EntityCommon added in v0.8.0

type EntityCommon struct {
	Guid string `json:"guid"`
	IEntity
}

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 IEntity added in v0.8.0

type IEntity interface {
	GetGuid() string
	SetGuid(string)
}

type IMetadata added in v0.8.0

type IMetadata interface {
	IEntity
	SetCacheTime(time.Time)
	GetCacheTime() time.Time
}

type IResource added in v0.8.0

type IResource interface {
}

type IResourceMetadata added in v0.8.0

type IResourceMetadata interface {
}

type IResponse added in v0.8.0

type IResponse interface {
}

type MdCommonManager added in v0.8.0

type MdCommonManager struct {
	// contains filtered or unexported fields
}

func NewMdCommonManager added in v0.8.0

func NewMdCommonManager(
	mdGlobalManager mdGlobalManagerInterface.MdGlobalManagerInterface,
	url string,
	createResponseObject createResponseObject,
	createMetadataEntityObject createMetadataEntityObject,
	processResponse processResponse) *MdCommonManager

func (*MdCommonManager) All added in v0.8.0

func (mdMgr *MdCommonManager) All() []IMetadata

func (*MdCommonManager) Find added in v0.8.0

func (mdMgr *MdCommonManager) Find(guid string) IMetadata

func (*MdCommonManager) FlushCache added in v0.8.0

func (mdMgr *MdCommonManager) FlushCache()

Flush cache. This will not force a reload - must call LoadCache if immedently reload is desired

func (*MdCommonManager) GetMetadataFromUrl added in v0.8.0

func (mdMgr *MdCommonManager) GetMetadataFromUrl(cliConnection plugin.CliConnection, url string) ([]IMetadata, error)

func (*MdCommonManager) LoadCache added in v0.8.0

func (mdMgr *MdCommonManager) LoadCache(cliConnection plugin.CliConnection)

func (*MdCommonManager) LoadCacheAysnc added in v0.8.0

func (mdMgr *MdCommonManager) LoadCacheAysnc()

func (*MdCommonManager) RequestLoadCacheIfOld added in v0.8.0

func (mdMgr *MdCommonManager) RequestLoadCacheIfOld()

type Meta

type Meta struct {
	Guid      string `json:"guid"`
	CreatedAt string `json:"created_at"`
	UpdatedAt string `json:"updated_at"`
}

type Metadata added in v0.8.0

type Metadata struct {
	// contains filtered or unexported fields
}

func (*Metadata) GetCacheTime added in v0.8.0

func (md *Metadata) GetCacheTime() time.Time

func (*Metadata) SetCacheTime added in v0.8.0

func (md *Metadata) SetCacheTime(time time.Time)

Jump to

Keyboard shortcuts

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