imageboard

package
v0.0.80 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: GPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// Name is the board name
	Name = "Img"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BoardDelay    string            `json:"boardDelay"`
	Enabled       *atomic.Bool      `json:"enabled"`
	Directories   []string          `json:"directories"`
	DirectoryList []*ImageDirectory `json:"directoryList"`
	UseDiskCache  *atomic.Bool      `json:"useDiskCache"`
	UseMemCache   *atomic.Bool      `json:"useMemCache"`
	OnTimes       []string          `json:"onTimes"`
	OffTimes      []string          `json:"offTimes"`
	// contains filtered or unexported fields
}

Config ...

func (*Config) SetDefaults

func (c *Config) SetDefaults()

SetDefaults sets some Config defaults

type ImageBoard

type ImageBoard struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ImageBoard is a board for displaying image files

func New

func New(config *Config, logger *zap.Logger) (*ImageBoard, error)

New ...

func (*ImageBoard) Disable added in v0.0.8

func (i *ImageBoard) Disable()

Disable ...

func (*ImageBoard) Enable added in v0.0.8

func (i *ImageBoard) Enable()

Enable ...

func (*ImageBoard) Enabled

func (i *ImageBoard) Enabled() bool

Enabled ...

func (*ImageBoard) GetHTTPHandlers

func (i *ImageBoard) GetHTTPHandlers() ([]*board.HTTPHandler, error)

GetHTTPHandlers ...

func (*ImageBoard) GetRPCHandler added in v0.0.63

func (i *ImageBoard) GetRPCHandler() (string, http.Handler)

GetRPCHandler ...

func (*ImageBoard) HasPriority

func (i *ImageBoard) HasPriority() bool

HasPriority ...

func (*ImageBoard) InBetween added in v0.0.74

func (i *ImageBoard) InBetween() bool

InBetween ...

func (*ImageBoard) Name

func (i *ImageBoard) Name() string

Name ...

func (*ImageBoard) Render

func (i *ImageBoard) Render(ctx context.Context, canvas board.Canvas) error

Render ...

func (*ImageBoard) ScrollMode added in v0.0.29

func (i *ImageBoard) ScrollMode() bool

ScrollMode ...

func (*ImageBoard) SetJumper added in v0.0.59

func (i *ImageBoard) SetJumper(j Jumper)

SetJumper sets the jumper function

type ImageDirectory added in v0.0.69

type ImageDirectory struct {
	Directory string `json:"directory"`
	JumpOnly  bool   `json:"jumpOnly"`
}

ImageDirectory is a configurable directory of images

type Jumper added in v0.0.59

type Jumper func(ctx context.Context, boardName string) error

Jumper is a function that jumps to a board

type Server added in v0.0.63

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

Server ...

func (*Server) GetStatus added in v0.0.63

func (s *Server) GetStatus(ctx context.Context, req *emptypb.Empty) (*pb.StatusResp, error)

GetStatus ...

func (*Server) Jump added in v0.0.63

func (s *Server) Jump(ctx context.Context, req *pb.JumpReq) (*emptypb.Empty, error)

Jump ...

func (*Server) SetStatus added in v0.0.63

func (s *Server) SetStatus(ctx context.Context, req *pb.SetStatusReq) (*emptypb.Empty, error)

SetStatus ...

Jump to

Keyboard shortcuts

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