Documentation ¶
Index ¶
- Constants
- func Bounded(a, lower, upper int) int
- func Coalesce(times ...sql.NullTime) sql.NullTime
- func DepthFirstTraversalPrefixing(node TreeNode)
- func MaxInt(a, b int) int
- func MinInt(a, b int) int
- func NullTimeFrom(t *time.Time) sql.NullTime
- func Prefix(s string, prefix string) string
- func PusherUrl(host string, appKey string) string
- func RepositorySlugFromURL(repositoryURL string) (string, error)
- func UnmarshalPayload(data []byte, v interface{}) error
- type ConnectionEstablishedPayload
- type ErrorPayload
- type PusherClient
- func (p *PusherClient) Authenticate(ctx context.Context, channel string) (string, error)
- func (p *PusherClient) Close() error
- func (p *PusherClient) Expect(ctx context.Context, eventType string) (event PusherEvent, err error)
- func (p *PusherClient) NextEvent(ctx context.Context) (event PusherEvent, err error)
- func (p *PusherClient) Subscribe(ctx context.Context, channel string) (err error)
- func (p *PusherClient) Unsubscribe(ctx context.Context, channel string) error
- type PusherEvent
- type SubscribePayload
- type TreeNode
- type UnsubscribePayload
Constants ¶
View Source
const ( ConnectionEstablished = "pusher:connection_established" Error = "pusher:error" Subscribe = "pusher:subscribe" Unsubscribe = "pusher:unsubscribe" SubscriptionSucceeded = "pusher_internal:subscription_succeeded" PublicSubscriptionSucceeded = "pusher:subscription_succeeded" Ping = "pusher:ping" Pong = "pusher:pong" MemberAdded = "pusher_internal:member_added" MemberRemoved = "pusher_internal:member_removed" )
Variables ¶
This section is empty.
Functions ¶
func DepthFirstTraversalPrefixing ¶
func DepthFirstTraversalPrefixing(node TreeNode)
func RepositorySlugFromURL ¶
func UnmarshalPayload ¶
Types ¶
type ErrorPayload ¶
type PusherClient ¶
type PusherClient struct {
// contains filtered or unexported fields
}
func NewPusherClient ¶
func (*PusherClient) Authenticate ¶
func (*PusherClient) Close ¶
func (p *PusherClient) Close() error
func (*PusherClient) Expect ¶
func (p *PusherClient) Expect(ctx context.Context, eventType string) (event PusherEvent, err error)
func (*PusherClient) NextEvent ¶
func (p *PusherClient) NextEvent(ctx context.Context) (event PusherEvent, err error)
func (*PusherClient) Subscribe ¶
func (p *PusherClient) Subscribe(ctx context.Context, channel string) (err error)
func (*PusherClient) Unsubscribe ¶
func (p *PusherClient) Unsubscribe(ctx context.Context, channel string) error
type PusherEvent ¶
type PusherEvent struct { Event string `json:"event"` Channel string `json:"channel,omitempty"` Data json.RawMessage `json:"data"` }
type SubscribePayload ¶
type TreeNode ¶
type TreeNode interface { Children() []TreeNode Traversable() bool SetPrefix(prefix string) // meh. This forces us to pass a pointer to DepthFirstTraversal which is read only. }
func DepthFirstTraversal ¶
type UnsubscribePayload ¶
type UnsubscribePayload struct {
Channel string `json:"channel"`
}
Click to show internal directories.
Click to hide internal directories.