app

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

get json from stdin and return json with v2 objects and v2 relations

Index

Constants

View Source
const AppDescription = "Hubspot data loader"
View Source
const AppName = "ds-load-hubspot"

Variables

This section is empty.

Functions

func Assets

func Assets() embed.FS

Types

type CLI

type CLI struct {
	Config          kong.ConfigFlag    `help:"Configuration file path" short:"c"`
	Version         VersionCmd         `cmd:"" help:"version information"`
	Fetch           FetchCmd           `cmd:"" help:"fetch hubspot data"`
	Transform       TransformCmd       `cmd:"" help:"transform hubspot data"`
	ExportTransform ExportTransportCmd `cmd:"" help:"export default transform template"`
	Exec            ExecCmd            `cmd:"" help:"fetch and transform hubspot data" default:"withargs"`
	GetRefreshToken GetTokenCmd        `cmd:"" help:"obtain a refresh token from hubspot"`
	Verbosity       int                `short:"v" type:"counter" help:"Use to increase output verbosity."`
}

type ExecCmd

type ExecCmd struct {
	FetchCmd
	TransformCmd
}

func (*ExecCmd) Run

func (cmd *ExecCmd) Run(ctx *cc.CommonCtx) error

type ExportTransportCmd

type ExportTransportCmd struct {
}

func (*ExportTransportCmd) Run

func (t *ExportTransportCmd) Run(ctx *cc.CommonCtx) error

type FetchCmd

type FetchCmd struct {
	ClientID           string `short:"i" help:"Hubspot Client ID" env:"HUBSPOT_CLIENT_ID"`
	ClientSecret       string `short:"s" help:"Hubspot Client Secret" env:"HUBSPOT_CLIENT_SECRET"`
	RefreshToken       string `short:"r" help:"Hubspot Refresh Token" env:"HUBSPOT_REFRESH_TOKEN"`
	PrivateAccessToken string `short:"p" help:"Hubspot Private Access Token" env:"HUBSPOT_PAT"`
	Contacts           bool   `help:"Retrieve Hubspot contacts" env:"HUBSPOT_CONTACTS" default:"false"`
	Companies          bool   `help:"Retrieve Hubspot companies" env:"HUBSPOT_COMPANIES" default:"false"`
}

func (*FetchCmd) Run

func (f *FetchCmd) Run(ctx *cc.CommonCtx) error

type GetTokenCmd

type GetTokenCmd struct {
	ClientID     string `short:"i" help:"Google Client ID" env:"GOOGLE_CLIENT_ID" required:""`
	ClientSecret string `short:"s" help:"Google Client Secret" env:"GOOGLE_CLIENT_SECRET" required:""`
	Port         int    `short:"p" help:"Port number to run callback server on" env:"GOOGLE_PORT" default:"8761"`
}

func (*GetTokenCmd) Run

func (cmd *GetTokenCmd) Run(ctx *kong.Context) error

type TransformCmd

type TransformCmd struct {
	Template string `name:"template" short:"t" env:"DS_TEMPLATE_FILE" help:"transformation template file path" type:"path" optional:""`
}

func (*TransformCmd) Run

func (t *TransformCmd) Run(kongContext *kong.Context) error

type VersionCmd

type VersionCmd struct {
}

func (*VersionCmd) Run

func (cmd *VersionCmd) Run() error

Jump to

Keyboard shortcuts

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