store

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromContent

func FromContent(kind types.Type, data []byte) *discordgo.File

FromContent creates a new discordgo.File attachment using the given MIME type and data

Types

type OSStore

type OSStore struct {
	// contains filtered or unexported fields
}

func NewOSStore

func NewOSStore(basePath string) (*OSStore, error)

func (*OSStore) Next

func (s *OSStore) Next() (*discordgo.File, error)

func (*OSStore) Store

func (s *OSStore) Store(_ context.Context, kind types.Type, data []byte) error

type Store

type Store interface {
	// Next advances the Store state and returns the next available image
	Next() (*discordgo.File, error)
	// Store stores a new image in the Store
	Store(ctx context.Context, kind types.Type, data []byte) error
}

Jump to

Keyboard shortcuts

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