slash

package
v0.18.7 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ID          = "slash"
	EndpointKey = "endpoint"
	TokenKey    = "token"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Shortcut

type Shortcut struct {
	Id          int32     `json:"id,omitempty"`
	CreatorId   int32     `json:"creator_id,omitempty"`
	CreatedTime time.Time `json:"created_time"`
	UpdatedTime time.Time `json:"updated_time"`
	RowStatus   any       `json:"row_status,omitempty"`
	Name        string    `json:"name,omitempty"`
	Link        string    `json:"link,omitempty"`
	Title       string    `json:"title,omitempty"`
	Tags        []string  `json:"tags,omitempty"`
	Description string    `json:"description,omitempty"`
	Visibility  any       `json:"visibility,omitempty"`
	ViewCount   int32     `json:"view_count,omitempty"`
	OGMetaData  struct {
		Title       string `json:"title,omitempty"`
		Description string `json:"description,omitempty"`
		Image       string `json:"image,omitempty"`
	} `json:"og_metadata"`
}

type Slash

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

func NewSlash

func NewSlash(endpoint string, token string) *Slash

func (*Slash) CreateShortcut

func (i *Slash) CreateShortcut(item Shortcut) error

func (*Slash) DeleteShortcut

func (i *Slash) DeleteShortcut(id int32) error

func (*Slash) GetShortcut

func (i *Slash) GetShortcut(id int32) (*Shortcut, error)

func (*Slash) ListShortcuts

func (i *Slash) ListShortcuts() ([]*Shortcut, error)

func (*Slash) UpdateShortcut

func (i *Slash) UpdateShortcut(item Shortcut) error

Jump to

Keyboard shortcuts

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