compass

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MaxTextLen is the maximum length of the text being sent.
	MaxTextLen = 2_000
)

Variables

View Source
var (
	// Tag is a singleton to get tags for messages.
	Tag = core.Tag{}
)

Functions

func New

func New(token AuthToken, opts ...Options) (core.Client, error)

New creates a new Client with the given token and optional Options.

func NewUploading

func NewUploading(file io.Reader, opts ...UploadingOptions) ht.MultipartFile

func NewWebhookHandler

func NewWebhookHandler(
	ctx context.Context,
	client *core.Client,
	commands ...command.Command,
) (command.Handler, error)

NewWebhookHandler create a new command.Handler that implements WebhookHandler.

Types

type AuthToken

type AuthToken = core.AuthToken

type Client

type Client = core.Client

Client is a Compass messanger bot API client.

type Command

type Command = core.Command

type CommandList

type CommandList = []Command

type FileNode

type FileNode = core.FileNode

type Fmt

type Fmt = core.Fmt

Fmt is a string wrapper to add additional formatting to the underlying string via corresponding methods.

type GroupList

type GroupList = []core.GroupList

type OptInt

type OptInt = api.OptInt

type Options

type Options = core.Options

type Pagination

type Pagination = core.Pagination

type UploadingOptions

type UploadingOptions = core.UploadingOptions

type UserList

type UserList = []core.UserList

type WebhookHandler

type WebhookHandler = api.WebhookHandler

type WebhookServer

type WebhookServer = api.WebhookServer

func NewWebhookServer

func NewWebhookServer(handler WebhookHandler, token AuthToken) (*WebhookServer, error)

NewWebhookServer creates a new WebhookServer with the given handler and token.

Directories

Path Synopsis
internal
api
Code generated by ogen, DO NOT EDIT.
Code generated by ogen, DO NOT EDIT.

Jump to

Keyboard shortcuts

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