Documentation ¶
Index ¶
- Constants
- Variables
- func AddUser(id int64) error
- func CloseDb() error
- func ConnectDb(connstr string) (e error)
- func DelUser(id int64) error
- func Exists(id int64) (bool, error)
- func ExistsConnector(name string) bool
- func InitDb(connstr string) error
- func InitGcm(config *GcmConfig) error
- func PushAll(user int64, message Message) (failures bool, errors map[string]error)
- type Connector
- type GcmConfig
- type Message
Constants ¶
View Source
const ( GcmDefaultMaxHttpConns = 5 GcmDefaultMaxSleepBeforeFail = 8 * time.Second )
View Source
const (
Version = 0
)
Variables ¶
View Source
var ( ErrUserNotExisting = errors.New("User does not exist") ErrUserExists = errors.New("User already exists") )
View Source
var ( GcmAlreadyExistent = errors.New("The given Registration ID is already present in the database") GcmAuthError = errors.New("The given GCM authkey is invalid. Check it twice.") GcmInternalServerError = errors.New("Internal server error.") GcmMessageTooLargeError = errors.New("Message is bigger than 4 KiBs (4096 bytes)") GcmTimeoutError = errors.New("Timeout or server unavailable.") GcmUnknownStatusError = errors.New("Unknown status. Fatal.") GcmWontTryAgain = errors.New("Connector has given up with message delivery") )
Functions ¶
func ExistsConnector ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.