activitysmith

package module
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 7 Imported by: 0

README

ActivitySmith Go SDK

The ActivitySmith Go SDK provides convenient access to the ActivitySmith API from Go applications.

Documentation

See API reference.

Table of Contents

Installation

go get github.com/ActivitySmithHQ/activitysmith-go

Setup

package main

import (
	"log"

	activitysmithsdk "github.com/ActivitySmithHQ/activitysmith-go"
)

func main() {
	activitysmith, err := activitysmithsdk.New("YOUR_API_KEY")
	if err != nil {
		log.Fatal(err)
	}

	_ = activitysmith
}

Push Notifications

Send a Push Notification

Push notification example

Use activitysmith.Notifications.Send with either activitysmithsdk.PushNotificationInput for common notification fields or generated.PushNotificationRequest if you want full control over the generated model.

input := activitysmithsdk.PushNotificationInput{
	Title:   "New subscription 💸",
	Message: "Customer upgraded to Pro plan",
}

_, err := activitysmith.Notifications.Send(input)
if err != nil {
	log.Fatal(err)
}
Rich Push Notifications with Media

Rich push notification with image

input := activitysmithsdk.PushNotificationInput{
	Title:       "Homepage ready",
	Message:     "Your agent finished the redesign.",
	Media:       "https://cdn.example.com/output/homepage-v2.png",
	Redirection: "https://github.com/acme/web/pull/482",
}

_, err := activitysmith.Notifications.Send(input)
if err != nil {
	log.Fatal(err)
}

Send images, videos, or audio with your push notifications, press and hold to preview media directly from the notification, then tap through to open the linked content.

Rich push notification with audio

What will work:

  • direct image URL: .jpg, .png, .gif, etc.
  • direct audio file URL: .mp3, .m4a, etc.
  • direct video file URL: .mp4, .mov, etc.
  • URL that responds with a proper media Content-Type, even if the path has no extension
Actionable Push Notifications

Actionable push notification example

Actionable push notifications can open a URL on tap or trigger actions when someone long-presses the notification. Webhooks are executed by the ActivitySmith backend.

_, err := activitysmith.Notifications.Send(activitysmithsdk.PushNotificationInput{
	Title:       "New subscription 💸",
	Message:     "Customer upgraded to Pro plan",
	Redirection: "https://crm.example.com/customers/cus_9f3a1d",
	Actions: []activitysmithsdk.PushNotificationAction{
		activitysmithsdk.PushAction(
			"Open CRM Profile",
			"open_url",
			"https://crm.example.com/customers/cus_9f3a1d",
		),
		activitysmithsdk.PushAction(
			"Start Onboarding Workflow",
			"webhook",
			"https://hooks.example.com/activitysmith/onboarding/start",
			activitysmithsdk.PushActionMethod("POST"),
			activitysmithsdk.PushActionBody(map[string]interface{}{
				"customer_id": "cus_9f3a1d",
				"plan":        "pro",
			}),
		),
	},
})
if err != nil {
	log.Fatal(err)
}

Live Activities

There are five types of Live Activities:

  • stats: best for showing business numbers side by side, such as revenue, sales, new users, conversion, refunds, or any other value you want visible at a glance
  • metrics: best for live percentage values that change often, like server CPU, memory usage, disk usage, or error rate
  • segmented_progress: best for anything that moves through clear stages, like deployments, onboarding flows, backups, ETL pipelines, migrations, and AI agent runs
  • progress: best for tracking real-time progress with percentage, like tasks, backups, migrations, syncs, or uploads
  • alert: best for status updates, such as feature adoption, reactivation, onboarding blockers, incidents, escalations, and other operational states
Start & Update Live Activity

Use a stable streamKey to identify the metric, job, deployment, or system you want to keep visible. The first Stream(...) call starts the Live Activity. Later calls with the same streamKey update it.

Stats

Stats Live Activity stream example

