imageboard

package
v0.0.65 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: GPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

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"`
	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(fs afero.Fs, 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) 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 Jumper added in v0.0.59

type Jumper func(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