alfsrv

package
v0.0.0-...-8b1529d Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: BSD-3-Clause Imports: 25 Imported by: 0

Documentation

Overview

Package alfsrv provides a server to perform Bluesky posts to Mastodon posts conversion and validation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assoc

type Assoc struct {
	BskyUID  template.HTML
	MastoUID template.HTML
}
type Links struct {
	First template.URL
	Prev  template.URL
	Self  template.URL
	Next  template.URL
	Last  template.URL
}

type Media

type Media struct {
	ID      string
	Data    template.URL
	NumRows int
	Descr   template.HTML
	Focus   template.HTML
	MIME    string
}

func (Media) IsImage

func (m Media) IsImage() bool

type PageAssocs

type PageAssocs struct {
	User  template.HTML
	Title template.HTML
	CSRF  template.HTML
	Links Links

	NumAssocs int64
	Assocs    []Assoc
}

type PageFetch

type PageFetch struct {
	User  template.HTML
	CSRF  template.HTML
	Links Links

	Action template.URL
	Stream template.URL
}

type PageThread

type PageThread struct {
	User  template.HTML
	Title template.HTML
	CSRF  template.HTML
	Links Links

	NumToots int64
	Root     Toot
	Toots    []Toot
}

type PageThreads

type PageThreads struct {
	User  template.HTML
	Title template.HTML
	CSRF  template.HTML
	Links Links

	NumThreads int64
	Threads    []Thread
}

type Server

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

func NewServer

func NewServer(db *alfdb.DB) (*Server, error)

func (*Server) Close

func (srv *Server) Close() error

func (*Server) ServeHTTP

func (srv *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

type Thread

type Thread struct {
	Root    Toot
	Replies int
}

type Toot

type Toot struct {
	BskyID  string
	BskyPID string
	BskyRID string
	BskyURL template.URL

	CreatedAt string

	NumRows int
	Content template.HTML
	Medias  []Media
}

Jump to

Keyboard shortcuts

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