activitysmith.LiveActivities.Stream(
	"sales-hourly",
	activitysmithsdk.LiveActivityStreamInput{
		Title:    "Sales",
		Subtitle: "last hour",
		Type:     "stats",
		Metrics: []activitysmithsdk.ActivityMetric{
			activitysmithsdk.Metric("Revenue", "$2430", activitysmithsdk.MetricColor("blue")),
			activitysmithsdk.Metric("Orders", "37", activitysmithsdk.MetricColor("green")),
			activitysmithsdk.Metric("Conversion", "4.8%", activitysmithsdk.MetricColor("magenta")),
			activitysmithsdk.Metric("Avg Order", "$65.68", activitysmithsdk.MetricColor("yellow")),
			activitysmithsdk.Metric("Refunds", "$84", activitysmithsdk.MetricColor("red")),
			activitysmithsdk.Metric("New Buyers", "18", activitysmithsdk.MetricColor("cyan")),
		},
	},
)
Metrics

Metrics Live Activity stream example

activitysmith.LiveActivities.Stream(
	"prod-web-1",
	activitysmithsdk.LiveActivityStreamInput{
		Title:    "Server Health",
		Subtitle: "prod-web-1",
		Type:     "metrics",
		Metrics: []activitysmithsdk.ActivityMetric{
			activitysmithsdk.Metric("CPU", 9, activitysmithsdk.MetricUnit("%")),
			activitysmithsdk.Metric("MEM", 45, activitysmithsdk.MetricUnit("%")),
		},
	},
)
Segmented Progress

Segmented Progress Live Activity stream example

activitysmith.LiveActivities.Stream(
	"nightly-backup",
	activitysmithsdk.LiveActivityStreamInput{
		Title:         "Nightly Backup",
		Subtitle:      "upload archive",
		Type:          "segmented_progress",
		NumberOfSteps: 3,
		CurrentStep:   2,
	},
)
Progress

Progress Live Activity stream example

activitysmith.LiveActivities.Stream(
	"search-reindex",
	activitysmithsdk.LiveActivityStreamInput{
		Title:      "Search Reindex",
		Subtitle:   "catalog-v2",
		Type:       "progress",
		Percentage: 42,
	},
)
Alert

Alert Live Activity stream example

activitysmith.LiveActivities.Stream(
	"customer-ops",
	activitysmithsdk.LiveActivityStreamInput{
		Title:   "Reactivation",
		Message: "Lumen came back after 2 weeks",
		Type:    activitysmithsdk.LiveActivityTypeAlert,
		Icon:    activitysmithsdk.AlertIcon("cloud.sun", "yellow"),
		Badge:   activitysmithsdk.AlertBadge("Customer", "magenta"),
	},
)
End Live Activity

Call EndStream(...) with the same streamKey to dismiss the Live Activity. You can include final values before it is removed. By default, iOS removes the Live Activity after two minutes. Set AutoDismissMinutes to choose a different dismissal time, including 0 for immediate dismissal.

activitysmith.LiveActivities.EndStream(
	"prod-web-1",
	activitysmithsdk.LiveActivityStreamEndInput{
		Title:    "Server Health",
		Subtitle: "prod-web-1",
		Type:     "metrics",
		Metrics: []activitysmithsdk.ActivityMetric{
			activitysmithsdk.Metric("CPU", 7, activitysmithsdk.MetricUnit("%")),
			activitysmithsdk.Metric("MEM", 38, activitysmithsdk.MetricUnit("%")),
		},
		AutoDismissMinutes: 2,
	},
)
Live Activity Action

Live Activities can include one optional action button. Use it to open a URL from the Live Activity or trigger a backend webhook. For Alert Live Activities, set Color to tint the action button. The icon and badge colors only affect the icon and badge.

Live Activity with action button

Open URL action
activitysmith.LiveActivities.Stream(
	"prod-web-1",
	activitysmithsdk.LiveActivityStreamInput{
		Title:    "Server Health",
		Subtitle: "prod-web-1",
		Type:     "metrics",
		Metrics: []activitysmithsdk.ActivityMetric{
			activitysmithsdk.Metric("CPU", 76, activitysmithsdk.MetricUnit("%")),
			activitysmithsdk.Metric("MEM", 52, activitysmithsdk.MetricUnit("%")),
		},
		Action: &activitysmithsdk.LiveActivityActionInput{
			Title: "Open Dashboard",
			Type:  "open_url",
			URL:   "https://ops.example.com/servers/prod-web-1",
		},
	},
)
Webhook action
activitysmith.LiveActivities.Stream(
	"search-reindex",
	activitysmithsdk.LiveActivityStreamInput{
		Title:         "Reindexing product search",
		Subtitle:      "Shard 7 of 12",
		Type:          "segmented_progress",
		NumberOfSteps: 12,
		CurrentStep:   7,
		Action: &activitysmithsdk.LiveActivityActionInput{
			Title:  "Pause Reindex",
			Type:   "webhook",
			URL:    "https://ops.example.com/hooks/search/reindex/pause",
			Method: "POST",
			Body: map[string]interface{}{
				"job_id":       "reindex-2026-03-19",
				"requested_by": "activitysmith-go",
			},
		},
	},
)
Icons and Badges

