common

package
v0.0.0-...-40571b5 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Verbose = 0

Functions

func E

func E(f string, a ...interface{})

func ExtractEmail

func ExtractEmail(from string) string

func ExtractMsgID

func ExtractMsgID(msgID string) string

func F

func F(f string, a ...interface{})

func L

func L(f string, a ...interface{})

func MsgIDToRawMsgID

func MsgIDToRawMsgID(msgid string, msgidbuf []byte) [16]byte

func PanicIf

func PanicIf(err interface{}, f string, a ...interface{})

Types

type Article

type Article struct {
	Headers textproto.MIMEHeader
	Body    []byte
	Refer   []string
}

func (*Article) Marshal

func (a *Article) Marshal() []byte

func (*Article) Unmarshal

func (a *Article) Unmarshal(rd io.Reader, headerOnly bool) error

type ArticleRef

type ArticleRef struct {
	Index    int
	RawMsgID [16]byte
	Offset   int64
	Length   int64
}

func (*ArticleRef) MsgID

func (ar *ArticleRef) MsgID() string

func (*ArticleRef) String

func (ar *ArticleRef) String() string

type BaseGroupInfo

type BaseGroupInfo struct {
	Name        string `json:",omitempty"`
	Desc        string `json:",omitempty"`
	Announce    string `json:",omitempty"`
	Posting     byte   `json:",omitempty"`
	MaxPostSize int64  `json:",omitempty"`
	MaxLives    int64  `json:",omitempty"`
	CreateTime  int64  `json:",omitempty"`
}

func (BaseGroupInfo) Diff

func (g BaseGroupInfo) Diff(g2 *BaseGroupInfo) string

type HighLowSlice

type HighLowSlice struct {
	MaxSize       int
	NoPurgeNotify bool
	// contains filtered or unexported fields
}

func (*HighLowSlice) Append

func (s *HighLowSlice) Append(v *ArticleRef) ([]*ArticleRef, int)

func (*HighLowSlice) Get

func (s *HighLowSlice) Get(i int) (*ArticleRef, bool)

func (*HighLowSlice) High

func (s *HighLowSlice) High() int

func (*HighLowSlice) Len

func (s *HighLowSlice) Len() int

func (*HighLowSlice) Low

func (s *HighLowSlice) Low() int

func (*HighLowSlice) Set

func (s *HighLowSlice) Set(i int, v *ArticleRef)

func (*HighLowSlice) Slice

func (s *HighLowSlice) Slice(i, j int, copy bool) (results []*ArticleRef, actualStart, actualEnd int)

func (*HighLowSlice) String

func (s *HighLowSlice) String() string

type ModInfo

type ModInfo struct {
	Email    string
	Password string
}

Directories

Path Synopsis
Package dateparse parses date-strings without knowing the format in advance, using a fast lex based approach to eliminate shotgun attempts.
Package dateparse parses date-strings without knowing the format in advance, using a fast lex based approach to eliminate shotgun attempts.

Jump to

Keyboard shortcuts

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