sys

package module
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

README

Fork GitHub Release Go Report Card

GitHub repo file or directory count GitHub code size in bytes GitHub repo size

Все переписывается, документация будет позже

Documentation

Index

Constants

View Source
const (
	GlobalName       string = "fReadSYS"
	GlobalDateUpdate string = "07-26-2024"
	GlobalHash       string = "befa1e1ef769878c3c37a1d2e590ae156edce5ae"

	GlobalVersion      string = "v0.0.14"
	GlobalVersionMajor string = "v0"
	GlobalVersionMinor uint16 = 0
	GlobalVersionPatch uint16 = 14
)

Variables

This section is empty.

Functions

func ChunkSize

func ChunkSize(totalSize int) (int, int)

Types

type BookObj

type BookObj struct {
	Domain DomainType     `json:"domain"` // хост-имя домена
	Author PersonalityObj `json:"author"` // Author pointer.

	Work     WorkObj      `json:"work"`     // information about the Work
	Size     SizesObj     `json:"size"`     // size of the Work
	Chapters []ChapterObj `json:"chapters"` //	chapters of the Work
}

type ChapterObj

type ChapterObj struct {
	Chapter PersonalityObj `json:"chapter"` // Chapter pointer.

	Timestamp TimesObj `json:"timestamp"` // Chapter timestamps.
	Size      SizesObj `json:"size"`      // size of the Chapter
	Hash      HashType `json:"hash"`      // checksum of the Chapter

	Data NormalisedTextType `json:"data"` // text of the Chapter
}

ChapterObj chapter content

type DataObj

type DataObj struct {
	IsCompress bool
	IsCrypt    bool
	Data       []byte
}

func ChunksToData

func ChunksToData(chunks []DataObj) (*DataObj, error)

func (*DataObj) Chunks

func (data *DataObj) Chunks() ([]DataObj, error)

func (*DataObj) Compress

func (data *DataObj) Compress() (*DataObj, error)

func (*DataObj) Decompress

func (data *DataObj) Decompress() (*DataObj, error)

func (*DataObj) Decrypt

func (data *DataObj) Decrypt(key string) (*DataObj, error)

func (*DataObj) Encrypt

func (data *DataObj) Encrypt(key string) (*DataObj, error)

type DomainType

type DomainType string

type FandomType

type FandomType string

type FocusTag

type FocusTag byte
const (
	FocusNil    FocusTag = 0 // Direction is not defined.
	FocusOthers FocusTag = 1 // Other. Does not fit any of the definitions.

	FocusJen      FocusTag = 50  // sexual relationships are not described or mentioned, nor do they play a decisive role.
	FocusGet      FocusTag = 100 // romantic and/or sexual relationships between a man and a woman.
	FocusSlash    FocusTag = 150 // romantic and/or sexual relationships between men.
	FocusFemSlash FocusTag = 200 // romantic and/or sexual relationships between women.
)

type HashType

type HashType string

type IntegrityChecksObj

type IntegrityChecksObj struct {
	Sign string // Подпись объекта, формируются из хешей и домена
	Hash string // Хеш-сумма объекта для проверки целостности
}

type LanguageType

type LanguageType string // Тим языка по ISO-639

type LoadWebDataType

type LoadWebDataType []byte

type NormalisedTextType

type NormalisedTextType []byte

type PersonType

type PersonType string

type PersonalityObj

type PersonalityObj struct {
	UID  UIDType `json:"uid"`  // UID в рамках домена
	Name string  `json:"name"` // Название/описание для UID
}

type RatingTag

type RatingTag byte
const (
	RatingNil RatingTag = 0 // Rating not determined.

	RatingG    RatingTag = 1   // General audiences. Nudity, sexual scenes, and drug use are absent; violence is minimal; expressions may be used that go beyond polite conversation, but only those commonly found in everyday speech.
	RatingPG   RatingTag = 2   // Parental guidance suggested. Explicit sexual scenes and drug use are absent; nudity, if present, is only very limited; mild profanity may be used and scenes of violence are presented, but only in very moderate amounts.
	RatingPG13 RatingTag = 3   // Parents strongly cautioned. May contain moderate or harsh violence; scenes of nudity may be present; there might be situations with a sexual context; some drug use scenes may occur; occasional use of coarse profanity is possible.
	RatingR    RatingTag = 50  // Restricted. An R rating may be assigned due to frequent use of obscene language, prolonged scenes of violence, sexual activity, or drug use.
	RatingNC17 RatingTag = 100 // No One 17 & Under Admitted. The film may contain explicit sexual scenes, a large amount of obscene and sexual language, or scenes of excessive violence. An NC-17 rating, however, does not imply that the film is obscene or pornographic in either the everyday or legal sense of these words.

	RatingUnlimited RatingTag = 200 // No restrictions, any deviations are possible.
)

type SizesObj

type SizesObj struct {
	Bytes   uint64
	Letters uint64
}

type StatusTag

type StatusTag byte
const (
	StatusNil StatusTag = 0 //Статус не определен

	StatusFull      StatusTag = 10  // Закончено
	StatusInProcess StatusTag = 100 // В процессе
	StatusFreeze    StatusTag = 200 // Заморожено
)

type TagType

type TagType string

type TimesObj

type TimesObj struct {
	Create time.Time
	Update time.Time
}

type UIDType

type UIDType string

type WorkObj

type WorkObj struct {
	Work PersonalityObj `json:"work"` // Work pointer.

	Language  LanguageType `json:"language"`  // Work language.
	Timestamp HashType     `json:"timestamp"` // Work timestamps.
	Hash      HashType     `json:"hash"`      // global checksum of the Work

	Tags       []TagType    `json:"tags"`       // теги
	Fandoms    []FandomType `json:"fandoms"`    // фендомы
	Personages []PersonType `json:"personages"` // персонажи

	Status StatusTag `json:"status"` // status of the Work
	Rating RatingTag `json:"rating"` // rating of the Work
	Focus  FocusTag  `json:"focus"`  // focus of the Work

	Description NormalisedTextType `json:"description"` // description of the Work
}

WorkObj Information about the work

Directories

Path Synopsis
data
paper
text
md
mdf

Jump to

Keyboard shortcuts

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