Documentation ¶
Index ¶
- Constants
- Variables
- func AppendUrl(host string, endpoint string) *url.URL
- func CheckString(name string, rc string) error
- func GetPercent(value float64, max float64, precision int) float64
- func GetUrl(u string) *url.URL
- func HelpDataType() string
- func HelpDateId() string
- func HelpQueryType() string
- func HelpReportType() string
- func JoinWithDots(intSize int, dateFormat string, args ...interface{}) string
- func MarshalJSON(endpoint EndPoint) ([]byte, error)
- type Api
- type Area
- type AreaName
- type AreaNames
- type AreaStruct
- func (as AreaStruct) CountDisabled() int
- func (as AreaStruct) CountEnabled() int
- func (as AreaStruct) CoveragePercent() float64
- func (as AreaStruct) Exists(name EndPointName) error
- func (as *AreaStruct) GetEndPoint(name EndPointName) EndPoint
- func (as AreaStruct) ListEndpoints()
- func (as *AreaStruct) SortEndPoints() []EndPointName
- type Areas
- func (an *Areas) EndpointExists(area AreaName, name EndPointName) error
- func (an *Areas) Exists(area string) bool
- func (an *Areas) GetArea(area AreaName) *Area
- func (an *Areas) GetEndPoint(area AreaName, endpoint EndPointName) EndPoint
- func (an *Areas) GetRequest(area AreaName, endpoint EndPointName) output.Json
- func (an *Areas) GetResponse(area AreaName, endpoint EndPointName) output.Json
- func (an Areas) ListAreas()
- func (an Areas) ListEndpoints(area string) error
- func (an *Areas) NotExists(area string) bool
- func (an *Areas) RequestArgs(area AreaName, endpoint EndPointName) map[string]string
- func (an *Areas) RequestRequiresArgs(area AreaName, endpoint EndPointName) bool
- func (an *Areas) SetRequest(area AreaName, endpoint EndPointName, ref interface{}) error
- func (an *Areas) SortAreas() AreaNames
- type DataEntries
- type DataEntry
- type DataMap
- func (dm *DataMap) Add(des ...DataEntry)
- func (dm *DataMap) AddPointUnitValues(Current *GoStruct.Reflect, parentDeviceId string, date valueTypes.DateTime)
- func (dm *DataMap) AppendMap(add DataMap)
- func (dm *DataMap) CopyPoint(refEndpoint *GoStruct.Reflect, endpoint GoStruct.EndPointPath, pointId string, ...) *GoStruct.Reflect
- func (dm *DataMap) CopyPointFromName(refEndpoint string, endpoint GoStruct.EndPointPath, pointId string, ...) *GoStruct.Reflect
- func (dm *DataMap) CreateDataTables() Tables
- func (dm *DataMap) CreateResultTable(full bool) output.Table
- func (dm *DataMap) GetPercent(entry *GoStruct.Reflect, max *GoStruct.Reflect, precision int) float64
- func (dm *DataMap) GetReflect(refEndpoint string) *GoStruct.Reflect
- func (dm *DataMap) LowerUpper(lowerEntry *GoStruct.Reflect, upperEntry *GoStruct.Reflect) float64
- func (dm *DataMap) MakeState(Current *GoStruct.Reflect) *GoStruct.Reflect
- func (dm *DataMap) ProcessMap()
- func (dm *DataMap) Sort() []string
- func (dm DataMap) String() string
- func (dm *DataMap) StructToDataMap(endpoint EndPoint, parentDeviceId string, name GoStruct.EndPointPath) DataMap
- type EndPoint
- type EndPointName
- type EndPointStruct
- func (ep *EndPointStruct) ApiCacheFilename(request interface{}) string
- func (ep *EndPointStruct) ApiFingerprint(request interface{}) string
- func (ep *EndPointStruct) ApiGetJsonFilename() string
- func (ep EndPointStruct) ApiGetRequestArgNames(req interface{}) map[string]string
- func (ep *EndPointStruct) ApiIsDebug() bool
- func (ep *EndPointStruct) ApiReadDataFile(ref interface{}) error
- func (ep *EndPointStruct) ApiRemoveDataFile() error
- func (ep *EndPointStruct) ApiSetFilenamePrefix(format string, args ...interface{}) string
- func (ep *EndPointStruct) ApiWriteDataFile(ref interface{}) error
- func (ep *EndPointStruct) Call() output.Json
- func (ep *EndPointStruct) FileExists(fn string) bool
- func (ep *EndPointStruct) GetArea() AreaName
- func (ep *EndPointStruct) GetFilePath() string
- func (ep *EndPointStruct) GetName() EndPointName
- func (ep *EndPointStruct) GetRequest() output.Json
- func (ep *EndPointStruct) GetResponse() output.Json
- func (ep *EndPointStruct) GetUrl() EndPointUrl
- func (ep *EndPointStruct) IsValid() error
- func (ep EndPointStruct) ResponseAsJson(raw bool, r interface{}) output.Json
- func (ep *EndPointStruct) SetRequest(ref interface{}) error
- func (ep EndPointStruct) String() string
- type EndPointUrl
- type ParentDevice
- type ParentDevices
- type Point
- func (p *Point) FixUnitType() Point
- func (p *Point) HasChanged(comp Point) bool
- func (p *Point) HasNotChanged(comp Point) bool
- func (p Point) Is15Minute() bool
- func (p Point) Is30Minute() bool
- func (p Point) Is5Minute() bool
- func (p Point) IsBool() bool
- func (p Point) IsBoot() bool
- func (p Point) IsDaily() bool
- func (p Point) IsInstant() bool
- func (p Point) IsMonthly() bool
- func (p Point) IsTotal() bool
- func (p Point) IsYearly() bool
- func (p *Point) SetName(name string)
- func (p Point) String() string
- func (p *Point) WhenReset(date valueTypes.DateTime) string
- type PointsMap
- type Request
- type RequestCommon
- type Response
- type ResponseCommon
- type Tables
- type TemplatePoint
- type TemplatePoints
- type TypeEndPoints
- func (ps TypeEndPoints) Exists(name EndPointName) error
- func (ps *TypeEndPoints) GetDisabled() TypeEndPoints
- func (ps *TypeEndPoints) GetEnabled() TypeEndPoints
- func (ps *TypeEndPoints) GetEndPoint(name EndPointName) EndPoint
- func (ps *TypeEndPoints) SortEndPoints() []EndPointName
- func (ps TypeEndPoints) String() string
- type Web
- func (w *Web) ApiGetEndPointDataTables(endpoint EndPoint) output.Tables
- func (w *Web) ApiGetEndPointResultTable(endpoint EndPoint) output.Table
- func (w *Web) AppendUrl(endpoint string) EndPointUrl
- func (w *Web) Get(endpoint EndPoint) EndPoint
- func (w *Web) GetCacheDir() string
- func (w *Web) GetCacheTimeout() time.Duration
- func (w *Web) PointCacheCheck(data DataMap) bool
- func (w *Web) PointCacheRead(endpoint EndPoint) ([]byte, error)
- func (w *Web) PointCacheWrite(endpoint EndPoint, data []byte) error
- func (w *Web) SetCacheDir(basedir string) error
- func (w *Web) SetCacheTimeout(duration time.Duration)
- func (w *Web) SetUrl(u string) error
- func (w *Web) WebCacheCheck(endpoint EndPoint) bool
- func (w *Web) WebCacheRead(endpoint EndPoint) ([]byte, error)
- func (w *Web) WebCacheRemove(endpoint EndPoint) error
- func (w *Web) WebCacheWrite(endpoint EndPoint, data []byte) error
Constants ¶
View Source
const ( NullAreaName = "NullArea" NullEndPointName = "NullEndpoint" DefaultTimeout = time.Second * 60 )
View Source
const ( DeviceType1 = "Inverter" DeviceType10 = "String" DeviceType11 = "Plant" DeviceType12 = "Circuit Protection" DeviceType13 = "Splitting Device" DeviceType14 = "Energy Storage System" DeviceType15 = "Sampling Device" DeviceType16 = "EMU" DeviceType17 = "Unit" DeviceType18 = "Temperature and Humidity Sensor" DeviceType19 = "Intelligent Power Distribution Cabinet" DeviceType20 = "Display Device" DeviceType21 = "AC Power Distributed Cabinet" DeviceType22 = "Communication Module" DeviceType23 = "System-BMS" DeviceType24 = "RackBMS" DeviceType25 = "DC-DC" DeviceType26 = "Energy Management System" DeviceType28 = "Wind Energy Converter" DeviceType29 = "SVG" DeviceType3 = "Grid-connection Point" DeviceType30 = "PT Cabinet" DeviceType31 = "Bus Protection" DeviceType32 = "Cleaning Robot" DeviceType33 = "Direct Current Cabinet" DeviceType34 = "Public Measurement and Control" DeviceType35 = "Anti-islanding Protection Device" DeviceType36 = "Frequency and Voltage Emergency Control Device" DeviceType37 = "PCS" DeviceType38 = "Cell BMS" DeviceType39 = "Power Quality" DeviceType4 = "Combiner Box" DeviceType40 = "Shuttle" DeviceType41 = "Optimizer" DeviceType42 = "Tracking axis communication box" DeviceType43 = "Battery" DeviceType44 = "Battery Cluster Management Unit" DeviceType45 = "Local Controller" DeviceType46 = "Networking Devices" DeviceType47 = "Energy Storage Unit" DeviceType48 = "DC Container" DeviceType5 = "Meteo Station" DeviceType50 = "IO Module" DeviceType6 = "Transformer" DeviceType7 = "Meter" DeviceType8 = "UPS" DeviceType9 = "Data Logger" DeviceType99 = "Others" )
View Source
const ( DeviceNameInverter = 1 DeviceNameString = 10 DeviceNamePlant = 11 DeviceNameCircuitProtection = 12 DeviceNameSplittingDevice = 13 DeviceNameEnergyStorageSystem = 14 DeviceNameSamplingDevice = 15 DeviceNameEMU = 16 DeviceNameUnit = 17 DeviceNameTemperatureAndHumiditySensor = 18 DeviceNameIntelligentPowerDistributionCabinet = 19 DeviceNameDisplayDevice = 20 DeviceNameACPowerDistributedCabinet = 21 DeviceNameCommunicationModule = 22 DeviceNameSystemBMS = 23 DeviceNameRackBMS = 24 DeviceNameDCToDC = 25 DeviceNameEnergyManagementSystem = 26 DeviceNameWindEnergyConverter = 28 DeviceNameSVG = 29 DeviceNameGridConnectionPoint = 3 DeviceNamePTCabinet = 30 DeviceNameBusProtection = 31 DeviceNameCleaningRobot = 32 DeviceNameDirectCurrentCabinet = 33 DeviceNamePublicMeasurementandControl = 34 DeviceNameAntiIslandingProtectionDevice = 35 DeviceNameFrequencyAndVoltageEmergencyControlDevice = 36 DeviceNamePCS = 37 DeviceNameCellBMS = 38 DeviceNamePowerQuality = 39 DeviceNameCombinerBox = 4 DeviceNameShuttle = 40 DeviceNameOptimizer = 41 DeviceNameTrackingAxisCommunicationBox = 42 DeviceNameBattery = 43 DeviceNameBatteryClusterManagementUnit = 44 DeviceNameLocalController = 45 DeviceNameNetworkingDevices = 46 DeviceNameEnergyStorageUnit = 47 DeviceNameDCContainer = 48 DeviceNameMeteoStation = 5 DeviceNameIOModule = 50 DeviceNameTransformer = 6 DeviceNameMeter = 7 DeviceNameUPS = 8 DeviceNameDataLogger = 9 DeviceNameOthers = 99 )
View Source
const DEBUG = false
DEBUG - Used for easy debugging of this package.
View Source
const LastEntry = -1
View Source
const (
VirtualPsId = "virtual"
)
Variables ¶
View Source
var Points = PointsMap{ Map: map[string]*Point{}, }
Points Discovered points from the API
Functions ¶
func HelpDataType ¶
func HelpDataType() string
func HelpDateId ¶
func HelpDateId() string
func HelpQueryType ¶
func HelpQueryType() string
func HelpReportType ¶
func HelpReportType() string
func JoinWithDots ¶
func MarshalJSON ¶
Types ¶
type Area ¶
type Area interface { Init(*Web) AreaStruct GetAreaName() AreaName GetEndPoints() TypeEndPoints Call(name EndPointName) output.Json SetRequest(name EndPointName, ref interface{}) error GetRequest(name EndPointName) output.Json GetResponse(name EndPointName) output.Json GetData(name EndPointName) output.Json IsValid(name EndPointName) error GetError(name EndPointName) error }
type AreaStruct ¶
type AreaStruct struct { ApiRoot interface{} // *web.Web Name AreaName EndPoints TypeEndPoints Error error }
func (AreaStruct) CountDisabled ¶
func (as AreaStruct) CountDisabled() int
func (AreaStruct) CountEnabled ¶
func (as AreaStruct) CountEnabled() int
func (AreaStruct) CoveragePercent ¶
func (as AreaStruct) CoveragePercent() float64
func (AreaStruct) Exists ¶
func (as AreaStruct) Exists(name EndPointName) error
func (*AreaStruct) GetEndPoint ¶
func (as *AreaStruct) GetEndPoint(name EndPointName) EndPoint
func (AreaStruct) ListEndpoints ¶
func (as AreaStruct) ListEndpoints()
func (*AreaStruct) SortEndPoints ¶
func (as *AreaStruct) SortEndPoints() []EndPointName
type Areas ¶
type Areas map[AreaName]AreaStruct // TypeEndPoints // Map of EndPoints by area name.
func (*Areas) EndpointExists ¶
func (an *Areas) EndpointExists(area AreaName, name EndPointName) error
func (*Areas) GetEndPoint ¶
func (an *Areas) GetEndPoint(area AreaName, endpoint EndPointName) EndPoint
func (*Areas) GetRequest ¶
func (an *Areas) GetRequest(area AreaName, endpoint EndPointName) output.Json
func (*Areas) GetResponse ¶
func (an *Areas) GetResponse(area AreaName, endpoint EndPointName) output.Json
func (Areas) ListEndpoints ¶
func (*Areas) RequestArgs ¶
func (an *Areas) RequestArgs(area AreaName, endpoint EndPointName) map[string]string
func (*Areas) RequestRequiresArgs ¶
func (an *Areas) RequestRequiresArgs(area AreaName, endpoint EndPointName) bool
func (*Areas) SetRequest ¶
func (an *Areas) SetRequest(area AreaName, endpoint EndPointName, ref interface{}) error
type DataEntries ¶
type DataEntries struct {
Entries []DataEntry
}
func CreatePointDataEntries ¶
func CreatePointDataEntries(Current *GoStruct.Reflect, parentDeviceId string, point Point, dateTime valueTypes.DateTime) DataEntries
func (*DataEntries) Add ¶
func (de *DataEntries) Add(ref DataEntry) *DataEntries
func (*DataEntries) GetEntry ¶
func (de *DataEntries) GetEntry(index int) *DataEntry
func (*DataEntries) Len ¶
func (de *DataEntries) Len() int
type DataEntry ¶
type DataEntry struct { Current *GoStruct.Reflect `json:"-"` EndPoint string `json:"endpoint"` Point *Point `json:"point"` Parent ParentDevice `json:"parent"` Date valueTypes.DateTime `json:"date"` Value valueTypes.UnitValue `json:"value"` Valid bool `json:"valid"` Hide bool `json:"hide"` }
func CreatePointDataEntry ¶
func CreatePointDataEntry(Current *GoStruct.Reflect, parentDeviceId string, point Point, dateTime valueTypes.DateTime, uv valueTypes.UnitValue) DataEntry
func (*DataEntry) IsNotValid ¶
type DataMap ¶
type DataMap struct { Map map[string]*DataEntries TimeStamp time.Time EndPointPath GoStruct.EndPointPath StructMap GoStruct.StructMap EndPoint EndPoint Debug bool Error error // contains filtered or unexported fields }
func NewDataMap ¶
func NewDataMap() DataMap
func (*DataMap) AddPointUnitValues ¶
func (*DataMap) CopyPointFromName ¶
func (*DataMap) CreateDataTables ¶
func (*DataMap) GetPercent ¶
func (*DataMap) LowerUpper ¶
func (*DataMap) ProcessMap ¶
func (dm *DataMap) ProcessMap()
func (*DataMap) StructToDataMap ¶
type EndPoint ¶
type EndPoint interface { GetArea() AreaName GetName() EndPointName GetUrl() EndPointUrl IsDisabled() bool Help() string IsDebug() bool Call() EndPoint SetError(string, ...interface{}) EndPoint GetError() error IsError() bool MarshalJSON() ([]byte, error) ReadDataFile() error WriteDataFile() error String() string GetJsonData(bool) output.Json SetRequest(ref interface{}) EndPoint // EndPointStruct SetRequestByJson(j output.Json) EndPoint RequestRef() interface{} GetRequestJson() output.Json IsRequestValid() error RequestString() string RequestFingerprint() string GetRequestArgNames() map[string]string SetResponse([]byte) EndPoint // EndPointStruct ResponseRef() interface{} GetResponseJson() output.Json IsResponseValid() error ResponseString() string CacheFilename() string SetCacheTimeout(duration time.Duration) EndPoint GetCacheTimeout() time.Duration // GetDataTable() output.Table GetEndPointData() DataMap GetEndPointResultTable() output.Table GetEndPointDataTables() output.Tables SetFilenamePrefix(format string, args ...interface{}) string }
type EndPointName ¶
type EndPointName string
func GetName ¶
func GetName(v interface{}) EndPointName
func (EndPointName) String ¶
func (n EndPointName) String() string
type EndPointStruct ¶
type EndPointStruct struct { ApiRoot Web `json:"-"` RawResponse []byte Area AreaName `json:"area"` Name EndPointName `json:"name"` Url EndPointUrl `json:"url"` FileNamePrefix string Request interface{} `json:"-"` Response interface{} `json:"-"` Error error `json:"-"` Debug bool `json:"-"` }
func (*EndPointStruct) ApiCacheFilename ¶
func (ep *EndPointStruct) ApiCacheFilename(request interface{}) string
func (*EndPointStruct) ApiFingerprint ¶
func (ep *EndPointStruct) ApiFingerprint(request interface{}) string
func (*EndPointStruct) ApiGetJsonFilename ¶
func (ep *EndPointStruct) ApiGetJsonFilename() string
func (EndPointStruct) ApiGetRequestArgNames ¶
func (ep EndPointStruct) ApiGetRequestArgNames(req interface{}) map[string]string
func (*EndPointStruct) ApiIsDebug ¶
func (ep *EndPointStruct) ApiIsDebug() bool
func (*EndPointStruct) ApiReadDataFile ¶
func (ep *EndPointStruct) ApiReadDataFile(ref interface{}) error
ApiReadDataFile - Retrieves data from a local file.
func (*EndPointStruct) ApiRemoveDataFile ¶
func (ep *EndPointStruct) ApiRemoveDataFile() error
ApiRemoveDataFile - Saves data to a file path.
func (*EndPointStruct) ApiSetFilenamePrefix ¶
func (ep *EndPointStruct) ApiSetFilenamePrefix(format string, args ...interface{}) string
func (*EndPointStruct) ApiWriteDataFile ¶
func (ep *EndPointStruct) ApiWriteDataFile(ref interface{}) error
ApiWriteDataFile - Saves data to a file path.
func (*EndPointStruct) Call ¶
func (ep *EndPointStruct) Call() output.Json
func (*EndPointStruct) FileExists ¶
func (ep *EndPointStruct) FileExists(fn string) bool
FileExists Checks for existence of a local file.
func (*EndPointStruct) GetArea ¶
func (ep *EndPointStruct) GetArea() AreaName
func (*EndPointStruct) GetFilePath ¶
func (ep *EndPointStruct) GetFilePath() string
func (*EndPointStruct) GetName ¶
func (ep *EndPointStruct) GetName() EndPointName
func (*EndPointStruct) GetRequest ¶
func (ep *EndPointStruct) GetRequest() output.Json
func (*EndPointStruct) GetResponse ¶
func (ep *EndPointStruct) GetResponse() output.Json
func (*EndPointStruct) GetUrl ¶
func (ep *EndPointStruct) GetUrl() EndPointUrl
func (*EndPointStruct) IsValid ¶
func (ep *EndPointStruct) IsValid() error
func (EndPointStruct) ResponseAsJson ¶
func (ep EndPointStruct) ResponseAsJson(raw bool, r interface{}) output.Json
func (*EndPointStruct) SetRequest ¶
func (ep *EndPointStruct) SetRequest(ref interface{}) error
func (EndPointStruct) String ¶
func (ep EndPointStruct) String() string
type EndPointUrl ¶
func SetUrl ¶
func SetUrl(endpoint string) EndPointUrl
func (EndPointUrl) AppendPath ¶
func (u EndPointUrl) AppendPath(endpoint string) EndPointUrl
func (*EndPointUrl) IsValid ¶
func (u *EndPointUrl) IsValid() error
func (*EndPointUrl) MarshalJSON ¶
func (u *EndPointUrl) MarshalJSON() ([]byte, error)
func (EndPointUrl) String ¶
func (u EndPointUrl) String() string
func (*EndPointUrl) UnmarshalJSON ¶
func (u *EndPointUrl) UnmarshalJSON(data []byte) error
type ParentDevice ¶
type ParentDevice struct { Key string `json:"ps_key"` PsId string `json:"ps_id"` Type string `json:"parent_type"` Code string `json:"parent_code"` }
func NewParentDevice ¶
func NewParentDevice(key string) ParentDevice
func (*ParentDevice) HasChanged ¶
func (pd *ParentDevice) HasChanged(comp ParentDevice) bool
func (*ParentDevice) Set ¶
func (pd *ParentDevice) Set(key string)
func (*ParentDevice) Split ¶
func (pd *ParentDevice) Split()
type ParentDevices ¶
type ParentDevices struct { Map map[string]*ParentDevice Index []string }
func (*ParentDevices) Add ¶
func (pd *ParentDevices) Add(device ParentDevice)
func (*ParentDevices) Codes ¶
func (pd *ParentDevices) Codes() string
func (*ParentDevices) Keys ¶
func (pd *ParentDevices) Keys() string
func (*ParentDevices) PsIds ¶
func (pd *ParentDevices) PsIds() string
func (ParentDevices) String ¶
func (pd ParentDevices) String() string
func (*ParentDevices) Types ¶
func (pd *ParentDevices) Types() string
type Point ¶
type Point struct { Parents ParentDevices `json:"parents,omitempty"` Id string `json:"id,omitempty"` GroupName string `json:"group_name,omitempty"` Description string `json:"description,omitempty"` Unit string `json:"unit,omitempty"` UpdateFreq string `json:"time_span,omitempty"` ValueType string `json:"value_type,omitempty"` Valid bool `json:"valid,omitempty"` States map[string]string `json:"states,omitempty"` }
func GetDevicePoint ¶
func (*Point) FixUnitType ¶
func (*Point) HasChanged ¶
func (*Point) HasNotChanged ¶
func (Point) Is15Minute ¶
func (Point) Is30Minute ¶
type PointsMap ¶
func (*PointsMap) GetDevicePoint ¶
type Request ¶
type Request struct {
RequestCommon
}
type RequestCommon ¶
type RequestCommon struct { Appkey string `json:"appkey" required:"true"` Lang string `json:"lang"` SysCode string `json:"sys_code" required:"true"` Token string `json:"token"` UserId string `json:"user_id"` ValidFlag string `json:"valid_flag"` }
func (RequestCommon) IsValid ¶
func (req RequestCommon) IsValid() error
func (RequestCommon) String ¶
func (req RequestCommon) String() string
type Response ¶
type Response struct {
ResponseCommon
}
type ResponseCommon ¶
type ResponseCommon struct { ReqSerialNum string `json:"req_serial_num"` ResultCode string `json:"result_code"` ResultMsg string `json:"result_msg"` }
func (ResponseCommon) CheckResultCode ¶
func (req ResponseCommon) CheckResultCode() error
func (ResponseCommon) CheckResultMessage ¶
func (req ResponseCommon) CheckResultMessage() error
func (ResponseCommon) IsTokenInvalid ¶
func (req ResponseCommon) IsTokenInvalid() bool
func (ResponseCommon) IsTokenValid ¶
func (req ResponseCommon) IsTokenValid() bool
func (ResponseCommon) IsValid ¶
func (req ResponseCommon) IsValid() error
func (ResponseCommon) String ¶
func (req ResponseCommon) String() string
type Tables ¶
type Tables GoStruct.StructTables
type TemplatePoint ¶
type TemplatePoint struct { Name string PsKey string PointId valueTypes.PointId Unit string }
type TemplatePoints ¶
type TemplatePoints []TemplatePoint
func CreatePoints ¶
func CreatePoints(points []string) TemplatePoints
func (*TemplatePoints) GetPoint ¶
func (t *TemplatePoints) GetPoint(pskey string, point valueTypes.PointId) TemplatePoint
func (*TemplatePoints) PrintKeys ¶
func (t *TemplatePoints) PrintKeys() string
func (*TemplatePoints) PrintPoints ¶
func (t *TemplatePoints) PrintPoints() string
type TypeEndPoints ¶
type TypeEndPoints map[EndPointName]EndPoint // Map of EndPoints by endpoint name.
func (TypeEndPoints) Exists ¶
func (ps TypeEndPoints) Exists(name EndPointName) error
func (*TypeEndPoints) GetDisabled ¶
func (ps *TypeEndPoints) GetDisabled() TypeEndPoints
func (*TypeEndPoints) GetEnabled ¶
func (ps *TypeEndPoints) GetEnabled() TypeEndPoints
func (*TypeEndPoints) GetEndPoint ¶
func (ps *TypeEndPoints) GetEndPoint(name EndPointName) EndPoint
func (*TypeEndPoints) SortEndPoints ¶
func (ps *TypeEndPoints) SortEndPoints() []EndPointName
func (TypeEndPoints) String ¶
func (ps TypeEndPoints) String() string
type Web ¶
type Web struct { ServerUrl EndPointUrl Body []byte Error error // contains filtered or unexported fields }
func (*Web) ApiGetEndPointDataTables ¶
func (*Web) ApiGetEndPointResultTable ¶
func (*Web) AppendUrl ¶
func (w *Web) AppendUrl(endpoint string) EndPointUrl
func (*Web) GetCacheDir ¶
func (*Web) GetCacheTimeout ¶
func (*Web) PointCacheCheck ¶
PointCacheCheck Retrieves cache data from a local file.
func (*Web) PointCacheRead ¶
PointCacheRead Retrieves cache data from a local file.
func (*Web) PointCacheWrite ¶
PointCacheWrite Saves cache data to a file path.
func (*Web) SetCacheDir ¶
func (*Web) SetCacheTimeout ¶
func (*Web) WebCacheCheck ¶
WebCacheCheck Retrieves cache data from a local file.
func (*Web) WebCacheRead ¶
WebCacheRead Retrieves cache data from a local file.
func (*Web) WebCacheRemove ¶
WebCacheRemove Removes a cache file.
Source Files ¶
- const.go
- debug.go
- file.go
- help.go
- interface_area.go
- interface_endpoint.go
- legacy.go
- struct_area.go
- struct_areas.go
- struct_data.go
- struct_de.go
- struct_dpe.go
- struct_endpoint.go
- struct_endpoints.go
- struct_point.go
- struct_points.go
- struct_request.go
- struct_response.go
- struct_template_points.go
- struct_url.go
- types.go
- utils.go
- web.go
Directories ¶
Path | Synopsis |
---|---|
Package GoStruct - A framework for type agnostic and recursive data.
|
Package GoStruct - A framework for type agnostic and recursive data. |
gojson
Package gojson - generates go struct defintions from JSON documents
|
Package gojson - generates go struct defintions from JSON documents |
Click to show internal directories.
Click to hide internal directories.