Add more context to Live Activities with icons and badges.

Icon

Supported Live Activity types: stats, metrics, progress, segmented_progress, and alert.

Metrics Live Activity with an SF Symbol icon on the iPhone Lock Screen

activitysmith.LiveActivities.Stream(
	"prod-web-1",
	activitysmithsdk.LiveActivityStreamInput{
		Title:    "Server Health",
		Subtitle: "prod-web-1",
		Type:     "metrics",
		Icon:     activitysmithsdk.AlertIcon("server.rack", "blue"),
		Metrics: []activitysmithsdk.ActivityMetric{
			activitysmithsdk.Metric("CPU", 18, activitysmithsdk.MetricUnit("%")),
			activitysmithsdk.Metric("MEM", 42, activitysmithsdk.MetricUnit("%")),
		},
	},
)

The Icon symbol value is an Apple SF Symbol name. Browse the catalog with one of these tools:

  • ActivitySmith app - Open Settings -> SF Symbols to browse 45 hand-picked icons ready to use
  • SF Symbols - Apple's official macOS app
  • Interactful - free third-party iOS app listing all SF Symbols under Foundations -> Iconography
Badge

Badges are supported by alert, progress, and segmented_progress Live Activities.

Progress Live Activity with a badge on the iPhone Lock Screen

activitysmith.LiveActivities.Stream(
	"nightly-database-backup",
	activitysmithsdk.LiveActivityStreamInput{
		Title:      "Nightly Database Backup",
		Subtitle:   "verify restore",
		Type:       "progress",
		Badge:      activitysmithsdk.AlertBadge("S3", "cyan"),
		Percentage: 62,
	},
)
Live Activity Colors

Choose from these colors for the Live Activity accent, including progress bars and action buttons, or apply them to an individual icon or badge:

lime, green, cyan, blue, purple, magenta, red, orange, yellow, gray

Channels

Channels are used to target specific team members or devices. Can be used for both push notifications and live activities.

request := generated.NewPushNotificationRequest("New subscription 💸")
request.SetMessage("Customer upgraded to Pro plan")
request.SetTarget(generated.ChannelTarget{Channels: []string{"sales", "customer-success"}}) // Optional

_, err := activitysmith.Notifications.Send(request)
if err != nil {
	log.Fatal(err)
}

Widgets

Lock screen widgets

ActivitySmith lets you display any value on your Lock Screen with widgets - SaaS metrics, revenue, signups, uptime, habits, or anything else you want to track. Create a metric in the web app, then update the metric value using our API, add a widget to your lock screen and it will fetch the latest update automatically.

Create widget metric

_, err := activitysmith.Metrics.Update("deploy.success_rate", 99.9)
if err != nil {
	log.Fatal(err)
}

String metric values work too.

_, err = activitysmith.Metrics.Update("prod.status", "healthy")
if err != nil {
	log.Fatal(err)
}

Error Handling

SDK methods return (response, error). Always check error on each call.

Requirements

  • Go 1.22+

License

MIT

Documentation

Index

Constants

View Source
const (
	LiveActivityTypeSegmentedProgress = "segmented_progress"
	LiveActivityTypeProgress          = "progress"
	LiveActivityTypeMetrics           = "metrics"
	LiveActivityTypeStats             = "stats"
	LiveActivityTypeAlert             = "alert"
)
View Source
const Version = "1.5.0"

Variables

View Source
var ErrAPIKeyRequired = errors.New("activitysmith: apiKey is required")
View Source
var ErrPushNotificationMediaActionsConflict = errors.New("activitysmith: media cannot be combined with actions")

Functions

func NewActivityMetric added in v1.3.0

func NewActivityMetric(label string, value any, options ...ActivityMetricOption) (generated.ActivityMetric, error)

Types

type ActivityMetric added in v1.4.0

type ActivityMetric = generated.ActivityMetric

func Metric added in v1.4.0

