mirror of
https://github.com/MickMake/GoSungrow.git
synced 2025-03-31 16:08:04 +02:00
97 lines
2.1 KiB
Go
97 lines
2.1 KiB
Go
// Package AliSmsService
|
|
// API endpoints pulled from the sqlite database, (./assets/interface.db), contained within the Android app com.isolarcloud.manager
|
|
package AliSmsService
|
|
|
|
import (
|
|
"github.com/MickMake/GoSungrow/iSolarCloud/AliSmsService/msgDownwardStatusReceipt"
|
|
"github.com/MickMake/GoSungrow/iSolarCloud/api"
|
|
"github.com/MickMake/GoSungrow/iSolarCloud/api/GoStruct/output"
|
|
"fmt"
|
|
)
|
|
|
|
|
|
var _ api.Area = (*Area)(nil)
|
|
|
|
type Area api.AreaStruct
|
|
|
|
func init() {
|
|
// name := api.GetArea(Area{})
|
|
// fmt.Printf("Name: %s\n", name)
|
|
}
|
|
|
|
func Init(apiRoot api.Web) Area {
|
|
area := Area{
|
|
ApiRoot: apiRoot,
|
|
Name: api.GetArea(Area{}),
|
|
EndPoints: api.TypeEndPoints{
|
|
api.GetName(msgDownwardStatusReceipt.EndPoint{}): msgDownwardStatusReceipt.Init(apiRoot),
|
|
},
|
|
}
|
|
|
|
return area
|
|
}
|
|
|
|
// ****************************************
|
|
// Methods not scoped by api.EndPoint interface type
|
|
|
|
func GetAreaName() string {
|
|
return string(api.GetArea(Area{}))
|
|
}
|
|
|
|
func (a Area) GetEndPoint(name api.EndPointName) api.EndPoint {
|
|
var ret api.EndPoint
|
|
for _, e := range a.EndPoints {
|
|
if e.GetName() == name {
|
|
ret = e
|
|
break
|
|
}
|
|
}
|
|
return ret
|
|
}
|
|
|
|
// ****************************************
|
|
// Methods scoped by api.Area interface type
|
|
|
|
func (a Area) Init(apiRoot *api.Web) api.AreaStruct {
|
|
panic("implement me")
|
|
}
|
|
|
|
func (a Area) GetAreaName() api.AreaName {
|
|
return a.Name
|
|
}
|
|
|
|
func (a Area) GetEndPoints() api.TypeEndPoints {
|
|
for _, endpoint := range a.EndPoints {
|
|
fmt.Printf("endpoint: %v\n", endpoint)
|
|
}
|
|
return a.EndPoints
|
|
}
|
|
|
|
func (a Area) Call(name api.EndPointName) output.Json {
|
|
panic("implement me")
|
|
}
|
|
|
|
func (a Area) SetRequest(name api.EndPointName, ref interface{}) error {
|
|
panic("implement me")
|
|
}
|
|
|
|
func (a Area) GetRequest(name api.EndPointName) output.Json {
|
|
panic("implement me")
|
|
}
|
|
|
|
func (a Area) GetResponse(name api.EndPointName) output.Json {
|
|
panic("implement me")
|
|
}
|
|
|
|
func (a Area) GetData(name api.EndPointName) output.Json {
|
|
panic("implement me")
|
|
}
|
|
|
|
func (a Area) IsValid(name api.EndPointName) error {
|
|
panic("implement me")
|
|
}
|
|
|
|
func (a Area) GetError(name api.EndPointName) error {
|
|
panic("implement me")
|
|
}
|