pastebinbee

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2020 License: AGPL-3.0 Imports: 2 Imported by: 4

README

Pastebinbee

This bee can post some text on pastebin as an action to some event.

You can get your api developer key from: http://pastebin.com/api

Configuration

Due to admin interface limitations here are available options for exposure and expiration of the paste:

  • exposure:
    • 0 - Public
    • 1 - Unlisted
    • 2 - Private
  • expire:
    • N - Never
    • 10M - 10 minutes
    • 1H - 1 hour
    • 1D - 1 day
    • 1W - 1 week
    • 2W - 2 weeks
    • 1M - 1 month
Options
"Bees": [
  {
    "Name": "Pastebin example",
    "Class": "pastebinbee",
    "Description": "This is example of pastebinbee",
    "Options": [
      {
        "Name": "api_dev_key",
        "Value": "API_DEVELOPER_KEY"
      }
    ]
  },
]
Actions
"Actions": [
{
  "Bee": "Paste",
  "Name": "post",
  "Options": [
    {
      "Name": "title",
      "Type": "string",
      "Value": "beehive"
    },
    {
      "Name": "content",
      "Type": "string",
      "Value": "testing beehive passed!"
    },
    {
      "Name": "expire",
      "Type": "string",
      "Value": "1H"
    },
    {
      "Name": "exposure",
      "Type": "string",
      "Value": "2"
    }
  ]
},
]

Documentation

Overview

Package pastebinbee is a Bee that can interface with Pastebin.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PastebinBee

type PastebinBee struct {
	bees.Bee
	// contains filtered or unexported fields
}

PastebinBee is a Bee that can interface with Pastebin.

func (*PastebinBee) Action

func (mod *PastebinBee) Action(action bees.Action) []bees.Placeholder

Action triggers the action passed to it.

func (*PastebinBee) ReloadOptions

func (mod *PastebinBee) ReloadOptions(options bees.BeeOptions)

ReloadOptions parses the config options and initializes the Bee.

func (*PastebinBee) Run

func (mod *PastebinBee) Run(eventChan chan bees.Event)

Run executes the Bee's event loop.

type PastebinBeeFactory

type PastebinBeeFactory struct {
	bees.BeeFactory
}

PastebinBeeFactory is a factory for PastebinBees.

func (*PastebinBeeFactory) Actions

func (factory *PastebinBeeFactory) Actions() []bees.ActionDescriptor

Actions describes the available actions provided by this Bee.

func (*PastebinBeeFactory) Description

func (factory *PastebinBeeFactory) Description() string

Description returns the description of this Bee.

func (*PastebinBeeFactory) Events

func (factory *PastebinBeeFactory) Events() []bees.EventDescriptor

Events describes the available events provided by this Bee.

func (*PastebinBeeFactory) ID

func (factory *PastebinBeeFactory) ID() string

ID returns the ID of this Bee.

func (*PastebinBeeFactory) Image

func (factory *PastebinBeeFactory) Image() string

Image returns the filename of an image for this Bee.

func (*PastebinBeeFactory) LogoColor

func (factory *PastebinBeeFactory) LogoColor() string

LogoColor returns the preferred logo background color (used by the admin interface).

func (*PastebinBeeFactory) Name

func (factory *PastebinBeeFactory) Name() string

Name returns the name of this Bee.

func (*PastebinBeeFactory) New

func (factory *PastebinBeeFactory) New(name, description string, options bees.BeeOptions) bees.BeeInterface

New returns a new Bee instance configured with the supplied options.

func (*PastebinBeeFactory) Options

func (factory *PastebinBeeFactory) Options() []bees.BeeOptionDescriptor

Options returns the options available to configure this Bee.

Jump to

Keyboard shortcuts

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