func Metric(label string, value any, options ...ActivityMetricOption) ActivityMetric

type ActivityMetricOption added in v1.3.0

type ActivityMetricOption func(*generated.ActivityMetric)

func MetricColor added in v1.4.0

func MetricColor(color string) ActivityMetricOption

func MetricUnit added in v1.4.0

func MetricUnit(unit string) ActivityMetricOption

func WithActivityMetricColor added in v1.3.0

func WithActivityMetricColor(color string) ActivityMetricOption

func WithActivityMetricUnit added in v1.3.0

func WithActivityMetricUnit(unit string) ActivityMetricOption

type Client

type Client struct {
	Notifications  *NotificationsService
	LiveActivities *LiveActivitiesService
	Metrics        *MetricsService
	// contains filtered or unexported fields
}

func New

func New(apiKey string, opts ...*Options) (*Client, error)

func (*Client) APIClient

func (c *Client) APIClient() *generated.APIClient

func (*Client) Context

func (c *Client) Context() context.Context

type LiveActivitiesService

type LiveActivitiesService struct {
	// contains filtered or unexported fields
}

func (*LiveActivitiesService) End

func (*LiveActivitiesService) EndLiveActivity

func (*LiveActivitiesService) EndLiveActivityStream added in v1.1.0

func (*LiveActivitiesService) EndStream added in v1.1.0

func (*LiveActivitiesService) ReconcileLiveActivityStream added in v1.1.0

func (s *LiveActivitiesService) ReconcileLiveActivityStream(streamKey string, request generated.LiveActivityStreamRequest) (*generated.LiveActivityStreamPutResponse, error)

func (*LiveActivitiesService) Start

func (*LiveActivitiesService) StartLiveActivity

Backward-compatible aliases.

func (*LiveActivitiesService) Stream added in v1.1.0

func (*LiveActivitiesService) Update

func (*LiveActivitiesService) UpdateLiveActivity

type LiveActivityActionInput added in v1.0.0

type LiveActivityActionInput struct {
	Title  string
	Type   string
	URL    string
	Method string
	Body   map[string]interface{}
}

LiveActivityActionInput is a handwritten DX input for the optional Live Activity button.

type LiveActivityAlertBadgeInput added in v1.5.0

type LiveActivityAlertBadgeInput struct {
	Title string
	Color string
}

func AlertBadge added in v1.5.0

func AlertBadge(title string, color ...string) LiveActivityAlertBadgeInput

type LiveActivityAlertIconInput added in v1.5.0

type LiveActivityAlertIconInput struct {
	Symbol string
	Color  string
}

func AlertIcon added in v1.5.0

func AlertIcon(symbol string, color ...string) LiveActivityAlertIconInput

type LiveActivityContentStateInput added in v1.4.0

type LiveActivityContentStateInput struct {
	Title              string
	NumberOfSteps      int32
	CurrentStep        int32
	Percentage         float32
	Value              float32
	UpperLimit         float32
	Type               string
	Subtitle           string
	Message            string
	Icon               LiveActivityAlertIconInput
	Badge              LiveActivityAlertBadgeInput
	Color              string
	StepColor          string
	AutoDismissMinutes int32
	Metrics            []ActivityMetric
	// contains filtered or unexported fields
}

LiveActivityContentStateInput keeps the visible Live Activity state separate from top-level routing fields such as action and channels.

func (LiveActivityContentStateInput) WithAutoDismissMinutes added in v1.4.0

func (LiveActivityContentStateInput) WithCurrentStep added in v1.6.0

func (LiveActivityContentStateInput) WithNumberOfSteps added in v1.4.0

func (LiveActivityContentStateInput) WithPercentage added in v1.4.0

func (LiveActivityContentStateInput) WithUpperLimit added in v1.4.0

func (LiveActivityContentStateInput) WithValue added in v1.4.0

type LiveActivityEndInput added in v0.1.1

type LiveActivityEndInput struct {
	ActivityID         string
	ContentState       LiveActivityContentStateInput
	Title              string
	CurrentStep        int32
	Percentage         float32
	Value              float32
	UpperLimit         float32
	Type               string
	Subtitle           string
	Message            string
	Icon               LiveActivityAlertIconInput
	Badge              LiveActivityAlertBadgeInput
	Color              string
	StepColor          string
	NumberOfSteps      int32
	AutoDismissMinutes int32
	Metrics            []generated.ActivityMetric
	Action             *LiveActivityActionInput
	// contains filtered or unexported fields
}

LiveActivityEndInput is a handwritten DX input with plain optional values.

func (LiveActivityEndInput) WithAction added in v1.0.0

func (LiveActivityEndInput) WithAutoDismissMinutes added in v0.1.1

func (in LiveActivityEndInput) WithAutoDismissMinutes(v int32) LiveActivityEndInput

WithAutoDismissMinutes forces inclusion of auto_dismiss_minutes, including explicit zero.

func (LiveActivityEndInput) WithCurrentStep added in v1.6.0

func (in LiveActivityEndInput) WithCurrentStep(v int32) LiveActivityEndInput

func (LiveActivityEndInput) WithNumberOfSteps added in v0.1.1

func (in LiveActivityEndInput) WithNumberOfSteps(v int32) LiveActivityEndInput

WithNumberOfSteps forces inclusion of number_of_steps, including explicit zero.

func (LiveActivityEndInput) WithPercentage added in v0.1.7

func (in LiveActivityEndInput) WithPercentage(v float32) LiveActivityEndInput

WithPercentage forces inclusion of percentage, including explicit zero.

func (LiveActivityEndInput) WithUpperLimit added in v0.1.7

func (in LiveActivityEndInput) WithUpperLimit(v float32) LiveActivityEndInput

WithUpperLimit forces inclusion of upper_limit, including explicit zero.

func (LiveActivityEndInput) WithValue added in v0.1.7

WithValue forces inclusion of value, including explicit zero.

type LiveActivityStartInput added in v0.1.1

type LiveActivityStartInput struct {
	ContentState  LiveActivityContentStateInput
	Title         string
	NumberOfSteps int32
	CurrentStep   int32
	Percentage    float32
	Value         float32
	UpperLimit    float32
	Type          string
	Subtitle      string
	Message       string
	Icon          LiveActivityAlertIconInput
	Badge         LiveActivityAlertBadgeInput
	Color         string
	StepColor     string
	Metrics       []generated.ActivityMetric
	Action        *LiveActivityActionInput
	Channels      []string
	// contains filtered or unexported fields
}

LiveActivityStartInput is a handwritten DX input with plain optional values.

func (LiveActivityStartInput) WithAction added in v1.0.0

func (LiveActivityStartInput) WithCurrentStep added in v1.6.0

func (in LiveActivityStartInput) WithCurrentStep(v int32) LiveActivityStartInput

func (LiveActivityStartInput) WithNumberOfSteps added in v0.1.7

func (in LiveActivityStartInput) WithNumberOfSteps(v int32) LiveActivityStartInput

WithNumberOfSteps forces inclusion of number_of_steps, including explicit zero.

func (LiveActivityStartInput) WithPercentage added in v0.1.7

WithPercentage forces inclusion of percentage, including explicit zero.

func (LiveActivityStartInput) WithUpperLimit added in v0.1.7

WithUpperLimit forces inclusion of upper_limit, including explicit zero.

func (LiveActivityStartInput) WithValue added in v0.1.7

WithValue forces inclusion of value, including explicit zero.

type LiveActivityStreamEndInput added in v1.1.0

type LiveActivityStreamEndInput struct {
	ContentState  LiveActivityContentStateInput
	Title         string
	NumberOfSteps int32
	CurrentStep   int32
	Percentage    float32
	Value         float32
	UpperLimit    float32
	Type          string
	Subtitle      string
	Message       string
	Icon          LiveActivityAlertIconInput
	Badge         LiveActivityAlertBadgeInput
	Color         string
	StepColor     string
	Metrics       []generated.ActivityMetric
	Action        *LiveActivityActionInput
	Alert         *generated.AlertPayload
	// contains filtered or unexported fields
}

LiveActivityStreamEndInput is an optional payload for ending a managed stream.

func (LiveActivityStreamEndInput) WithAction added in v1.1.0

func (LiveActivityStreamEndInput) WithCurrentStep added in v1.6.0

func (LiveActivityStreamEndInput) WithNumberOfSteps added in v1.1.0

func (LiveActivityStreamEndInput) WithPercentage added in v1.1.0

func (LiveActivityStreamEndInput) WithUpperLimit added in v1.1.0

func (LiveActivityStreamEndInput) WithValue added in v1.1.0

