alerts

package
v0.0.0-...-c130b31 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const EVENTBILL_NEW = "/eventsbilling/content"
View Source
const (
	EVENTCONTAINER_NEW = "/eventscontainer/content"
)
View Source
const (
	EVENTSMARKETPLACES_NEW = "/eventsmarketplace/content"
)
View Source
const EVENTSOBCBUCKET = "events_for_obc"
View Source
const EVENTSTORAGE_NEW = "/eventsstorage/content"
View Source
const (
	EVENTSVM_NEW = "/eventsvm/content"
)

Variables

View Source
var Mailer map[string]string

Functions

This section is empty.

Types

type EventAction

type EventAction int
const (
	LAUNCHED EventAction = iota
	DESTROYED
	STATUS
	DEDUCT
	ONBOARD
	RESET
	INVITE
	BALANCE
	INVOICE
	BILLEDHISTORY
	TRANSACTION
	DESCRIPTION
	SNAPSHOTTING
	SNAPSHOTTED
	RUNNING
	FAILURE
	INSUFFICIENT_FUND
	QUOTA_UNPAID
	SKEWS_ACTIONS
	SKEWS_WARNING
)

func (*EventAction) String

func (v *EventAction) String() string

type EventData

type EventData struct {
	M map[string]string
	D []string
}

Extra information about an event.

type EventsBill

type EventsBill struct {
	EventType  string          `json:"event_type" cql:"event_type"`
	AccountId  string          `json:"account_id" cql:"account_id"`
	AssemblyId string          `json:"assembly_id" cql:"assembly_id"`
	Data       pairs.JsonPairs `json:"data" cql:"data"`
}

type EventsContainer

type EventsContainer struct {
	EventType  string          `json:"event_type" cql:"event_type"`
	AccountId  string          `json:"account_id" cql:"account_id"`
	AssemblyId string          `json:"assembly_id" cql:"assembly_id"`
	Data       pairs.JsonPairs `json:"data" cql:"data"`
}

type EventsMarketplace

type EventsMarketplace struct {
	EventType     string          `json:"event_type" cql:"event_type"`
	AccountId     string          `json:"account_id" cql:"account_id"`
	MarketplaceId string          `json:"marketplace_id" cql:"marketplace_id"`
	Data          pairs.JsonPairs `json:"data" cql:"data"`
}

type EventsObc

type EventsObc struct {
	Id        string    `json:"id" cql:"id"`
	EventType string    `json:"event_type" cql:"event_type"`
	AccountId string    `json:"account_id" cql:"account_id"`
	HostIp    string    `json:"host_ip" cql:"host_ip"`
	HostId    string    `json:"host_id" cql:"host_id"`
	Data      []string  `json:"data" cql:"data"`
	CreatedAt time.Time `json:"created_at" cql:"created_at"`
}

type EventsStorage

type EventsStorage struct {
	EventType string          `json:"event_type" cql:"event_type"`
	AccountId string          `json:"account_id" cql:"account_id"`
	Data      pairs.JsonPairs `json:"data" cql:"data"`
}

type EventsVm

type EventsVm struct {
	EventType  string          `json:"event_type" cql:"event_type"`
	AccountId  string          `json:"account_id" cql:"account_id"`
	AssemblyId string          `json:"assembly_id" cql:"assembly_id"`
	Data       pairs.JsonPairs `json:"data" cql:"data"`
}

type Notifier

type Notifier interface {
	Notify(eva EventAction, edata EventData) error
	// contains filtered or unexported methods
}

func NewApiArgs

func NewApiArgs(args map[string]string) Notifier

func NewInfobip

func NewInfobip(m map[string]string) Notifier

func NewMailer

func NewMailer(m map[string]string, n map[string]string) Notifier

func NewScylla

func NewScylla(m map[string]string) Notifier

func NewSlack

func NewSlack(m map[string]string) Notifier

type ObcEvents

type ObcEvents *[]EventsObc

type Scylla

type Scylla struct {
	Scylla_host     []string
	Scylla_keyspace string
	Scylla_username string
	Scylla_password string
}

func (*Scylla) GetEventsByEmail

func (s *Scylla) GetEventsByEmail(email string, limit int) (*[]EventsObc, error)

func (*Scylla) GetEventsByNodeId

func (s *Scylla) GetEventsByNodeId(email, id string, limit int) (*[]EventsObc, error)

func (*Scylla) Notify

func (s *Scylla) Notify(eva EventAction, edata EventData) error

func (*Scylla) NotifyOBC

func (s *Scylla) NotifyOBC(eva EventAction, edata EventData) error

type VerticeApi

type VerticeApi struct {
	Args api.ApiArgs
}

func (*VerticeApi) Notify

func (s *VerticeApi) Notify(eva EventAction, edata EventData) error

func (*VerticeApi) NotifyBill

func (v *VerticeApi) NotifyBill(eva EventAction, edata EventData) error

func (*VerticeApi) NotifyContainer

func (v *VerticeApi) NotifyContainer(eva EventAction, edata EventData) error

func (*VerticeApi) NotifyMarketplace

func (v *VerticeApi) NotifyMarketplace(eva EventAction, edata EventData) error

func (*VerticeApi) NotifyStorage

func (v *VerticeApi) NotifyStorage(eva EventAction, edata EventData) error

func (*VerticeApi) NotifyVm

func (v *VerticeApi) NotifyVm(eva EventAction, edata EventData) error

Jump to

Keyboard shortcuts

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