Add comprehensive godoc documentation to all exported symbols

- Document all exported types, functions, methods, and constants across 52 files
- Add package-level doc comments to client, models, utils, and ynison packages
- Document HTTP method and endpoint path for each API client method
- Document model struct fields and DeJSON/DeList/ToJSON/ToMap methods
- Fix duplicate package doc comment in internal/models/base.go

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
MrixsandClaude Code committed 2026-10-18 08:57:43 +03:00
1 parent 7a68ad86cb
commit 0456ca0665
54 files changed
+1097 -652

No files matched your search

+17 -16
View File
@@ -1,10 +1,11 @@
// Package models provides data models for the Yandex Music API.
package models
import (
"encoding/json"
)
// Concert represents a concert
// Concert represents a concert from the Yandex Music API.
type Concert struct {
BaseModel
ID string `json:"id"`
@@ -28,7 +29,7 @@ type Concert struct {
Skeleton *ConcertSkeleton `json:"skeleton"`
}
// DeJSON deserializes a Concert from JSON
// DeJSON deserializes a Concert from JSON data.
func (c *Concert) DeJSON(data []byte, client ClientInterface) (Model, error) {
var raw map[string]json.RawMessage
if err := json.Unmarshal(data, &raw); err != nil {
@@ -111,7 +112,7 @@ func (c *Concert) DeJSON(data []byte, client ClientInterface) (Model, error) {
return concert, nil
}
// DeList deserializes a list of Concerts
// DeList deserializes a list of Concerts from JSON data.
func (c *Concert) DeList(data []byte, client ClientInterface) ([]Model, error) {
var rawList []json.RawMessage
if err := json.Unmarshal(data, &rawList); err != nil {
@@ -129,7 +130,7 @@ func (c *Concert) DeList(data []byte, client ClientInterface) ([]Model, error) {
return result, nil
}
// ConcertVenue represents a concert venue
// ConcertVenue represents a concert venue.
type ConcertVenue struct {
BaseModel
ID string `json:"id"`
@@ -141,7 +142,7 @@ type ConcertVenue struct {
ImageURI string `json:"image_uri"`
}
// ConcertLocation represents a concert location
// ConcertLocation represents a concert location.
type ConcertLocation struct {
BaseModel
ID string `json:"id"`
@@ -152,7 +153,7 @@ type ConcertLocation struct {
Venues []ConcertVenue `json:"venues"`
}
// ConcertLocations represents concert locations
// ConcertLocations represents concert locations.
type ConcertLocations struct {
BaseModel
Locations []ConcertLocation `json:"locations"`
@@ -161,7 +162,7 @@ type ConcertLocations struct {
PageSize int `json:"page_size"`
}
// ConcertFeed represents a concert feed
// ConcertFeed represents a concert feed.
type ConcertFeed struct {
BaseModel
Concerts []Concert `json:"concerts"`
@@ -170,14 +171,14 @@ type ConcertFeed struct {
PageSize int `json:"page_size"`
}
// ConcertInfo represents concert info
// ConcertInfo represents concert info.
type ConcertInfo struct {
BaseModel
Concert *Concert `json:"concert"`
Related []Concert `json:"related"`
}
// ConcertEventInfo represents concert event info
// ConcertEventInfo represents concert event info.
type ConcertEventInfo struct {
BaseModel
EventID string `json:"event_id"`
@@ -186,7 +187,7 @@ type ConcertEventInfo struct {
Data json.RawMessage `json:"data"`
}
// ConcertDescription represents concert description
// ConcertDescription represents concert description.
type ConcertDescription struct {
BaseModel
Text string `json:"text"`
@@ -194,7 +195,7 @@ type ConcertDescription struct {
ShortText string `json:"short_text"`
}
// ConcertCashback represents concert cashback
// ConcertCashback represents concert cashback.
type ConcertCashback struct {
BaseModel
Amount int `json:"amount"`
@@ -203,14 +204,14 @@ type ConcertCashback struct {
Expires string `json:"expires"`
}
// ConcertMinPrice represents concert min price
// ConcertMinPrice represents concert min price.
type ConcertMinPrice struct {
BaseModel
Price int `json:"price"`
Currency string `json:"currency"`
}
// ConcertTabConfig represents concert tab config
// ConcertTabConfig represents concert tab config.
type ConcertTabConfig struct {
BaseModel
ID string `json:"id"`
@@ -220,20 +221,20 @@ type ConcertTabConfig struct {
Range *ConcertTabRange `json:"range"`
}
// ConcertTabRange represents concert tab range
// ConcertTabRange represents concert tab range.
type ConcertTabRange struct {
BaseModel
From string `json:"from"`
To string `json:"to"`
}
// ConcertSkeleton represents concert skeleton
// ConcertSkeleton represents concert skeleton.
type ConcertSkeleton struct {
BaseModel
Blocks []ConcertSkeletonBlock `json:"blocks"`
}
// ConcertSkeletonBlock represents a concert skeleton block
// ConcertSkeletonBlock represents a concert skeleton block.
type ConcertSkeletonBlock struct {
BaseModel
ID string `json:"id"`