Documentation ¶
Index ¶
- Constants
- type Factory
- type IdWrapper
- type Iot
- func (this *Iot) GetAspectNode(id string) (result model.AspectNode, err error)
- func (this *Iot) GetCharacteristic(id string) (result model.Characteristic, err error)
- func (this *Iot) GetConcept(id string) (result model.Concept, err error)
- func (this *Iot) GetConceptIds() (ids []string, err error)
- func (this *Iot) GetDevice(_ devicerepository.Impersonate, id string) (result model.Device, err error)
- func (this *Iot) GetDeviceGroup(_ devicerepository.Impersonate, id string) (result model.DeviceGroup, err error)
- func (this *Iot) GetDeviceType(_ devicerepository.Impersonate, id string) (result model.DeviceType, err error)
- func (this *Iot) GetJson(token string, endpoint string, result interface{}) (err error)
- func (this *Iot) GetProtocol(_ devicerepository.Impersonate, id string) (result model.Protocol, err error)
- func (this *Iot) GetService(token devicerepository.Impersonate, device model.Device, serviceId string) (result model.Service, err error)
- func (this *Iot) GetToken(user string) (devicerepository.Impersonate, error)
- func (this *Iot) ListFunctions() (functionInfos []model.Function, err error)
- type OpenidToken
- type Provider
Constants ¶
View Source
const CacheExpiration = 60 * time.Second
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct { Config configuration.Config Cache *cache.Cache }
func (Factory) Get ¶
func (this Factory) Get(_ util.Config) devicerepository.RepoInterface
type Iot ¶
type Iot struct {
// contains filtered or unexported fields
}
func (*Iot) GetAspectNode ¶
func (this *Iot) GetAspectNode(id string) (result model.AspectNode, err error)
func (*Iot) GetCharacteristic ¶
func (this *Iot) GetCharacteristic(id string) (result model.Characteristic, err error)
func (*Iot) GetConceptIds ¶
func (*Iot) GetDevice ¶
func (this *Iot) GetDevice(_ devicerepository.Impersonate, id string) (result model.Device, err error)
func (*Iot) GetDeviceGroup ¶
func (this *Iot) GetDeviceGroup(_ devicerepository.Impersonate, id string) (result model.DeviceGroup, err error)
func (*Iot) GetDeviceType ¶
func (this *Iot) GetDeviceType(_ devicerepository.Impersonate, id string) (result model.DeviceType, err error)
func (*Iot) GetProtocol ¶
func (this *Iot) GetProtocol(_ devicerepository.Impersonate, id string) (result model.Protocol, err error)
func (*Iot) GetService ¶
func (this *Iot) GetService(token devicerepository.Impersonate, device model.Device, serviceId string) (result model.Service, err error)
func (*Iot) GetToken ¶
func (this *Iot) GetToken(user string) (devicerepository.Impersonate, error)
type OpenidToken ¶
type OpenidToken struct { AccessToken string `json:"access_token"` ExpiresIn float64 `json:"expires_in"` RefreshExpiresIn float64 `json:"refresh_expires_in"` RefreshToken string `json:"refresh_token"` TokenType string `json:"token_type"` RequestTime time.Time `json:"-"` }
func (*OpenidToken) EnsureAccess ¶
func (openid *OpenidToken) EnsureAccess(config configuration.Config) (token string, err error)
Click to show internal directories.
Click to hide internal directories.