package module
Version: v0.0.3 Latest Latest

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

Go to latest
Published: Apr 21, 2021 License: Apache-2.0 Imports: 6 Imported by: 0






View Source
const (
	ListmonkProd    = ""
	ListmonkTesting = ""

	MailingList_Console   = "06a84456-bfdf-4edf-97c1-7e7d4ad48f67"
	MailingList_KubeDB    = "a5f00cb2-f398-4408-a13a-28b6db8a32ba"
	MailingList_Kubeform  = "cd797afa-04d4-45c8-86e0-642a59b2d7f4"
	MailingList_KubeVault = "b0a46c28-43c3-4048-8059-c3897474b577"
	MailingList_Stash     = "3ab3161e-d02c-42cf-ad96-bb406620d693"
	MailingList_Voyager   = "6c6d1338-bb38-40f6-bab4-ff09c2f6e184"


This section is empty.


This section is empty.


type Client

type Client struct {
	// contains filtered or unexported fields

func New

func New(host, username, password string) *Client

func (*Client) CreateList

func (c *Client) CreateList(req MailingListRequest) (*MailingList, error)

func (*Client) CreateListIfMissing

func (c *Client) CreateListIfMissing(req MailingListRequest) (*MailingList, error)

func (*Client) GetAllLists

func (c *Client) GetAllLists() ([]MailingList, error)

func (*Client) SubscribeToList

func (c *Client) SubscribeToList(req SubscribeRequest) error

type GetMailingListResponse

type GetMailingListResponse struct {
	Data MailingList `json:"data"`

type ListMailingListResponse

type ListMailingListResponse struct {
	Data ListMailingListResponsePage `json:"data"`

type ListMailingListResponsePage

type ListMailingListResponsePage struct {
	Results []MailingList `json:"results"`
	Total   int           `json:"total"`
	PerPage int           `json:"per_page"`
	Page    int           `json:"page"`

type ListType

type ListType string
const (
	ListTypePrivate ListType = "private"
	ListTypePublic  ListType = "public"

type MailingList

type MailingList struct {
	ID              int       `json:"id"`
	CreatedAt       time.Time `json:"created_at"`
	UpdatedAt       time.Time `json:"updated_at"`
	UUID            string    `json:"uuid"`
	Name            string    `json:"name"`
	Type            ListType  `json:"type"`
	Optin           OptinMode `json:"optin"`
	Tags            []string  `json:"tags,omitempty"`
	SubscriberCount int       `json:"subscriber_count"`

type MailingListRequest

type MailingListRequest struct {
	Name  string    `json:"name"`
	Type  ListType  `json:"type"`
	Optin OptinMode `json:"optin"`
	Tags  []string  `json:"tags,omitempty"`

type OptinMode

type OptinMode string
const (
	OptinModeSingle OptinMode = "single"
	OptinModeDouble OptinMode = "double"

type SubscribeRequest

type SubscribeRequest struct {
	Email        string
	Name         string
	MailingLists []string

Source Files


Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL