branch

package
v0.0.0-...-eec4b17 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APIEndpoint = "https://api2.branch.io/v1/url"

	EnvBranchKey = "BRANCH_KEY"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client represents a client that allows to interact with Branch.io APIs

func NewClient

func NewClient(cfg *Config) (*Client, error)

NewClient allows to build a new Client instance

func NewClientFromEnvVariables

func NewClientFromEnvVariables() (*Client, error)

NewClientFromEnvVariables allows to build a new Client instance from the environment variables

func (c *Client) CreateDynamicLink(apiKey string, config *types.LinkConfig) (string, error)

CreateDynamicLink allows to create a new dynamic link using the given link and request configurations

type Config

type Config struct {
	ApiKey string
}

Config contains the data used to build a new Client instance

func NewConfig

func NewConfig(apiKey string) *Config

NewConfig allows to build a new Config instance

func NewConfigFromEnvVariables

func NewConfigFromEnvVariables() (*Config, error)

NewConfigFromEnvVariables allows to build a new Config instance from the environment variables

type CreateLinkConfig

type CreateLinkConfig struct {
	*types.LinkConfig
}

func NewCreateLinkConfig

func NewCreateLinkConfig(linkConfig *types.LinkConfig) CreateLinkConfig

func (CreateLinkConfig) MarshalJSON

func (c CreateLinkConfig) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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