Documentation ¶
Overview ¶
Package hub provides privacy-preserving reverse geocoding and other backend services.
Copyright (c) 2018 - 2024 PhotoPrism UG. All rights reserved.
This program is free software: you can redistribute it and/or modify it under Version 3 of the GNU Affero General Public License (the "AGPL"): <https://docs.photoprism.app/license/agpl> This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. The AGPL is supplemented by our Trademark and Brand Guidelines, which describe how our Brand Assets may be used: <https://www.photoprism.app/trademark>
Feel free to send an email to hello@photoprism.app if you have questions, want to support our work, or just want to say hello.
Additional information can be found in our Developer Guide: <https://docs.photoprism.app/developer-guide/>
Index ¶
- Variables
- func ApiHost() string
- type Config
- func (c *Config) Customer() string
- func (c *Config) DecodeSession(cached bool) (Session, error)
- func (c *Config) Load() error
- func (c *Config) MapKey() string
- func (c *Config) Membership() string
- func (c *Config) Propagate()
- func (c *Config) ReSync(token string) (err error)
- func (c *Config) Sanitize()
- func (c *Config) Save() error
- func (c *Config) SendFeedback(f form.Feedback) (err error)
- func (c *Config) Sponsor() bool
- func (c *Config) Tier() int
- func (c *Config) Update() error
- type Feedback
- type Request
- type Session
- type Status
Constants ¶
This section is empty.
Variables ¶
var FeedbackURL = ServiceURL + "/%s/feedback"
var ServiceURL = "https://my.photoprism.app/v1/hello"
Functions ¶
Types ¶
type Config ¶
type Config struct { Version string `json:"version" yaml:"-"` FileName string `json:"-" yaml:"-"` Key string `json:"key" yaml:"Key"` Secret string `json:"secret" yaml:"Secret"` Session string `json:"session" yaml:"Session"` Status Status `json:"status" yaml:"Status"` Serial string `json:"serial" yaml:"Serial"` Env string `json:"-" yaml:"-"` UserAgent string `json:"-" yaml:"-"` PartnerID string `json:"-" yaml:"-"` // contains filtered or unexported fields }
Config represents backend api credentials for maps & geodata.
func (*Config) DecodeSession ¶
DecodeSession decodes backend api session data.
func (*Config) Membership ¶
Membership returns the membership level as string.
func (*Config) Propagate ¶
func (c *Config) Propagate()
Propagate updates backend api credentials in other packages.
func (*Config) Sanitize ¶
func (c *Config) Sanitize()
Sanitize verifies and sanitizes backend api credentials.
func (*Config) SendFeedback ¶
SendFeedback sends a feedback message.
type Feedback ¶
type Feedback struct { Category string `json:"Category"` Subject string `json:"Subject"` Message string `json:"Message"` UserName string `json:"UserName"` UserEmail string `json:"UserEmail"` UserAgent string `json:"UserAgent"` ApiKey string `json:"ApiKey"` ClientVersion string `json:"ClientVersion"` ClientSerial string `json:"ClientSerial"` ClientOS string `json:"ClientOS"` ClientArch string `json:"ClientArch"` ClientCPU int `json:"ClientCPU"` ClientEnv string `json:"ClientEnv"` PartnerID string `json:"PartnerID"` }
func NewFeedback ¶
NewFeedback creates a new hub feedback instance.
type Request ¶
type Request struct { ClientVersion string `json:"ClientVersion"` ClientSerial string `json:"ClientSerial"` ClientOS string `json:"ClientOS"` ClientArch string `json:"ClientArch"` ClientCPU int `json:"ClientCPU"` ClientEnv string `json:"ClientEnv"` PartnerID string `json:"PartnerID"` ApiToken string `json:"ApiToken"` }
Request represents basic environment specs for debugging.
func NewRequest ¶
NewRequest creates a new backend key request instance.