type LiveActivityStreamInput added in v1.1.0

type LiveActivityStreamInput struct {
	ContentState  LiveActivityContentStateInput
	Title         string
	NumberOfSteps int32
	CurrentStep   int32
	Percentage    float32
	Value         float32
	UpperLimit    float32
	Type          string
	Subtitle      string
	Message       string
	Icon          LiveActivityAlertIconInput
	Badge         LiveActivityAlertBadgeInput
	Color         string
	StepColor     string
	Metrics       []generated.ActivityMetric
	Action        *LiveActivityActionInput
	Alert         *generated.AlertPayload
	Channels      []string
	// contains filtered or unexported fields
}

LiveActivityStreamInput is a handwritten DX input with plain optional values.

func (LiveActivityStreamInput) WithAction added in v1.1.0

func (LiveActivityStreamInput) WithCurrentStep added in v1.6.0

func (LiveActivityStreamInput) WithNumberOfSteps added in v1.1.0

func (in LiveActivityStreamInput) WithNumberOfSteps(v int32) LiveActivityStreamInput

func (LiveActivityStreamInput) WithPercentage added in v1.1.0

func (LiveActivityStreamInput) WithUpperLimit added in v1.1.0

func (LiveActivityStreamInput) WithValue added in v1.1.0

type LiveActivityUpdateInput added in v0.1.1

type LiveActivityUpdateInput struct {
	ActivityID    string
	ContentState  LiveActivityContentStateInput
	Title         string
	CurrentStep   int32
	Percentage    float32
	Value         float32
	UpperLimit    float32
	Type          string
	Subtitle      string
	Message       string
	Icon          LiveActivityAlertIconInput
	Badge         LiveActivityAlertBadgeInput
	Color         string
	StepColor     string
	NumberOfSteps int32
	Metrics       []generated.ActivityMetric
	Action        *LiveActivityActionInput
	// contains filtered or unexported fields
}

LiveActivityUpdateInput is a handwritten DX input with plain optional values.

func (LiveActivityUpdateInput) WithAction added in v1.0.0

func (LiveActivityUpdateInput) WithCurrentStep added in v1.6.0

func (LiveActivityUpdateInput) WithNumberOfSteps added in v0.1.1

func (in LiveActivityUpdateInput) WithNumberOfSteps(v int32) LiveActivityUpdateInput

WithNumberOfSteps forces inclusion of number_of_steps, including explicit zero.

func (LiveActivityUpdateInput) WithPercentage added in v0.1.7

WithPercentage forces inclusion of percentage, including explicit zero.

func (LiveActivityUpdateInput) WithUpperLimit added in v0.1.7

WithUpperLimit forces inclusion of upper_limit, including explicit zero.

func (LiveActivityUpdateInput) WithValue added in v0.1.7

WithValue forces inclusion of value, including explicit zero.

type MetricValueInput added in v1.2.0

type MetricValueInput struct {
	Value     any
	Timestamp *time.Time
}

type MetricsService added in v1.2.0

type MetricsService struct {
	// contains filtered or unexported fields
}

func (*MetricsService) Update added in v1.2.0

func (*MetricsService) UpdateMetricValue added in v1.2.0

Backward-compatible alias.

type NotificationsService

type NotificationsService struct {
	// contains filtered or unexported fields
}

func (*NotificationsService) Send

func (*NotificationsService) SendPushNotification

Backward-compatible alias.

type Options

type Options struct {
	Context context.Context
}

type PushNotificationAction added in v1.4.0

type PushNotificationAction = generated.PushNotificationAction

func PushAction added in v1.4.0

func PushAction(title string, type_ string, url string, options ...PushNotificationActionOption) PushNotificationAction

type PushNotificationActionOption added in v1.4.0

type PushNotificationActionOption func(*generated.PushNotificationAction)

func PushActionBody added in v1.4.0

func PushActionBody(body map[string]interface{}) PushNotificationActionOption

func PushActionMethod added in v1.4.0

func PushActionMethod(method string) PushNotificationActionOption

type PushNotificationInput added in v0.1.1

type PushNotificationInput struct {
	Title       string
	Message     string
	Subtitle    string
	Media       string
	Redirection string
	Actions     []PushNotificationAction
	Channels    []string
}

PushNotificationInput is a handwritten DX input with plain optional values.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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