Documentation ¶
Index ¶
- type Dependency
- type File
- type GalleryImage
- type License
- type ModeratorMessage
- type PayoutData
- type Project
- func (project Project) CreateVersion(version Version, auth string) error
- func (project Project) GetLatestVersion() Version
- func (project Project) GetSpecificVersion(versionNumber string) Version
- func (project Project) GetVersions() []Version
- func (project Project) Modify(modified Project, auth string) error
- func (project *Project) Validate()
- type User
- type Version
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dependency ¶
type Dependency struct { VersionId string `json:"version_id"` ProjectId string `json:"project_id"` FileName string `json:"file_name"` DependencyType string `json:"dependency_type"` }
func (Dependency) GetVersion ¶
func (dep Dependency) GetVersion() Version
type GalleryImage ¶
type ModeratorMessage ¶
type PayoutData ¶
type Project ¶
type Project struct { Slug string `json:"slug"` Title string `json:"title"` Description string `json:"description"` Categories []string `json:"categories"` ClientSide string `json:"client_side"` ServerSide string `json:"server_side"` Body string `json:"body"` AdditionalCategories []string `json:"additional_categories"` IssuesUrl string `json:"issues_url"` SourceUrl string `json:"source_url"` WikiUrl string `json:"wiki_url"` DiscordUrl string `json:"discord_url"` DonationUrls []string `json:"donation_urls"` ProjectType string `json:"project_type"` Downloads int `json:"downloads"` IconUrl string `json:"icon_url"` Color int `json:"color"` Id string `json:"id"` Team string `json:"team"` ModeratorMessage ModeratorMessage `json:"moderator_message"` Published string `json:"published"` Updated string `json:"updated"` Approved string `json:"approved"` Followers int `json:"followers"` Status string `json:"status"` License License `json:"license"` Versions []string `json:"versions"` GameVersions []string `json:"game_versions"` Loaders []string `json:"loaders"` Gallery []GalleryImage `json:"gallery"` InitialVersions []map[string]any `json:"initial_versions"` // contains filtered or unexported fields }
func GetProject ¶
GetProject returns a Project Model of the project with a matching ID or slug with the one provided.
func (Project) CreateVersion ¶
func (Project) GetLatestVersion ¶
Gets the most recently created version of a project
func (Project) GetSpecificVersion ¶
Get the version of the given project whose semver string matches the given string
func (Project) GetVersions ¶
Gets all versions of a project
type User ¶
type User struct { Username string `json:"username"` Name string `json:"name"` Email string `json:"email"` Bio string `json:"bio"` PayoutData PayoutData `json:"payout_data"` Id string `json:"id"` GithubId int `json:"github_id"` AvatarUrl string `json:"avatar_url"` Created string `json:"created"` Role string `json:"role"` Badges int8 `json:"badges"` // contains filtered or unexported fields }
func GetUserFromAuth ¶
func (User) CreateProject ¶
type Version ¶
type Version struct { Name string `json:"name"` VersionNumber string `json:"version_number"` Changelog string `json:"changelog"` Dependencies []Dependency `json:"dependencies"` GameVersions []string `json:"game_versions"` VersionType string `json:"version_type"` Loaders []string `json:"loaders"` Featured bool `json:"featured"` Status string `json:"status"` RequestedStatus string `json:"requested_status"` Id string `json:"id"` ProjectId string `json:"project_id"` AuthorId string `json:"author_id"` DatePublished string `json:"date_published"` Downloads int `json:"downloads"` Files []File `json:"files"` FileParts []string `json:"file_parts"` }
func GetVersion ¶
Click to show internal directories.
Click to hide internal directories.