models

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiQuerySuggestions

type ApiQuerySuggestions struct {
	Suggestions []MangaSuggestions `json:"suggestions"`
}

ApiQuerySuggestions is a struct used to manage a list of manga suggestions.

type DatabaseConfig

type DatabaseConfig struct {
	ConnectionString string
	MongoClient      *mongo.Database
	Ctx              context.Context
}

DatabaseConfig struct defines some properties that are used for databse coonfiguration.

type FeedSubs

type FeedSubs struct {
	// Internal ID assigned by MongoDB
	ID primitive.ObjectID `bson:"_id"`

	// URL of the Manga Feed
	URL string

	// Internal Code of the Manga Feed
	Code int

	// ID of the Chat subscribed
	ChatID int64

	// Id of the user subscribed (unused)
	UserID int
}

FeedSubs is a struct used to define a subscription to a manga feed.

type Job

type Job struct {
	DB *DatabaseConfig
}

Job is a struct that contains some properties that are used inside the CRON jobs

type MangaFeed

type MangaFeed struct {
	// Assigned identifier for the feed
	Code int

	// Name of the feed
	Name string

	// Feed's URL
	URL string
}

MangaFeed is a struct used to define feed's information internally.

type MangaSuggestions

type MangaSuggestions struct {
	// Refers to the encoded name
	// used to access the manga page
	Data string `json:"data"`

	// Title of the manga used as a
	// message to the user
	Value string `json:"value"`
}

MangaSuggestions is a struct used to describe a title queried by a user.

type MangaedenApiResponse

type MangaedenApiResponse struct {
	// (unused) Mangaeden's internal label
	Label string `json:"label"`

	// Manga URL in Mangaeden
	URL string `json:"url"`

	// Title of the manga
	Value string `json:"value"`
}

MangaedenApiResponse refers to the type of response that gets returned by the Mangaeden's API.

type ManganeloApiResponse

type ManganeloApiResponse struct {
	// Manganelo's internal ID for the manga
	ID string `json:"id"`

	// Encoded name of the manga, used in the
	// Manga's page
	IDEncode string `json:"id_encode"`

	// Title of the manga
	Name string `json:"name"`

	// Author of the manga
	Author string `json:"author"`

	// Last chapter published
	LastChapter string `json:"lastchapter"`
}

ManganeloApiResponse refers to the type of response that gets returned by the Manganelo API. Some of these properties are currently unused but I'm planning on doing something with them.

type MangareaderApiResponse

type MangareaderApiResponse struct {
	// Manga Reader's internal ID
	ID int64 `json:"id"`

	// Author of the manga
	Author string `json:"author"`

	// Title of the manga
	Name string `json:"name"`

	// Path to the manga URL
	NameUnsigned string `json:"nameunsigned"`
}

MangareaderApiResponse refers to the type of response that gets returned by the Manga Reader's API.

type Subscription

type Subscription struct {
	// Internal ID assiged by MongoDB
	ID primitive.ObjectID `bson:"_id"`

	// Id of the user who added the subscription
	UserID int

	// User name of the user who added the subscription
	UserName string

	// Name of the user who added the subscription
	FirstName string

	// ID of the chat the susbcription is being added on
	ChatID int64

	// Name of the manga
	MangaName string

	// URL to the manga
	MangaURL string

	// URL to the last chapter published for the manga
	LastChapterURL string

	// Feed this subscription belongs to
	MangaFeed int
}

Subscription is a struct used to define a manga subscription.

Jump to

Keyboard shortcuts

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