platform

package
v0.0.0-...-4347b6b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IOS        = sns.PlatformAPNS
	IOSSandbox = sns.PlatformAPNSSandbox
	Android    = sns.PlatformGCM
)

Ecosystem supported for a Platform.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List []*Platform

List is a collection of Platforms.

type Platform

type Platform struct {
	Active    bool
	AppID     uint64
	ARN       string
	Deleted   bool
	Ecosystem sns.Platform
	ID        uint64
	Name      string
	Scheme    string
	CreatedAt time.Time
	UpdatedAt time.Time
}

Platform represents an ecosystem like Android or iOS for user device management.

func (*Platform) Validate

func (p *Platform) Validate() error

Validate check for semantic correctness.

type QueryOptions

type QueryOptions struct {
	Active     *bool
	ARNs       []string
	AppIDs     []uint64
	Deleted    *bool
	Ecosystems []sns.Platform
	IDs        []uint64
}

QueryOptions to narrow-down platform queries.

type Service

type Service interface {
	service.Lifecycle

	Put(namespace string, platform *Platform) (*Platform, error)
	Query(namespace string, opts QueryOptions) (List, error)
}

Service for platform interactions.

func PostgresService

func PostgresService(db *sqlx.DB) Service

PostgresService returns a Postgres based Service implementation.

type ServiceMiddleware

type ServiceMiddleware func(Service) Service

ServiceMiddleware is a chainable behaviour modifier for Service.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL