Documentation ¶
Index ¶
- Constants
- Variables
- func MakeSignInRequest(deviceID, userID, accessToken string) (ocfCloud.CoapSignInRequest, error)
- func MakeSignUpRequest(deviceID, code, provider string) (ocfCloud.CoapSignUpRequest, error)
- type CAPool
- type CAPoolGetter
- type Config
- type Configuration
- type GetCAPool
- type GetCertificates
- type GetLinksFilteredBy
- type Manager
- func (c *Manager) Close()
- func (c *Manager) ExportConfig() Config
- func (c *Manager) Get(request *net.Request) (*pool.Message, error)
- func (c *Manager) Init()
- func (c *Manager) Post(request *net.Request) (*pool.Message, error)
- func (c *Manager) PublishResources(hrefs ...string)
- func (c *Manager) Reconnect()
- func (c *Manager) UnpublishResources(hrefs ...string)
- func (c *Manager) Unregister()
- type Option
- type OptionsCfg
- type RemoveCloudCAs
Constants ¶
View Source
const ProvisioningStatusDEREGISTERING cloud.ProvisioningStatus = "deregistering"
Variables ¶
View Source
var ( ErrCannotPublishResources = errors.New("cannot publish resources") ErrCannotUnpublishResources = errors.New("cannot unpublish resources") )
View Source
var ( ErrMissingAccessToken = errors.New("access token missing") ErrCannotSignIn = errors.New("cannot sign in") )
View Source
var ( ErrMissingAuthorizationCode = errors.New("authorization code missing") ErrMissingAuthorizationProvider = errors.New("authorization provider missing") ErrCannotSignUp = errors.New("cannot sign up") )
View Source
var ErrCannotRefreshToken = errors.New("cannot refresh token")
View Source
var ErrCannotSignOff = errors.New("cannot sign off")
Functions ¶
func MakeSignInRequest ¶
func MakeSignInRequest(deviceID, userID, accessToken string) (ocfCloud.CoapSignInRequest, error)
func MakeSignUpRequest ¶
func MakeSignUpRequest(deviceID, code, provider string) (ocfCloud.CoapSignUpRequest, error)
Types ¶
type CAPoolGetter ¶
type Configuration ¶
type Configuration struct { ResourceTypes []string `yaml:"-" json:"rt"` Interfaces []string `yaml:"-" json:"if"` Name string `yaml:"-" json:"n"` AuthorizationProvider string `yaml:"authorizationProvider" json:"apn"` CloudID string `yaml:"cloudID" json:"sid"` URL string `yaml:"cloudEndpoint" json:"cis"` LastErrorCode int `yaml:"-" json:"clec"` ProvisioningStatus cloud.ProvisioningStatus `yaml:"-" json:"cps"` AuthorizationCode string `yaml:"-" json:"-"` }
type GetCAPool ¶
type GetCAPool func() []*x509.Certificate
type GetCertificates ¶
type GetCertificates func(deviceID string) []tls.Certificate
type GetLinksFilteredBy ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func New ¶
func New(cfg Config, deviceID uuid.UUID, save func(), handler net.RequestHandler, getLinks GetLinksFilteredBy, caPool CAPoolGetter, loop *eventloop.Loop, opts ...Option) (*Manager, error)
func (*Manager) ExportConfig ¶
func (*Manager) PublishResources ¶ added in v2.4.1
func (*Manager) UnpublishResources ¶ added in v2.4.1
func (*Manager) Unregister ¶
func (c *Manager) Unregister()
type Option ¶
type Option func(*OptionsCfg)
func WithGetCertificates ¶
func WithGetCertificates(getCertificates GetCertificates) Option
func WithLogger ¶
func WithMaxMessageSize ¶
func WithRemoveCloudCAs ¶
func WithRemoveCloudCAs(removeCloudCA RemoveCloudCAs) Option
func WithTickInterval ¶ added in v2.4.3
type OptionsCfg ¶
type OptionsCfg struct {
// contains filtered or unexported fields
}
type RemoveCloudCAs ¶
type RemoveCloudCAs func(cloudID ...string)
Click to show internal directories.
Click to hide internal directories.