create

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2025 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultFlagSet

func DefaultFlagSet() *flag.FlagSet

func Run

func Run(ctx context.Context) error

func RunWithFlagSet

func RunWithFlagSet(ctx context.Context, fs *flag.FlagSet) error

func RunWithOptions

func RunWithOptions(ctx context.Context, opts *RunOptions) error

func RunWithOptionsAndResponse added in v0.0.7

func RunWithOptionsAndResponse(ctx context.Context, opts *RunOptions) (string, error)

Types

type Post added in v0.0.6

type Post struct {
	// The name of the go-activitypub account creating the post.
	AccountName string `json:"account_name"`
	// The body (content) of the message to post.
	Message string `json:"message"`
	// The URI of that the post is in reply to (optional).
	InReplyTo string `json:"in_reply_to,omitempty"`
}

type RunOptions

type RunOptions struct {
	// A registered sfomuseum/go-activitypub/database.AccountsDatabase URI.
	AccountsDatabaseURI string
	// A registered sfomuseum/go-activitypub/database.ActivitiesDatabase URI.
	ActivitiesDatabaseURI string
	// A registered sfomuseum/go-activitypub/database.FollowersDatabase URI.
	FollowersDatabaseURI string
	// A registered sfomuseum/go-activitypub/database.PostsDatabase URI.
	PostsDatabaseURI string
	// A registered sfomuseum/go-activitypub/database.PostTagsDatabase URI.
	PostTagsDatabaseURI string
	// A registered sfomuseum/go-activitypub/database.DeliveriesDatabase URI.
	DeliveriesDatabaseURI string
	// A registered sfomuseum/go-activitypub/queue/DeliveryQueue URI.
	DeliveryQueueURI string
	// The name of the go-activitypub account creating the post.
	AccountName string
	// The body (content) of the message to post.
	Message string
	// The URI of that the post is in reply to (optional).
	InReplyTo string
	// The maximum number of attempts to deliver the activity.
	MaxAttempts int
	// The operating mode for creating new posts. Valid options are: cli, lambda and invoke, where "lambda"
	// means to run as an AWS Lambda function and "invoke" means to invoke this tool as a specific Lambda function.
	Mode string
	// A valid aaronland/go-aws-lambda.LambdaFunction URI in the form of "lambda://FUNCTION_NAME}?region={AWS_REGION}&credentials={CREDENTIALS}".
	// This flag is required if the -mode flag is "invoke".
	LambdaFunctionURI string
	// Enable verbose (debug) logging.
	Verbose bool
	URIs    *uris.URIs
}

func OptionsFromFlagSet

func OptionsFromFlagSet(ctx context.Context, fs *flag.FlagSet) (*RunOptions, error)

Jump to

Keyboard shortcuts

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