astibranch

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: MIT Imports: 8 Imported by: 0

README

// TODO

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Key = flag.String("branch-key", "", "the Branch key")
)

Flags

Functions

This section is empty.

Types

type Client

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

Client represents the client

func New

func New(c Configuration) *Client

New creates a new client

func (c *Client) CreateLink(d *LinkData) (l Link, err error)

CreateLink creates a link

type Configuration

type Configuration struct {
	Key    string `toml:"key"`
	Sender astikit.HTTPSenderOptions
}

Configuration represents the lib's configuration

func FlagConfig

func FlagConfig() Configuration

FlagConfig generates a Configuration based on flags

type Error

type Error struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type ErrorPayload

type ErrorPayload struct {
	Error Error `json:"error"`
}
type Link struct {
	URL string `json:"url"`
}

type LinkData

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

func NewLinkData

func NewLinkData() *LinkData

func (*LinkData) MarshalJSON

func (d *LinkData) MarshalJSON() ([]byte, error)

func (*LinkData) SetCanonicalIdentifier

func (d *LinkData) SetCanonicalIdentifier(v string) *LinkData

func (*LinkData) SetCustom

func (d *LinkData) SetCustom(k string, v interface{}) *LinkData

func (*LinkData) SetTitle

func (d *LinkData) SetTitle(v string) *LinkData

type LinkPayload

type LinkPayload struct {
	BranchKey string    `json:"branch_key"`
	Data      *LinkData `json:"data"`
}

Jump to

Keyboard shortcuts

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