Documentation
¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func GetRolesForApiKeyAuth(operation string) []string
- func GetRolesForBearerAuth(operation string) []string
- func GetRolesForCookieAuth(operation string) []string
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type ApiKeyAuth
- type BearerAuth
- type Client
- func (c *Client) CreateCollection(ctx context.Context, request *CollectionCreate) (*Collection, error)
- func (c *Client) CreatePlatform(ctx context.Context, request *PlatformCreate) (*Platform, error)
- func (c *Client) DeleteRom(ctx context.Context, params DeleteRomParams) error
- func (c *Client) DownloadRom(ctx context.Context, params DownloadRomParams) (DownloadRomRes, error)
- func (c *Client) GetHealth(ctx context.Context) (*HealthResponse, error)
- func (c *Client) GetPlatform(ctx context.Context, params GetPlatformParams) (GetPlatformRes, error)
- func (c *Client) GetRom(ctx context.Context, params GetRomParams) (GetRomRes, error)
- func (c *Client) GetStats(ctx context.Context) (*Stats, error)
- func (c *Client) ListCollections(ctx context.Context) (*CollectionList, error)
- func (c *Client) ListDats(ctx context.Context) (*DatFileList, error)
- func (c *Client) ListPlatforms(ctx context.Context, params ListPlatformsParams) (*PlatformList, error)
- func (c *Client) ListRoms(ctx context.Context, params ListRomsParams) (*RomList, error)
- func (c *Client) ListTasks(ctx context.Context) (*TaskList, error)
- func (c *Client) StartScan(ctx context.Context, request *ScanRequest) (*TaskStatus, error)
- func (c *Client) UpdateRom(ctx context.Context, request *RomUpdate, params UpdateRomParams) (*Rom, error)
- func (c *Client) UploadDat(ctx context.Context, request *UploadDatReq) (*DatFile, error)
- type ClientOption
- type Collection
- func (s *Collection) Decode(d *jx.Decoder) error
- func (s *Collection) Encode(e *jx.Encoder)
- func (s *Collection) GetCoverPath() OptString
- func (s *Collection) GetCreatedAt() OptDateTime
- func (s *Collection) GetDescription() OptString
- func (s *Collection) GetID() uuid.UUID
- func (s *Collection) GetIsPublic() OptBool
- func (s *Collection) GetName() string
- func (s *Collection) GetRomCount() OptInt
- func (s *Collection) GetType() CollectionType
- func (s *Collection) MarshalJSON() ([]byte, error)
- func (s *Collection) SetCoverPath(val OptString)
- func (s *Collection) SetCreatedAt(val OptDateTime)
- func (s *Collection) SetDescription(val OptString)
- func (s *Collection) SetID(val uuid.UUID)
- func (s *Collection) SetIsPublic(val OptBool)
- func (s *Collection) SetName(val string)
- func (s *Collection) SetRomCount(val OptInt)
- func (s *Collection) SetType(val CollectionType)
- func (s *Collection) UnmarshalJSON(data []byte) error
- func (s *Collection) Validate() error
- type CollectionCreate
- func (s *CollectionCreate) Decode(d *jx.Decoder) error
- func (s *CollectionCreate) Encode(e *jx.Encoder)
- func (s *CollectionCreate) GetCriteria() *CollectionCreateCriteria
- func (s *CollectionCreate) GetDescription() OptString
- func (s *CollectionCreate) GetIsPublic() OptBool
- func (s *CollectionCreate) GetName() string
- func (s *CollectionCreate) GetType() CollectionCreateType
- func (s *CollectionCreate) MarshalJSON() ([]byte, error)
- func (s *CollectionCreate) SetCriteria(val *CollectionCreateCriteria)
- func (s *CollectionCreate) SetDescription(val OptString)
- func (s *CollectionCreate) SetIsPublic(val OptBool)
- func (s *CollectionCreate) SetName(val string)
- func (s *CollectionCreate) SetType(val CollectionCreateType)
- func (s *CollectionCreate) UnmarshalJSON(data []byte) error
- func (s *CollectionCreate) Validate() error
- type CollectionCreateCriteria
- type CollectionCreateType
- func (CollectionCreateType) AllValues() []CollectionCreateType
- func (s *CollectionCreateType) Decode(d *jx.Decoder) error
- func (s CollectionCreateType) Encode(e *jx.Encoder)
- func (s CollectionCreateType) MarshalJSON() ([]byte, error)
- func (s CollectionCreateType) MarshalText() ([]byte, error)
- func (s *CollectionCreateType) UnmarshalJSON(data []byte) error
- func (s *CollectionCreateType) UnmarshalText(data []byte) error
- func (s CollectionCreateType) Validate() error
- type CollectionList
- func (s *CollectionList) Decode(d *jx.Decoder) error
- func (s *CollectionList) Encode(e *jx.Encoder)
- func (s *CollectionList) GetItems() []Collection
- func (s *CollectionList) GetTotal() int
- func (s *CollectionList) MarshalJSON() ([]byte, error)
- func (s *CollectionList) SetItems(val []Collection)
- func (s *CollectionList) SetTotal(val int)
- func (s *CollectionList) UnmarshalJSON(data []byte) error
- func (s *CollectionList) Validate() error
- type CollectionType
- func (CollectionType) AllValues() []CollectionType
- func (s *CollectionType) Decode(d *jx.Decoder) error
- func (s CollectionType) Encode(e *jx.Encoder)
- func (s CollectionType) MarshalJSON() ([]byte, error)
- func (s CollectionType) MarshalText() ([]byte, error)
- func (s *CollectionType) UnmarshalJSON(data []byte) error
- func (s *CollectionType) UnmarshalText(data []byte) error
- func (s CollectionType) Validate() error
- type CookieAuth
- type DatFile
- func (s *DatFile) Decode(d *jx.Decoder) error
- func (s *DatFile) Encode(e *jx.Encoder)
- func (s *DatFile) GetAutoUpdate() OptBool
- func (s *DatFile) GetDescription() OptString
- func (s *DatFile) GetFormat() DatFileFormat
- func (s *DatFile) GetID() uuid.UUID
- func (s *DatFile) GetLastUpdated() OptDateTime
- func (s *DatFile) GetName() string
- func (s *DatFile) GetRomCount() OptInt
- func (s *DatFile) GetSource() OptString
- func (s *DatFile) GetVersion() OptString
- func (s *DatFile) MarshalJSON() ([]byte, error)
- func (s *DatFile) SetAutoUpdate(val OptBool)
- func (s *DatFile) SetDescription(val OptString)
- func (s *DatFile) SetFormat(val DatFileFormat)
- func (s *DatFile) SetID(val uuid.UUID)
- func (s *DatFile) SetLastUpdated(val OptDateTime)
- func (s *DatFile) SetName(val string)
- func (s *DatFile) SetRomCount(val OptInt)
- func (s *DatFile) SetSource(val OptString)
- func (s *DatFile) SetVersion(val OptString)
- func (s *DatFile) UnmarshalJSON(data []byte) error
- func (s *DatFile) Validate() error
- type DatFileFormat
- func (DatFileFormat) AllValues() []DatFileFormat
- func (s *DatFileFormat) Decode(d *jx.Decoder) error
- func (s DatFileFormat) Encode(e *jx.Encoder)
- func (s DatFileFormat) MarshalJSON() ([]byte, error)
- func (s DatFileFormat) MarshalText() ([]byte, error)
- func (s *DatFileFormat) UnmarshalJSON(data []byte) error
- func (s *DatFileFormat) UnmarshalText(data []byte) error
- func (s DatFileFormat) Validate() error
- type DatFileList
- func (s *DatFileList) Decode(d *jx.Decoder) error
- func (s *DatFileList) Encode(e *jx.Encoder)
- func (s *DatFileList) GetItems() []DatFile
- func (s *DatFileList) GetTotal() int
- func (s *DatFileList) MarshalJSON() ([]byte, error)
- func (s *DatFileList) SetItems(val []DatFile)
- func (s *DatFileList) SetTotal(val int)
- func (s *DatFileList) UnmarshalJSON(data []byte) error
- func (s *DatFileList) Validate() error
- type DeleteRomNoContent
- type DeleteRomParams
- type DownloadRomOK
- type DownloadRomParams
- type DownloadRomRes
- type Error
- func (s *Error) Decode(d *jx.Decoder) error
- func (s *Error) Encode(e *jx.Encoder)
- func (s *Error) GetCode() int
- func (s *Error) GetMessage() string
- func (s *Error) MarshalJSON() ([]byte, error)
- func (s *Error) SetCode(val int)
- func (s *Error) SetMessage(val string)
- func (s *Error) UnmarshalJSON(data []byte) error
- type ErrorHandler
- type GetPlatformParams
- type GetPlatformRes
- type GetRomParams
- type GetRomRes
- type Handler
- type HealthResponse
- func (s *HealthResponse) Decode(d *jx.Decoder) error
- func (s *HealthResponse) Encode(e *jx.Encoder)
- func (s *HealthResponse) GetMetadataSources() OptHealthResponseMetadataSources
- func (s *HealthResponse) GetStatus() HealthResponseStatus
- func (s *HealthResponse) GetVersion() string
- func (s *HealthResponse) MarshalJSON() ([]byte, error)
- func (s *HealthResponse) SetMetadataSources(val OptHealthResponseMetadataSources)
- func (s *HealthResponse) SetStatus(val HealthResponseStatus)
- func (s *HealthResponse) SetVersion(val string)
- func (s *HealthResponse) UnmarshalJSON(data []byte) error
- func (s *HealthResponse) Validate() error
- type HealthResponseMetadataSources
- type HealthResponseStatus
- func (HealthResponseStatus) AllValues() []HealthResponseStatus
- func (s *HealthResponseStatus) Decode(d *jx.Decoder) error
- func (s HealthResponseStatus) Encode(e *jx.Encoder)
- func (s HealthResponseStatus) MarshalJSON() ([]byte, error)
- func (s HealthResponseStatus) MarshalText() ([]byte, error)
- func (s *HealthResponseStatus) UnmarshalJSON(data []byte) error
- func (s *HealthResponseStatus) UnmarshalText(data []byte) error
- func (s HealthResponseStatus) Validate() error
- type Invoker
- type Labeler
- type ListPlatformsParams
- type ListRomsParams
- type Middleware
- type OperationName
- type OptBool
- func (o *OptBool) Decode(d *jx.Decoder) error
- func (o OptBool) Encode(e *jx.Encoder)
- func (o OptBool) Get() (v bool, ok bool)
- func (o OptBool) IsSet() bool
- func (s OptBool) MarshalJSON() ([]byte, error)
- func (o OptBool) Or(d bool) bool
- func (o *OptBool) Reset()
- func (o *OptBool) SetTo(v bool)
- func (s *OptBool) UnmarshalJSON(data []byte) error
- type OptDate
- func (o *OptDate) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error
- func (o OptDate) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))
- func (o OptDate) Get() (v time.Time, ok bool)
- func (o OptDate) IsSet() bool
- func (s OptDate) MarshalJSON() ([]byte, error)
- func (o OptDate) Or(d time.Time) time.Time
- func (o *OptDate) Reset()
- func (o *OptDate) SetTo(v time.Time)
- func (s *OptDate) UnmarshalJSON(data []byte) error
- type OptDateTime
- func (o *OptDateTime) Decode(d *jx.Decoder, format func(*jx.Decoder) (time.Time, error)) error
- func (o OptDateTime) Encode(e *jx.Encoder, format func(*jx.Encoder, time.Time))
- func (o OptDateTime) Get() (v time.Time, ok bool)
- func (o OptDateTime) IsSet() bool
- func (s OptDateTime) MarshalJSON() ([]byte, error)
- func (o OptDateTime) Or(d time.Time) time.Time
- func (o *OptDateTime) Reset()
- func (o *OptDateTime) SetTo(v time.Time)
- func (s *OptDateTime) UnmarshalJSON(data []byte) error
- type OptFloat64
- func (o *OptFloat64) Decode(d *jx.Decoder) error
- func (o OptFloat64) Encode(e *jx.Encoder)
- func (o OptFloat64) Get() (v float64, ok bool)
- func (o OptFloat64) IsSet() bool
- func (s OptFloat64) MarshalJSON() ([]byte, error)
- func (o OptFloat64) Or(d float64) float64
- func (o *OptFloat64) Reset()
- func (o *OptFloat64) SetTo(v float64)
- func (s *OptFloat64) UnmarshalJSON(data []byte) error
- type OptHealthResponseMetadataSources
- func (o *OptHealthResponseMetadataSources) Decode(d *jx.Decoder) error
- func (o OptHealthResponseMetadataSources) Encode(e *jx.Encoder)
- func (o OptHealthResponseMetadataSources) Get() (v HealthResponseMetadataSources, ok bool)
- func (o OptHealthResponseMetadataSources) IsSet() bool
- func (s OptHealthResponseMetadataSources) MarshalJSON() ([]byte, error)
- func (o OptHealthResponseMetadataSources) Or(d HealthResponseMetadataSources) HealthResponseMetadataSources
- func (o *OptHealthResponseMetadataSources) Reset()
- func (o *OptHealthResponseMetadataSources) SetTo(v HealthResponseMetadataSources)
- func (s *OptHealthResponseMetadataSources) UnmarshalJSON(data []byte) error
- type OptInt
- func (o *OptInt) Decode(d *jx.Decoder) error
- func (o OptInt) Encode(e *jx.Encoder)
- func (o OptInt) Get() (v int, ok bool)
- func (o OptInt) IsSet() bool
- func (s OptInt) MarshalJSON() ([]byte, error)
- func (o OptInt) Or(d int) int
- func (o *OptInt) Reset()
- func (o *OptInt) SetTo(v int)
- func (s *OptInt) UnmarshalJSON(data []byte) error
- type OptInt64
- func (o *OptInt64) Decode(d *jx.Decoder) error
- func (o OptInt64) Encode(e *jx.Encoder)
- func (o OptInt64) Get() (v int64, ok bool)
- func (o OptInt64) IsSet() bool
- func (s OptInt64) MarshalJSON() ([]byte, error)
- func (o OptInt64) Or(d int64) int64
- func (o *OptInt64) Reset()
- func (o *OptInt64) SetTo(v int64)
- func (s *OptInt64) UnmarshalJSON(data []byte) error
- type OptStatsRegionBreakdown
- func (o *OptStatsRegionBreakdown) Decode(d *jx.Decoder) error
- func (o OptStatsRegionBreakdown) Encode(e *jx.Encoder)
- func (o OptStatsRegionBreakdown) Get() (v StatsRegionBreakdown, ok bool)
- func (o OptStatsRegionBreakdown) IsSet() bool
- func (s OptStatsRegionBreakdown) MarshalJSON() ([]byte, error)
- func (o OptStatsRegionBreakdown) Or(d StatsRegionBreakdown) StatsRegionBreakdown
- func (o *OptStatsRegionBreakdown) Reset()
- func (o *OptStatsRegionBreakdown) SetTo(v StatsRegionBreakdown)
- func (s *OptStatsRegionBreakdown) UnmarshalJSON(data []byte) error
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type OptUUID
- type Option
- type Platform
- func (s *Platform) Decode(d *jx.Decoder) error
- func (s *Platform) Encode(e *jx.Encoder)
- func (s *Platform) GetCoverAspect() OptString
- func (s *Platform) GetCreatedAt() OptDateTime
- func (s *Platform) GetFamily() OptString
- func (s *Platform) GetGeneration() OptInt
- func (s *Platform) GetID() uuid.UUID
- func (s *Platform) GetIgdbID() OptInt
- func (s *Platform) GetMobyID() OptInt
- func (s *Platform) GetName() string
- func (s *Platform) GetRomCount() OptInt
- func (s *Platform) GetSgdbID() OptInt
- func (s *Platform) GetSlug() string
- func (s *Platform) GetUpdatedAt() OptDateTime
- func (s *Platform) MarshalJSON() ([]byte, error)
- func (s *Platform) SetCoverAspect(val OptString)
- func (s *Platform) SetCreatedAt(val OptDateTime)
- func (s *Platform) SetFamily(val OptString)
- func (s *Platform) SetGeneration(val OptInt)
- func (s *Platform) SetID(val uuid.UUID)
- func (s *Platform) SetIgdbID(val OptInt)
- func (s *Platform) SetMobyID(val OptInt)
- func (s *Platform) SetName(val string)
- func (s *Platform) SetRomCount(val OptInt)
- func (s *Platform) SetSgdbID(val OptInt)
- func (s *Platform) SetSlug(val string)
- func (s *Platform) SetUpdatedAt(val OptDateTime)
- func (s *Platform) UnmarshalJSON(data []byte) error
- type PlatformCreate
- func (s *PlatformCreate) Decode(d *jx.Decoder) error
- func (s *PlatformCreate) Encode(e *jx.Encoder)
- func (s *PlatformCreate) GetFamily() OptString
- func (s *PlatformCreate) GetGeneration() OptInt
- func (s *PlatformCreate) GetName() string
- func (s *PlatformCreate) GetSlug() string
- func (s *PlatformCreate) MarshalJSON() ([]byte, error)
- func (s *PlatformCreate) SetFamily(val OptString)
- func (s *PlatformCreate) SetGeneration(val OptInt)
- func (s *PlatformCreate) SetName(val string)
- func (s *PlatformCreate) SetSlug(val string)
- func (s *PlatformCreate) UnmarshalJSON(data []byte) error
- type PlatformList
- func (s *PlatformList) Decode(d *jx.Decoder) error
- func (s *PlatformList) Encode(e *jx.Encoder)
- func (s *PlatformList) GetItems() []Platform
- func (s *PlatformList) GetPage() int
- func (s *PlatformList) GetPageSize() int
- func (s *PlatformList) GetTotal() int
- func (s *PlatformList) MarshalJSON() ([]byte, error)
- func (s *PlatformList) SetItems(val []Platform)
- func (s *PlatformList) SetPage(val int)
- func (s *PlatformList) SetPageSize(val int)
- func (s *PlatformList) SetTotal(val int)
- func (s *PlatformList) UnmarshalJSON(data []byte) error
- func (s *PlatformList) Validate() error
- type Rom
- func (s *Rom) Decode(d *jx.Decoder) error
- func (s *Rom) Encode(e *jx.Encoder)
- func (s *Rom) GetAvgRating() OptFloat64
- func (s *Rom) GetCategory() OptString
- func (s *Rom) GetCompanies() []string
- func (s *Rom) GetCrc32() OptString
- func (s *Rom) GetCreatedAt() OptDateTime
- func (s *Rom) GetDatMatch() OptBool
- func (s *Rom) GetDescription() OptString
- func (s *Rom) GetFileName() string
- func (s *Rom) GetFilePath() string
- func (s *Rom) GetFileSize() OptInt64
- func (s *Rom) GetFirstRelease() OptDate
- func (s *Rom) GetFranchises() []string
- func (s *Rom) GetGenres() []string
- func (s *Rom) GetID() uuid.UUID
- func (s *Rom) GetIgdbID() OptInt
- func (s *Rom) GetLanguage() []string
- func (s *Rom) GetMD5() OptString
- func (s *Rom) GetMedia() []RomMedia
- func (s *Rom) GetMultiFile() OptBool
- func (s *Rom) GetName() OptString
- func (s *Rom) GetPlatformID() uuid.UUID
- func (s *Rom) GetRegion() []string
- func (s *Rom) GetSHA1() OptString
- func (s *Rom) GetSHA256() OptString
- func (s *Rom) GetSummary() OptString
- func (s *Rom) GetUpdatedAt() OptDateTime
- func (s *Rom) MarshalJSON() ([]byte, error)
- func (s *Rom) SetAvgRating(val OptFloat64)
- func (s *Rom) SetCategory(val OptString)
- func (s *Rom) SetCompanies(val []string)
- func (s *Rom) SetCrc32(val OptString)
- func (s *Rom) SetCreatedAt(val OptDateTime)
- func (s *Rom) SetDatMatch(val OptBool)
- func (s *Rom) SetDescription(val OptString)
- func (s *Rom) SetFileName(val string)
- func (s *Rom) SetFilePath(val string)
- func (s *Rom) SetFileSize(val OptInt64)
- func (s *Rom) SetFirstRelease(val OptDate)
- func (s *Rom) SetFranchises(val []string)
- func (s *Rom) SetGenres(val []string)
- func (s *Rom) SetID(val uuid.UUID)
- func (s *Rom) SetIgdbID(val OptInt)
- func (s *Rom) SetLanguage(val []string)
- func (s *Rom) SetMD5(val OptString)
- func (s *Rom) SetMedia(val []RomMedia)
- func (s *Rom) SetMultiFile(val OptBool)
- func (s *Rom) SetName(val OptString)
- func (s *Rom) SetPlatformID(val uuid.UUID)
- func (s *Rom) SetRegion(val []string)
- func (s *Rom) SetSHA1(val OptString)
- func (s *Rom) SetSHA256(val OptString)
- func (s *Rom) SetSummary(val OptString)
- func (s *Rom) SetUpdatedAt(val OptDateTime)
- func (s *Rom) UnmarshalJSON(data []byte) error
- func (s *Rom) Validate() error
- type RomList
- func (s *RomList) Decode(d *jx.Decoder) error
- func (s *RomList) Encode(e *jx.Encoder)
- func (s *RomList) GetItems() []Rom
- func (s *RomList) GetPage() int
- func (s *RomList) GetPageSize() int
- func (s *RomList) GetTotal() int
- func (s *RomList) MarshalJSON() ([]byte, error)
- func (s *RomList) SetItems(val []Rom)
- func (s *RomList) SetPage(val int)
- func (s *RomList) SetPageSize(val int)
- func (s *RomList) SetTotal(val int)
- func (s *RomList) UnmarshalJSON(data []byte) error
- func (s *RomList) Validate() error
- type RomMedia
- func (s *RomMedia) Decode(d *jx.Decoder) error
- func (s *RomMedia) Encode(e *jx.Encoder)
- func (s *RomMedia) GetHeight() OptInt
- func (s *RomMedia) GetID() uuid.UUID
- func (s *RomMedia) GetPath() string
- func (s *RomMedia) GetSource() OptString
- func (s *RomMedia) GetType() string
- func (s *RomMedia) GetWidth() OptInt
- func (s *RomMedia) MarshalJSON() ([]byte, error)
- func (s *RomMedia) SetHeight(val OptInt)
- func (s *RomMedia) SetID(val uuid.UUID)
- func (s *RomMedia) SetPath(val string)
- func (s *RomMedia) SetSource(val OptString)
- func (s *RomMedia) SetType(val string)
- func (s *RomMedia) SetWidth(val OptInt)
- func (s *RomMedia) UnmarshalJSON(data []byte) error
- type RomUpdate
- func (s *RomUpdate) Decode(d *jx.Decoder) error
- func (s *RomUpdate) Encode(e *jx.Encoder)
- func (s *RomUpdate) GetCategory() OptString
- func (s *RomUpdate) GetDescription() OptString
- func (s *RomUpdate) GetIgdbID() OptInt
- func (s *RomUpdate) GetName() OptString
- func (s *RomUpdate) GetSummary() OptString
- func (s *RomUpdate) MarshalJSON() ([]byte, error)
- func (s *RomUpdate) SetCategory(val OptString)
- func (s *RomUpdate) SetDescription(val OptString)
- func (s *RomUpdate) SetIgdbID(val OptInt)
- func (s *RomUpdate) SetName(val OptString)
- func (s *RomUpdate) SetSummary(val OptString)
- func (s *RomUpdate) UnmarshalJSON(data []byte) error
- type Route
- type ScanRequest
- func (s *ScanRequest) Decode(d *jx.Decoder) error
- func (s *ScanRequest) Encode(e *jx.Encoder)
- func (s *ScanRequest) GetPlatformIds() []uuid.UUID
- func (s *ScanRequest) GetType() ScanRequestType
- func (s *ScanRequest) MarshalJSON() ([]byte, error)
- func (s *ScanRequest) SetPlatformIds(val []uuid.UUID)
- func (s *ScanRequest) SetType(val ScanRequestType)
- func (s *ScanRequest) UnmarshalJSON(data []byte) error
- func (s *ScanRequest) Validate() error
- type ScanRequestType
- func (ScanRequestType) AllValues() []ScanRequestType
- func (s *ScanRequestType) Decode(d *jx.Decoder) error
- func (s ScanRequestType) Encode(e *jx.Encoder)
- func (s ScanRequestType) MarshalJSON() ([]byte, error)
- func (s ScanRequestType) MarshalText() ([]byte, error)
- func (s *ScanRequestType) UnmarshalJSON(data []byte) error
- func (s *ScanRequestType) UnmarshalText(data []byte) error
- func (s ScanRequestType) Validate() error
- type SecurityHandler
- type SecuritySource
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type Stats
- func (s *Stats) Decode(d *jx.Decoder) error
- func (s *Stats) Encode(e *jx.Encoder)
- func (s *Stats) GetDatCoveragePct() OptFloat64
- func (s *Stats) GetPlatformCount() OptInt
- func (s *Stats) GetRegionBreakdown() OptStatsRegionBreakdown
- func (s *Stats) GetRomCount() OptInt
- func (s *Stats) GetSaveCount() OptInt
- func (s *Stats) GetStateCount() OptInt
- func (s *Stats) GetTotalFileSize() OptInt64
- func (s *Stats) MarshalJSON() ([]byte, error)
- func (s *Stats) SetDatCoveragePct(val OptFloat64)
- func (s *Stats) SetPlatformCount(val OptInt)
- func (s *Stats) SetRegionBreakdown(val OptStatsRegionBreakdown)
- func (s *Stats) SetRomCount(val OptInt)
- func (s *Stats) SetSaveCount(val OptInt)
- func (s *Stats) SetStateCount(val OptInt)
- func (s *Stats) SetTotalFileSize(val OptInt64)
- func (s *Stats) UnmarshalJSON(data []byte) error
- func (s *Stats) Validate() error
- type StatsRegionBreakdown
- type TaskList
- func (s *TaskList) Decode(d *jx.Decoder) error
- func (s *TaskList) Encode(e *jx.Encoder)
- func (s *TaskList) GetItems() []TaskStatus
- func (s *TaskList) MarshalJSON() ([]byte, error)
- func (s *TaskList) SetItems(val []TaskStatus)
- func (s *TaskList) UnmarshalJSON(data []byte) error
- func (s *TaskList) Validate() error
- type TaskStatus
- func (s *TaskStatus) Decode(d *jx.Decoder) error
- func (s *TaskStatus) Encode(e *jx.Encoder)
- func (s *TaskStatus) GetCompletedAt() OptDateTime
- func (s *TaskStatus) GetID() string
- func (s *TaskStatus) GetMessage() OptString
- func (s *TaskStatus) GetProgress() OptFloat64
- func (s *TaskStatus) GetStartedAt() OptDateTime
- func (s *TaskStatus) GetStatus() TaskStatusStatus
- func (s *TaskStatus) GetType() string
- func (s *TaskStatus) MarshalJSON() ([]byte, error)
- func (s *TaskStatus) SetCompletedAt(val OptDateTime)
- func (s *TaskStatus) SetID(val string)
- func (s *TaskStatus) SetMessage(val OptString)
- func (s *TaskStatus) SetProgress(val OptFloat64)
- func (s *TaskStatus) SetStartedAt(val OptDateTime)
- func (s *TaskStatus) SetStatus(val TaskStatusStatus)
- func (s *TaskStatus) SetType(val string)
- func (s *TaskStatus) UnmarshalJSON(data []byte) error
- func (s *TaskStatus) Validate() error
- type TaskStatusStatus
- func (TaskStatusStatus) AllValues() []TaskStatusStatus
- func (s *TaskStatusStatus) Decode(d *jx.Decoder) error
- func (s TaskStatusStatus) Encode(e *jx.Encoder)
- func (s TaskStatusStatus) MarshalJSON() ([]byte, error)
- func (s TaskStatusStatus) MarshalText() ([]byte, error)
- func (s *TaskStatusStatus) UnmarshalJSON(data []byte) error
- func (s *TaskStatusStatus) UnmarshalText(data []byte) error
- func (s TaskStatusStatus) Validate() error
- type UnimplementedHandler
- func (UnimplementedHandler) CreateCollection(ctx context.Context, req *CollectionCreate) (r *Collection, _ error)
- func (UnimplementedHandler) CreatePlatform(ctx context.Context, req *PlatformCreate) (r *Platform, _ error)
- func (UnimplementedHandler) DeleteRom(ctx context.Context, params DeleteRomParams) error
- func (UnimplementedHandler) DownloadRom(ctx context.Context, params DownloadRomParams) (r DownloadRomRes, _ error)
- func (UnimplementedHandler) GetHealth(ctx context.Context) (r *HealthResponse, _ error)
- func (UnimplementedHandler) GetPlatform(ctx context.Context, params GetPlatformParams) (r GetPlatformRes, _ error)
- func (UnimplementedHandler) GetRom(ctx context.Context, params GetRomParams) (r GetRomRes, _ error)
- func (UnimplementedHandler) GetStats(ctx context.Context) (r *Stats, _ error)
- func (UnimplementedHandler) ListCollections(ctx context.Context) (r *CollectionList, _ error)
- func (UnimplementedHandler) ListDats(ctx context.Context) (r *DatFileList, _ error)
- func (UnimplementedHandler) ListPlatforms(ctx context.Context, params ListPlatformsParams) (r *PlatformList, _ error)
- func (UnimplementedHandler) ListRoms(ctx context.Context, params ListRomsParams) (r *RomList, _ error)
- func (UnimplementedHandler) ListTasks(ctx context.Context) (r *TaskList, _ error)
- func (UnimplementedHandler) StartScan(ctx context.Context, req *ScanRequest) (r *TaskStatus, _ error)
- func (UnimplementedHandler) UpdateRom(ctx context.Context, req *RomUpdate, params UpdateRomParams) (r *Rom, _ error)
- func (UnimplementedHandler) UploadDat(ctx context.Context, req *UploadDatReq) (r *DatFile, _ error)
- type UpdateRomParams
- type UploadDatReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRolesForApiKeyAuth ¶
GetRolesForApiKeyAuth returns the required roles for the given operation.
This is useful for authorization scenarios where you need to know which roles are required for an operation.
Example:
requiredRoles := GetRolesForApiKeyAuth(AddPetOperation)
Returns nil if the operation has no role requirements or if the operation is unknown.
func GetRolesForBearerAuth ¶
GetRolesForBearerAuth returns the required roles for the given operation.
This is useful for authorization scenarios where you need to know which roles are required for an operation.
Example:
requiredRoles := GetRolesForBearerAuth(AddPetOperation)
Returns nil if the operation has no role requirements or if the operation is unknown.
func GetRolesForCookieAuth ¶
GetRolesForCookieAuth returns the required roles for the given operation.
This is useful for authorization scenarios where you need to know which roles are required for an operation.
Example:
requiredRoles := GetRolesForCookieAuth(AddPetOperation)
Returns nil if the operation has no role requirements or if the operation is unknown.
Types ¶
type ApiKeyAuth ¶
func (*ApiKeyAuth) GetAPIKey ¶
func (s *ApiKeyAuth) GetAPIKey() string
GetAPIKey returns the value of APIKey.
func (*ApiKeyAuth) GetRoles ¶
func (s *ApiKeyAuth) GetRoles() []string
GetRoles returns the value of Roles.
func (*ApiKeyAuth) SetAPIKey ¶
func (s *ApiKeyAuth) SetAPIKey(val string)
SetAPIKey sets the value of APIKey.
func (*ApiKeyAuth) SetRoles ¶
func (s *ApiKeyAuth) SetRoles(val []string)
SetRoles sets the value of Roles.
type BearerAuth ¶
func (*BearerAuth) GetRoles ¶
func (s *BearerAuth) GetRoles() []string
GetRoles returns the value of Roles.
func (*BearerAuth) GetToken ¶
func (s *BearerAuth) GetToken() string
GetToken returns the value of Token.
func (*BearerAuth) SetRoles ¶
func (s *BearerAuth) SetRoles(val []string)
SetRoles sets the value of Roles.
func (*BearerAuth) SetToken ¶
func (s *BearerAuth) SetToken(val string)
SetToken sets the value of Token.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) CreateCollection ¶
func (c *Client) CreateCollection(ctx context.Context, request *CollectionCreate) (*Collection, error)
CreateCollection invokes createCollection operation.
Create a collection.
POST /collections
func (*Client) CreatePlatform ¶
CreatePlatform invokes createPlatform operation.
Create a platform.
POST /platforms
func (*Client) DeleteRom ¶
func (c *Client) DeleteRom(ctx context.Context, params DeleteRomParams) error
DeleteRom invokes deleteRom operation.
Delete a ROM.
DELETE /roms/{id}
func (*Client) DownloadRom ¶
func (c *Client) DownloadRom(ctx context.Context, params DownloadRomParams) (DownloadRomRes, error)
DownloadRom invokes downloadRom operation.
Download ROM file.
GET /roms/{id}/download
func (*Client) GetHealth ¶
func (c *Client) GetHealth(ctx context.Context) (*HealthResponse, error)
GetHealth invokes getHealth operation.
Health check.
GET /health
func (*Client) GetPlatform ¶
func (c *Client) GetPlatform(ctx context.Context, params GetPlatformParams) (GetPlatformRes, error)
GetPlatform invokes getPlatform operation.
Get a platform by ID.
GET /platforms/{id}
func (*Client) ListCollections ¶
func (c *Client) ListCollections(ctx context.Context) (*CollectionList, error)
ListCollections invokes listCollections operation.
List collections.
GET /collections
func (*Client) ListDats ¶
func (c *Client) ListDats(ctx context.Context) (*DatFileList, error)
ListDats invokes listDats operation.
List DAT files.
GET /dats
func (*Client) ListPlatforms ¶
func (c *Client) ListPlatforms(ctx context.Context, params ListPlatformsParams) (*PlatformList, error)
ListPlatforms invokes listPlatforms operation.
List all platforms.
GET /platforms
func (*Client) StartScan ¶
func (c *Client) StartScan(ctx context.Context, request *ScanRequest) (*TaskStatus, error)
StartScan invokes startScan operation.
Start a library scan.
POST /scan
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption is client config option.
func WithClient ¶
func WithClient(client ht.Client) ClientOption
WithClient specifies http client to use.
type Collection ¶
type Collection struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Description OptString `json:"description"`
Type CollectionType `json:"type"`
IsPublic OptBool `json:"is_public"`
RomCount OptInt `json:"rom_count"`
CoverPath OptString `json:"cover_path"`
CreatedAt OptDateTime `json:"created_at"`
}
Ref: #/components/schemas/Collection
func (*Collection) Decode ¶
func (s *Collection) Decode(d *jx.Decoder) error
Decode decodes Collection from json.
func (*Collection) Encode ¶
func (s *Collection) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*Collection) GetCoverPath ¶
func (s *Collection) GetCoverPath() OptString
GetCoverPath returns the value of CoverPath.
func (*Collection) GetCreatedAt ¶
func (s *Collection) GetCreatedAt() OptDateTime
GetCreatedAt returns the value of CreatedAt.
func (*Collection) GetDescription ¶
func (s *Collection) GetDescription() OptString
GetDescription returns the value of Description.
func (*Collection) GetIsPublic ¶
func (s *Collection) GetIsPublic() OptBool
GetIsPublic returns the value of IsPublic.
func (*Collection) GetName ¶
func (s *Collection) GetName() string
GetName returns the value of Name.
func (*Collection) GetRomCount ¶
func (s *Collection) GetRomCount() OptInt
GetRomCount returns the value of RomCount.
func (*Collection) GetType ¶
func (s *Collection) GetType() CollectionType
GetType returns the value of Type.
func (*Collection) MarshalJSON ¶
func (s *Collection) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*Collection) SetCoverPath ¶
func (s *Collection) SetCoverPath(val OptString)
SetCoverPath sets the value of CoverPath.
func (*Collection) SetCreatedAt ¶
func (s *Collection) SetCreatedAt(val OptDateTime)
SetCreatedAt sets the value of CreatedAt.
func (*Collection) SetDescription ¶
func (s *Collection) SetDescription(val OptString)
SetDescription sets the value of Description.
func (*Collection) SetIsPublic ¶
func (s *Collection) SetIsPublic(val OptBool)
SetIsPublic sets the value of IsPublic.
func (*Collection) SetName ¶
func (s *Collection) SetName(val string)
SetName sets the value of Name.
func (*Collection) SetRomCount ¶
func (s *Collection) SetRomCount(val OptInt)
SetRomCount sets the value of RomCount.
func (*Collection) SetType ¶
func (s *Collection) SetType(val CollectionType)
SetType sets the value of Type.
func (*Collection) UnmarshalJSON ¶
func (s *Collection) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*Collection) Validate ¶
func (s *Collection) Validate() error
type CollectionCreate ¶
type CollectionCreate struct {
Name string `json:"name"`
Description OptString `json:"description"`
Type CollectionCreateType `json:"type"`
IsPublic OptBool `json:"is_public"`
Criteria *CollectionCreateCriteria `json:"criteria"`
}
Ref: #/components/schemas/CollectionCreate
func (*CollectionCreate) Decode ¶
func (s *CollectionCreate) Decode(d *jx.Decoder) error
Decode decodes CollectionCreate from json.
func (*CollectionCreate) Encode ¶
func (s *CollectionCreate) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CollectionCreate) GetCriteria ¶
func (s *CollectionCreate) GetCriteria() *CollectionCreateCriteria
GetCriteria returns the value of Criteria.
func (*CollectionCreate) GetDescription ¶
func (s *CollectionCreate) GetDescription() OptString
GetDescription returns the value of Description.
func (*CollectionCreate) GetIsPublic ¶
func (s *CollectionCreate) GetIsPublic() OptBool
GetIsPublic returns the value of IsPublic.
func (*CollectionCreate) GetName ¶
func (s *CollectionCreate) GetName() string
GetName returns the value of Name.
func (*CollectionCreate) GetType ¶
func (s *CollectionCreate) GetType() CollectionCreateType
GetType returns the value of Type.
func (*CollectionCreate) MarshalJSON ¶
func (s *CollectionCreate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CollectionCreate) SetCriteria ¶
func (s *CollectionCreate) SetCriteria(val *CollectionCreateCriteria)
SetCriteria sets the value of Criteria.
func (*CollectionCreate) SetDescription ¶
func (s *CollectionCreate) SetDescription(val OptString)
SetDescription sets the value of Description.
func (*CollectionCreate) SetIsPublic ¶
func (s *CollectionCreate) SetIsPublic(val OptBool)
SetIsPublic sets the value of IsPublic.
func (*CollectionCreate) SetName ¶
func (s *CollectionCreate) SetName(val string)
SetName sets the value of Name.
func (*CollectionCreate) SetType ¶
func (s *CollectionCreate) SetType(val CollectionCreateType)
SetType sets the value of Type.
func (*CollectionCreate) UnmarshalJSON ¶
func (s *CollectionCreate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CollectionCreate) Validate ¶
func (s *CollectionCreate) Validate() error
type CollectionCreateCriteria ¶
type CollectionCreateCriteria struct{}
func (*CollectionCreateCriteria) Decode ¶
func (s *CollectionCreateCriteria) Decode(d *jx.Decoder) error
Decode decodes CollectionCreateCriteria from json.
func (*CollectionCreateCriteria) Encode ¶
func (s *CollectionCreateCriteria) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CollectionCreateCriteria) MarshalJSON ¶
func (s *CollectionCreateCriteria) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CollectionCreateCriteria) UnmarshalJSON ¶
func (s *CollectionCreateCriteria) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CollectionCreateType ¶
type CollectionCreateType string
const ( CollectionCreateTypeManual CollectionCreateType = "manual" CollectionCreateTypeVirtual CollectionCreateType = "virtual" CollectionCreateTypeSmart CollectionCreateType = "smart" )
func (CollectionCreateType) AllValues ¶
func (CollectionCreateType) AllValues() []CollectionCreateType
AllValues returns all CollectionCreateType values.
func (*CollectionCreateType) Decode ¶
func (s *CollectionCreateType) Decode(d *jx.Decoder) error
Decode decodes CollectionCreateType from json.
func (CollectionCreateType) Encode ¶
func (s CollectionCreateType) Encode(e *jx.Encoder)
Encode encodes CollectionCreateType as json.
func (CollectionCreateType) MarshalJSON ¶
func (s CollectionCreateType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (CollectionCreateType) MarshalText ¶
func (s CollectionCreateType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CollectionCreateType) UnmarshalJSON ¶
func (s *CollectionCreateType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CollectionCreateType) UnmarshalText ¶
func (s *CollectionCreateType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CollectionCreateType) Validate ¶
func (s CollectionCreateType) Validate() error
type CollectionList ¶
type CollectionList struct {
Items []Collection `json:"items"`
Total int `json:"total"`
}
Ref: #/components/schemas/CollectionList
func (*CollectionList) Decode ¶
func (s *CollectionList) Decode(d *jx.Decoder) error
Decode decodes CollectionList from json.
func (*CollectionList) Encode ¶
func (s *CollectionList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CollectionList) GetItems ¶
func (s *CollectionList) GetItems() []Collection
GetItems returns the value of Items.
func (*CollectionList) GetTotal ¶
func (s *CollectionList) GetTotal() int
GetTotal returns the value of Total.
func (*CollectionList) MarshalJSON ¶
func (s *CollectionList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CollectionList) SetItems ¶
func (s *CollectionList) SetItems(val []Collection)
SetItems sets the value of Items.
func (*CollectionList) SetTotal ¶
func (s *CollectionList) SetTotal(val int)
SetTotal sets the value of Total.
func (*CollectionList) UnmarshalJSON ¶
func (s *CollectionList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CollectionList) Validate ¶
func (s *CollectionList) Validate() error
type CollectionType ¶
type CollectionType string
const ( CollectionTypeManual CollectionType = "manual" CollectionTypeVirtual CollectionType = "virtual" CollectionTypeSmart CollectionType = "smart" )
func (CollectionType) AllValues ¶
func (CollectionType) AllValues() []CollectionType
AllValues returns all CollectionType values.
func (*CollectionType) Decode ¶
func (s *CollectionType) Decode(d *jx.Decoder) error
Decode decodes CollectionType from json.
func (CollectionType) Encode ¶
func (s CollectionType) Encode(e *jx.Encoder)
Encode encodes CollectionType as json.
func (CollectionType) MarshalJSON ¶
func (s CollectionType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (CollectionType) MarshalText ¶
func (s CollectionType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*CollectionType) UnmarshalJSON ¶
func (s *CollectionType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CollectionType) UnmarshalText ¶
func (s *CollectionType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (CollectionType) Validate ¶
func (s CollectionType) Validate() error
type CookieAuth ¶
func (*CookieAuth) GetAPIKey ¶
func (s *CookieAuth) GetAPIKey() string
GetAPIKey returns the value of APIKey.
func (*CookieAuth) GetRoles ¶
func (s *CookieAuth) GetRoles() []string
GetRoles returns the value of Roles.
func (*CookieAuth) SetAPIKey ¶
func (s *CookieAuth) SetAPIKey(val string)
SetAPIKey sets the value of APIKey.
func (*CookieAuth) SetRoles ¶
func (s *CookieAuth) SetRoles(val []string)
SetRoles sets the value of Roles.
type DatFile ¶
type DatFile struct {
ID uuid.UUID `json:"id"`
Name string `json:"name"`
Description OptString `json:"description"`
Format DatFileFormat `json:"format"`
Source OptString `json:"source"`
Version OptString `json:"version"`
RomCount OptInt `json:"rom_count"`
AutoUpdate OptBool `json:"auto_update"`
LastUpdated OptDateTime `json:"last_updated"`
}
Ref: #/components/schemas/DatFile
func (*DatFile) GetAutoUpdate ¶
GetAutoUpdate returns the value of AutoUpdate.
func (*DatFile) GetDescription ¶
GetDescription returns the value of Description.
func (*DatFile) GetFormat ¶
func (s *DatFile) GetFormat() DatFileFormat
GetFormat returns the value of Format.
func (*DatFile) GetLastUpdated ¶
func (s *DatFile) GetLastUpdated() OptDateTime
GetLastUpdated returns the value of LastUpdated.
func (*DatFile) GetRomCount ¶
GetRomCount returns the value of RomCount.
func (*DatFile) GetVersion ¶
GetVersion returns the value of Version.
func (*DatFile) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*DatFile) SetAutoUpdate ¶
SetAutoUpdate sets the value of AutoUpdate.
func (*DatFile) SetDescription ¶
SetDescription sets the value of Description.
func (*DatFile) SetFormat ¶
func (s *DatFile) SetFormat(val DatFileFormat)
SetFormat sets the value of Format.
func (*DatFile) SetLastUpdated ¶
func (s *DatFile) SetLastUpdated(val OptDateTime)
SetLastUpdated sets the value of LastUpdated.
func (*DatFile) SetRomCount ¶
SetRomCount sets the value of RomCount.
func (*DatFile) SetVersion ¶
SetVersion sets the value of Version.
func (*DatFile) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type DatFileFormat ¶
type DatFileFormat string
const ( DatFileFormatLogiqx DatFileFormat = "logiqx" DatFileFormatMame DatFileFormat = "mame" DatFileFormatCmpro DatFileFormat = "cmpro" DatFileFormatSoftwarelist DatFileFormat = "softwarelist" DatFileFormatSmdb DatFileFormat = "smdb" )
func (DatFileFormat) AllValues ¶
func (DatFileFormat) AllValues() []DatFileFormat
AllValues returns all DatFileFormat values.
func (*DatFileFormat) Decode ¶
func (s *DatFileFormat) Decode(d *jx.Decoder) error
Decode decodes DatFileFormat from json.
func (DatFileFormat) Encode ¶
func (s DatFileFormat) Encode(e *jx.Encoder)
Encode encodes DatFileFormat as json.
func (DatFileFormat) MarshalJSON ¶
func (s DatFileFormat) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (DatFileFormat) MarshalText ¶
func (s DatFileFormat) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*DatFileFormat) UnmarshalJSON ¶
func (s *DatFileFormat) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*DatFileFormat) UnmarshalText ¶
func (s *DatFileFormat) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (DatFileFormat) Validate ¶
func (s DatFileFormat) Validate() error
type DatFileList ¶
Ref: #/components/schemas/DatFileList
func (*DatFileList) Decode ¶
func (s *DatFileList) Decode(d *jx.Decoder) error
Decode decodes DatFileList from json.
func (*DatFileList) Encode ¶
func (s *DatFileList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*DatFileList) GetItems ¶
func (s *DatFileList) GetItems() []DatFile
GetItems returns the value of Items.
func (*DatFileList) GetTotal ¶
func (s *DatFileList) GetTotal() int
GetTotal returns the value of Total.
func (*DatFileList) MarshalJSON ¶
func (s *DatFileList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*DatFileList) SetItems ¶
func (s *DatFileList) SetItems(val []DatFile)
SetItems sets the value of Items.
func (*DatFileList) SetTotal ¶
func (s *DatFileList) SetTotal(val int)
SetTotal sets the value of Total.
func (*DatFileList) UnmarshalJSON ¶
func (s *DatFileList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*DatFileList) Validate ¶
func (s *DatFileList) Validate() error
type DeleteRomNoContent ¶
type DeleteRomNoContent struct{}
DeleteRomNoContent is response for DeleteRom operation.
type DeleteRomParams ¶
DeleteRomParams is parameters of deleteRom operation.
type DownloadRomOK ¶
type DownloadRomParams ¶
DownloadRomParams is parameters of downloadRom operation.
type DownloadRomRes ¶
type DownloadRomRes interface {
// contains filtered or unexported methods
}
type Error ¶
Ref: #/components/schemas/Error
func (*Error) GetMessage ¶
GetMessage returns the value of Message.
func (*Error) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Error) SetMessage ¶
SetMessage sets the value of Message.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type GetPlatformParams ¶
GetPlatformParams is parameters of getPlatform operation.
type GetPlatformRes ¶
type GetPlatformRes interface {
// contains filtered or unexported methods
}
type GetRomParams ¶
GetRomParams is parameters of getRom operation.
type Handler ¶
type Handler interface {
// CreateCollection implements createCollection operation.
//
// Create a collection.
//
// POST /collections
CreateCollection(ctx context.Context, req *CollectionCreate) (*Collection, error)
// CreatePlatform implements createPlatform operation.
//
// Create a platform.
//
// POST /platforms
CreatePlatform(ctx context.Context, req *PlatformCreate) (*Platform, error)
// DeleteRom implements deleteRom operation.
//
// Delete a ROM.
//
// DELETE /roms/{id}
DeleteRom(ctx context.Context, params DeleteRomParams) error
// DownloadRom implements downloadRom operation.
//
// Download ROM file.
//
// GET /roms/{id}/download
DownloadRom(ctx context.Context, params DownloadRomParams) (DownloadRomRes, error)
// GetHealth implements getHealth operation.
//
// Health check.
//
// GET /health
GetHealth(ctx context.Context) (*HealthResponse, error)
// GetPlatform implements getPlatform operation.
//
// Get a platform by ID.
//
// GET /platforms/{id}
GetPlatform(ctx context.Context, params GetPlatformParams) (GetPlatformRes, error)
// GetRom implements getRom operation.
//
// Get ROM details.
//
// GET /roms/{id}
GetRom(ctx context.Context, params GetRomParams) (GetRomRes, error)
// GetStats implements getStats operation.
//
// Library statistics.
//
// GET /stats
GetStats(ctx context.Context) (*Stats, error)
// ListCollections implements listCollections operation.
//
// List collections.
//
// GET /collections
ListCollections(ctx context.Context) (*CollectionList, error)
// ListDats implements listDats operation.
//
// List DAT files.
//
// GET /dats
ListDats(ctx context.Context) (*DatFileList, error)
// ListPlatforms implements listPlatforms operation.
//
// List all platforms.
//
// GET /platforms
ListPlatforms(ctx context.Context, params ListPlatformsParams) (*PlatformList, error)
// ListRoms implements listRoms operation.
//
// List ROMs with filtering.
//
// GET /roms
ListRoms(ctx context.Context, params ListRomsParams) (*RomList, error)
// ListTasks implements listTasks operation.
//
// List background tasks.
//
// GET /tasks
ListTasks(ctx context.Context) (*TaskList, error)
// StartScan implements startScan operation.
//
// Start a library scan.
//
// POST /scan
StartScan(ctx context.Context, req *ScanRequest) (*TaskStatus, error)
// UpdateRom implements updateRom operation.
//
// Update ROM metadata.
//
// PATCH /roms/{id}
UpdateRom(ctx context.Context, req *RomUpdate, params UpdateRomParams) (*Rom, error)
// UploadDat implements uploadDat operation.
//
// Upload a DAT file.
//
// POST /dats
UploadDat(ctx context.Context, req *UploadDatReq) (*DatFile, error)
}
Handler handles operations described by OpenAPI v3 specification.
type HealthResponse ¶
type HealthResponse struct {
Status HealthResponseStatus `json:"status"`
Version string `json:"version"`
MetadataSources OptHealthResponseMetadataSources `json:"metadata_sources"`
}
Ref: #/components/schemas/HealthResponse
func (*HealthResponse) Decode ¶
func (s *HealthResponse) Decode(d *jx.Decoder) error
Decode decodes HealthResponse from json.
func (*HealthResponse) Encode ¶
func (s *HealthResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*HealthResponse) GetMetadataSources ¶
func (s *HealthResponse) GetMetadataSources() OptHealthResponseMetadataSources
GetMetadataSources returns the value of MetadataSources.
func (*HealthResponse) GetStatus ¶
func (s *HealthResponse) GetStatus() HealthResponseStatus
GetStatus returns the value of Status.
func (*HealthResponse) GetVersion ¶
func (s *HealthResponse) GetVersion() string
GetVersion returns the value of Version.
func (*HealthResponse) MarshalJSON ¶
func (s *HealthResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*HealthResponse) SetMetadataSources ¶
func (s *HealthResponse) SetMetadataSources(val OptHealthResponseMetadataSources)
SetMetadataSources sets the value of MetadataSources.
func (*HealthResponse) SetStatus ¶
func (s *HealthResponse) SetStatus(val HealthResponseStatus)
SetStatus sets the value of Status.
func (*HealthResponse) SetVersion ¶
func (s *HealthResponse) SetVersion(val string)
SetVersion sets the value of Version.
func (*HealthResponse) UnmarshalJSON ¶
func (s *HealthResponse) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*HealthResponse) Validate ¶
func (s *HealthResponse) Validate() error
type HealthResponseMetadataSources ¶
func (*HealthResponseMetadataSources) Decode ¶
func (s *HealthResponseMetadataSources) Decode(d *jx.Decoder) error
Decode decodes HealthResponseMetadataSources from json.
func (HealthResponseMetadataSources) Encode ¶
func (s HealthResponseMetadataSources) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (HealthResponseMetadataSources) MarshalJSON ¶
func (s HealthResponseMetadataSources) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*HealthResponseMetadataSources) UnmarshalJSON ¶
func (s *HealthResponseMetadataSources) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type HealthResponseStatus ¶
type HealthResponseStatus string
const ( HealthResponseStatusHealthy HealthResponseStatus = "healthy" HealthResponseStatusDegraded HealthResponseStatus = "degraded" HealthResponseStatusUnhealthy HealthResponseStatus = "unhealthy" )
func (HealthResponseStatus) AllValues ¶
func (HealthResponseStatus) AllValues() []HealthResponseStatus
AllValues returns all HealthResponseStatus values.
func (*HealthResponseStatus) Decode ¶
func (s *HealthResponseStatus) Decode(d *jx.Decoder) error
Decode decodes HealthResponseStatus from json.
func (HealthResponseStatus) Encode ¶
func (s HealthResponseStatus) Encode(e *jx.Encoder)
Encode encodes HealthResponseStatus as json.
func (HealthResponseStatus) MarshalJSON ¶
func (s HealthResponseStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (HealthResponseStatus) MarshalText ¶
func (s HealthResponseStatus) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*HealthResponseStatus) UnmarshalJSON ¶
func (s *HealthResponseStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*HealthResponseStatus) UnmarshalText ¶
func (s *HealthResponseStatus) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (HealthResponseStatus) Validate ¶
func (s HealthResponseStatus) Validate() error
type Invoker ¶
type Invoker interface {
// CreateCollection invokes createCollection operation.
//
// Create a collection.
//
// POST /collections
CreateCollection(ctx context.Context, request *CollectionCreate) (*Collection, error)
// CreatePlatform invokes createPlatform operation.
//
// Create a platform.
//
// POST /platforms
CreatePlatform(ctx context.Context, request *PlatformCreate) (*Platform, error)
// DeleteRom invokes deleteRom operation.
//
// Delete a ROM.
//
// DELETE /roms/{id}
DeleteRom(ctx context.Context, params DeleteRomParams) error
// DownloadRom invokes downloadRom operation.
//
// Download ROM file.
//
// GET /roms/{id}/download
DownloadRom(ctx context.Context, params DownloadRomParams) (DownloadRomRes, error)
// GetHealth invokes getHealth operation.
//
// Health check.
//
// GET /health
GetHealth(ctx context.Context) (*HealthResponse, error)
// GetPlatform invokes getPlatform operation.
//
// Get a platform by ID.
//
// GET /platforms/{id}
GetPlatform(ctx context.Context, params GetPlatformParams) (GetPlatformRes, error)
// GetRom invokes getRom operation.
//
// Get ROM details.
//
// GET /roms/{id}
GetRom(ctx context.Context, params GetRomParams) (GetRomRes, error)
// GetStats invokes getStats operation.
//
// Library statistics.
//
// GET /stats
GetStats(ctx context.Context) (*Stats, error)
// ListCollections invokes listCollections operation.
//
// List collections.
//
// GET /collections
ListCollections(ctx context.Context) (*CollectionList, error)
// ListDats invokes listDats operation.
//
// List DAT files.
//
// GET /dats
ListDats(ctx context.Context) (*DatFileList, error)
// ListPlatforms invokes listPlatforms operation.
//
// List all platforms.
//
// GET /platforms
ListPlatforms(ctx context.Context, params ListPlatformsParams) (*PlatformList, error)
// ListRoms invokes listRoms operation.
//
// List ROMs with filtering.
//
// GET /roms
ListRoms(ctx context.Context, params ListRomsParams) (*RomList, error)
// ListTasks invokes listTasks operation.
//
// List background tasks.
//
// GET /tasks
ListTasks(ctx context.Context) (*TaskList, error)
// StartScan invokes startScan operation.
//
// Start a library scan.
//
// POST /scan
StartScan(ctx context.Context, request *ScanRequest) (*TaskStatus, error)
// UpdateRom invokes updateRom operation.
//
// Update ROM metadata.
//
// PATCH /roms/{id}
UpdateRom(ctx context.Context, request *RomUpdate, params UpdateRomParams) (*Rom, error)
// UploadDat invokes uploadDat operation.
//
// Upload a DAT file.
//
// POST /dats
UploadDat(ctx context.Context, request *UploadDatReq) (*DatFile, error)
}
Invoker invokes operations described by OpenAPI v3 specification.
type Labeler ¶
type Labeler struct {
// contains filtered or unexported fields
}
Labeler is used to allow adding custom attributes to the server request metrics.
func LabelerFromContext ¶
LabelerFromContext retrieves the Labeler from the provided context, if present.
If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.
func (*Labeler) AttributeSet ¶
AttributeSet returns the attributes added to the Labeler as an attribute.Set.
type ListPlatformsParams ¶
type ListPlatformsParams struct {
Page OptInt `json:",omitempty,omitzero"`
PageSize OptInt `json:",omitempty,omitzero"`
}
ListPlatformsParams is parameters of listPlatforms operation.
type ListRomsParams ¶
type ListRomsParams struct {
Page OptInt `json:",omitempty,omitzero"`
PageSize OptInt `json:",omitempty,omitzero"`
PlatformID OptUUID `json:",omitempty,omitzero"`
Category OptString `json:",omitempty,omitzero"`
Search OptString `json:",omitempty,omitzero"`
}
ListRomsParams is parameters of listRoms operation.
type OperationName ¶
type OperationName = string
OperationName is the ogen operation name
const ( CreateCollectionOperation OperationName = "CreateCollection" CreatePlatformOperation OperationName = "CreatePlatform" DeleteRomOperation OperationName = "DeleteRom" DownloadRomOperation OperationName = "DownloadRom" GetHealthOperation OperationName = "GetHealth" GetPlatformOperation OperationName = "GetPlatform" GetRomOperation OperationName = "GetRom" GetStatsOperation OperationName = "GetStats" ListCollectionsOperation OperationName = "ListCollections" ListDatsOperation OperationName = "ListDats" ListPlatformsOperation OperationName = "ListPlatforms" ListRomsOperation OperationName = "ListRoms" ListTasksOperation OperationName = "ListTasks" StartScanOperation OperationName = "StartScan" UpdateRomOperation OperationName = "UpdateRom" UploadDatOperation OperationName = "UploadDat" )
type OptBool ¶
OptBool is optional bool.
func NewOptBool ¶
NewOptBool returns new OptBool with value set to v.
func (OptBool) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptBool) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptDate ¶
OptDate is optional time.Time.
func NewOptDate ¶
NewOptDate returns new OptDate with value set to v.
func (OptDate) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptDate) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptDateTime ¶
OptDateTime is optional time.Time.
func NewOptDateTime ¶
func NewOptDateTime(v time.Time) OptDateTime
NewOptDateTime returns new OptDateTime with value set to v.
func (OptDateTime) Get ¶
func (o OptDateTime) Get() (v time.Time, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptDateTime) IsSet ¶
func (o OptDateTime) IsSet() bool
IsSet returns true if OptDateTime was set.
func (OptDateTime) MarshalJSON ¶
func (s OptDateTime) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptDateTime) Or ¶
func (o OptDateTime) Or(d time.Time) time.Time
Or returns value if set, or given parameter if does not.
func (*OptDateTime) UnmarshalJSON ¶
func (s *OptDateTime) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptFloat64 ¶
OptFloat64 is optional float64.
func NewOptFloat64 ¶
func NewOptFloat64(v float64) OptFloat64
NewOptFloat64 returns new OptFloat64 with value set to v.
func (*OptFloat64) Decode ¶
func (o *OptFloat64) Decode(d *jx.Decoder) error
Decode decodes float64 from json.
func (OptFloat64) Encode ¶
func (o OptFloat64) Encode(e *jx.Encoder)
Encode encodes float64 as json.
func (OptFloat64) Get ¶
func (o OptFloat64) Get() (v float64, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptFloat64) IsSet ¶
func (o OptFloat64) IsSet() bool
IsSet returns true if OptFloat64 was set.
func (OptFloat64) MarshalJSON ¶
func (s OptFloat64) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptFloat64) Or ¶
func (o OptFloat64) Or(d float64) float64
Or returns value if set, or given parameter if does not.
func (*OptFloat64) UnmarshalJSON ¶
func (s *OptFloat64) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptHealthResponseMetadataSources ¶
type OptHealthResponseMetadataSources struct {
Value HealthResponseMetadataSources
Set bool
}
OptHealthResponseMetadataSources is optional HealthResponseMetadataSources.
func NewOptHealthResponseMetadataSources ¶
func NewOptHealthResponseMetadataSources(v HealthResponseMetadataSources) OptHealthResponseMetadataSources
NewOptHealthResponseMetadataSources returns new OptHealthResponseMetadataSources with value set to v.
func (*OptHealthResponseMetadataSources) Decode ¶
func (o *OptHealthResponseMetadataSources) Decode(d *jx.Decoder) error
Decode decodes HealthResponseMetadataSources from json.
func (OptHealthResponseMetadataSources) Encode ¶
func (o OptHealthResponseMetadataSources) Encode(e *jx.Encoder)
Encode encodes HealthResponseMetadataSources as json.
func (OptHealthResponseMetadataSources) Get ¶
func (o OptHealthResponseMetadataSources) Get() (v HealthResponseMetadataSources, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptHealthResponseMetadataSources) IsSet ¶
func (o OptHealthResponseMetadataSources) IsSet() bool
IsSet returns true if OptHealthResponseMetadataSources was set.
func (OptHealthResponseMetadataSources) MarshalJSON ¶
func (s OptHealthResponseMetadataSources) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptHealthResponseMetadataSources) Or ¶
func (o OptHealthResponseMetadataSources) Or(d HealthResponseMetadataSources) HealthResponseMetadataSources
Or returns value if set, or given parameter if does not.
func (*OptHealthResponseMetadataSources) Reset ¶
func (o *OptHealthResponseMetadataSources) Reset()
Reset unsets value.
func (*OptHealthResponseMetadataSources) SetTo ¶
func (o *OptHealthResponseMetadataSources) SetTo(v HealthResponseMetadataSources)
SetTo sets value to v.
func (*OptHealthResponseMetadataSources) UnmarshalJSON ¶
func (s *OptHealthResponseMetadataSources) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptInt ¶
OptInt is optional int.
func (OptInt) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptInt64 ¶
OptInt64 is optional int64.
func NewOptInt64 ¶
NewOptInt64 returns new OptInt64 with value set to v.
func (OptInt64) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt64) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptStatsRegionBreakdown ¶
type OptStatsRegionBreakdown struct {
Value StatsRegionBreakdown
Set bool
}
OptStatsRegionBreakdown is optional StatsRegionBreakdown.
func NewOptStatsRegionBreakdown ¶
func NewOptStatsRegionBreakdown(v StatsRegionBreakdown) OptStatsRegionBreakdown
NewOptStatsRegionBreakdown returns new OptStatsRegionBreakdown with value set to v.
func (*OptStatsRegionBreakdown) Decode ¶
func (o *OptStatsRegionBreakdown) Decode(d *jx.Decoder) error
Decode decodes StatsRegionBreakdown from json.
func (OptStatsRegionBreakdown) Encode ¶
func (o OptStatsRegionBreakdown) Encode(e *jx.Encoder)
Encode encodes StatsRegionBreakdown as json.
func (OptStatsRegionBreakdown) Get ¶
func (o OptStatsRegionBreakdown) Get() (v StatsRegionBreakdown, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptStatsRegionBreakdown) IsSet ¶
func (o OptStatsRegionBreakdown) IsSet() bool
IsSet returns true if OptStatsRegionBreakdown was set.
func (OptStatsRegionBreakdown) MarshalJSON ¶
func (s OptStatsRegionBreakdown) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptStatsRegionBreakdown) Or ¶
func (o OptStatsRegionBreakdown) Or(d StatsRegionBreakdown) StatsRegionBreakdown
Or returns value if set, or given parameter if does not.
func (*OptStatsRegionBreakdown) Reset ¶
func (o *OptStatsRegionBreakdown) Reset()
Reset unsets value.
func (*OptStatsRegionBreakdown) SetTo ¶
func (o *OptStatsRegionBreakdown) SetTo(v StatsRegionBreakdown)
SetTo sets value to v.
func (*OptStatsRegionBreakdown) UnmarshalJSON ¶
func (s *OptStatsRegionBreakdown) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptUUID ¶
OptUUID is optional uuid.UUID.
func NewOptUUID ¶
NewOptUUID returns new OptUUID with value set to v.
type Option ¶
type Option interface {
ServerOption
ClientOption
}
Option is config option.
func WithAttributes ¶
WithAttributes specifies default otel attributes.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the otel.GetMeterProvider() is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type Platform ¶
type Platform struct {
ID uuid.UUID `json:"id"`
Slug string `json:"slug"`
Name string `json:"name"`
Generation OptInt `json:"generation"`
Family OptString `json:"family"`
IgdbID OptInt `json:"igdb_id"`
SgdbID OptInt `json:"sgdb_id"`
MobyID OptInt `json:"moby_id"`
CoverAspect OptString `json:"cover_aspect"`
RomCount OptInt `json:"rom_count"`
CreatedAt OptDateTime `json:"created_at"`
UpdatedAt OptDateTime `json:"updated_at"`
}
Ref: #/components/schemas/Platform
func (*Platform) GetCoverAspect ¶
GetCoverAspect returns the value of CoverAspect.
func (*Platform) GetCreatedAt ¶
func (s *Platform) GetCreatedAt() OptDateTime
GetCreatedAt returns the value of CreatedAt.
func (*Platform) GetGeneration ¶
GetGeneration returns the value of Generation.
func (*Platform) GetRomCount ¶
GetRomCount returns the value of RomCount.
func (*Platform) GetUpdatedAt ¶
func (s *Platform) GetUpdatedAt() OptDateTime
GetUpdatedAt returns the value of UpdatedAt.
func (*Platform) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Platform) SetCoverAspect ¶
SetCoverAspect sets the value of CoverAspect.
func (*Platform) SetCreatedAt ¶
func (s *Platform) SetCreatedAt(val OptDateTime)
SetCreatedAt sets the value of CreatedAt.
func (*Platform) SetGeneration ¶
SetGeneration sets the value of Generation.
func (*Platform) SetRomCount ¶
SetRomCount sets the value of RomCount.
func (*Platform) SetUpdatedAt ¶
func (s *Platform) SetUpdatedAt(val OptDateTime)
SetUpdatedAt sets the value of UpdatedAt.
func (*Platform) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type PlatformCreate ¶
type PlatformCreate struct {
Slug string `json:"slug"`
Name string `json:"name"`
Generation OptInt `json:"generation"`
Family OptString `json:"family"`
}
Ref: #/components/schemas/PlatformCreate
func (*PlatformCreate) Decode ¶
func (s *PlatformCreate) Decode(d *jx.Decoder) error
Decode decodes PlatformCreate from json.
func (*PlatformCreate) Encode ¶
func (s *PlatformCreate) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PlatformCreate) GetFamily ¶
func (s *PlatformCreate) GetFamily() OptString
GetFamily returns the value of Family.
func (*PlatformCreate) GetGeneration ¶
func (s *PlatformCreate) GetGeneration() OptInt
GetGeneration returns the value of Generation.
func (*PlatformCreate) GetName ¶
func (s *PlatformCreate) GetName() string
GetName returns the value of Name.
func (*PlatformCreate) GetSlug ¶
func (s *PlatformCreate) GetSlug() string
GetSlug returns the value of Slug.
func (*PlatformCreate) MarshalJSON ¶
func (s *PlatformCreate) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PlatformCreate) SetFamily ¶
func (s *PlatformCreate) SetFamily(val OptString)
SetFamily sets the value of Family.
func (*PlatformCreate) SetGeneration ¶
func (s *PlatformCreate) SetGeneration(val OptInt)
SetGeneration sets the value of Generation.
func (*PlatformCreate) SetName ¶
func (s *PlatformCreate) SetName(val string)
SetName sets the value of Name.
func (*PlatformCreate) SetSlug ¶
func (s *PlatformCreate) SetSlug(val string)
SetSlug sets the value of Slug.
func (*PlatformCreate) UnmarshalJSON ¶
func (s *PlatformCreate) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type PlatformList ¶
type PlatformList struct {
Items []Platform `json:"items"`
Total int `json:"total"`
Page int `json:"page"`
PageSize int `json:"page_size"`
}
Ref: #/components/schemas/PlatformList
func (*PlatformList) Decode ¶
func (s *PlatformList) Decode(d *jx.Decoder) error
Decode decodes PlatformList from json.
func (*PlatformList) Encode ¶
func (s *PlatformList) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*PlatformList) GetItems ¶
func (s *PlatformList) GetItems() []Platform
GetItems returns the value of Items.
func (*PlatformList) GetPage ¶
func (s *PlatformList) GetPage() int
GetPage returns the value of Page.
func (*PlatformList) GetPageSize ¶
func (s *PlatformList) GetPageSize() int
GetPageSize returns the value of PageSize.
func (*PlatformList) GetTotal ¶
func (s *PlatformList) GetTotal() int
GetTotal returns the value of Total.
func (*PlatformList) MarshalJSON ¶
func (s *PlatformList) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*PlatformList) SetItems ¶
func (s *PlatformList) SetItems(val []Platform)
SetItems sets the value of Items.
func (*PlatformList) SetPage ¶
func (s *PlatformList) SetPage(val int)
SetPage sets the value of Page.
func (*PlatformList) SetPageSize ¶
func (s *PlatformList) SetPageSize(val int)
SetPageSize sets the value of PageSize.
func (*PlatformList) SetTotal ¶
func (s *PlatformList) SetTotal(val int)
SetTotal sets the value of Total.
func (*PlatformList) UnmarshalJSON ¶
func (s *PlatformList) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*PlatformList) Validate ¶
func (s *PlatformList) Validate() error
type Rom ¶
type Rom struct {
ID uuid.UUID `json:"id"`
PlatformID uuid.UUID `json:"platform_id"`
FileName string `json:"file_name"`
FilePath string `json:"file_path"`
FileSize OptInt64 `json:"file_size"`
Name OptString `json:"name"`
Summary OptString `json:"summary"`
Description OptString `json:"description"`
Crc32 OptString `json:"crc32"`
MD5 OptString `json:"md5"`
SHA1 OptString `json:"sha1"`
SHA256 OptString `json:"sha256"`
IgdbID OptInt `json:"igdb_id"`
Genres []string `json:"genres"`
Franchises []string `json:"franchises"`
Companies []string `json:"companies"`
FirstRelease OptDate `json:"first_release"`
AvgRating OptFloat64 `json:"avg_rating"`
Category OptString `json:"category"`
DatMatch OptBool `json:"dat_match"`
Region []string `json:"region"`
Language []string `json:"language"`
MultiFile OptBool `json:"multi_file"`
Media []RomMedia `json:"media"`
CreatedAt OptDateTime `json:"created_at"`
UpdatedAt OptDateTime `json:"updated_at"`
}
Ref: #/components/schemas/Rom
func (*Rom) GetAvgRating ¶
func (s *Rom) GetAvgRating() OptFloat64
GetAvgRating returns the value of AvgRating.
func (*Rom) GetCategory ¶
GetCategory returns the value of Category.
func (*Rom) GetCompanies ¶
GetCompanies returns the value of Companies.
func (*Rom) GetCreatedAt ¶
func (s *Rom) GetCreatedAt() OptDateTime
GetCreatedAt returns the value of CreatedAt.
func (*Rom) GetDatMatch ¶
GetDatMatch returns the value of DatMatch.
func (*Rom) GetDescription ¶
GetDescription returns the value of Description.
func (*Rom) GetFileName ¶
GetFileName returns the value of FileName.
func (*Rom) GetFilePath ¶
GetFilePath returns the value of FilePath.
func (*Rom) GetFileSize ¶
GetFileSize returns the value of FileSize.
func (*Rom) GetFirstRelease ¶
GetFirstRelease returns the value of FirstRelease.
func (*Rom) GetFranchises ¶
GetFranchises returns the value of Franchises.
func (*Rom) GetLanguage ¶
GetLanguage returns the value of Language.
func (*Rom) GetMultiFile ¶
GetMultiFile returns the value of MultiFile.
func (*Rom) GetPlatformID ¶
GetPlatformID returns the value of PlatformID.
func (*Rom) GetSummary ¶
GetSummary returns the value of Summary.
func (*Rom) GetUpdatedAt ¶
func (s *Rom) GetUpdatedAt() OptDateTime
GetUpdatedAt returns the value of UpdatedAt.
func (*Rom) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Rom) SetAvgRating ¶
func (s *Rom) SetAvgRating(val OptFloat64)
SetAvgRating sets the value of AvgRating.
func (*Rom) SetCategory ¶
SetCategory sets the value of Category.
func (*Rom) SetCompanies ¶
SetCompanies sets the value of Companies.
func (*Rom) SetCreatedAt ¶
func (s *Rom) SetCreatedAt(val OptDateTime)
SetCreatedAt sets the value of CreatedAt.
func (*Rom) SetDatMatch ¶
SetDatMatch sets the value of DatMatch.
func (*Rom) SetDescription ¶
SetDescription sets the value of Description.
func (*Rom) SetFileName ¶
SetFileName sets the value of FileName.
func (*Rom) SetFilePath ¶
SetFilePath sets the value of FilePath.
func (*Rom) SetFileSize ¶
SetFileSize sets the value of FileSize.
func (*Rom) SetFirstRelease ¶
SetFirstRelease sets the value of FirstRelease.
func (*Rom) SetFranchises ¶
SetFranchises sets the value of Franchises.
func (*Rom) SetLanguage ¶
SetLanguage sets the value of Language.
func (*Rom) SetMultiFile ¶
SetMultiFile sets the value of MultiFile.
func (*Rom) SetPlatformID ¶
SetPlatformID sets the value of PlatformID.
func (*Rom) SetSummary ¶
SetSummary sets the value of Summary.
func (*Rom) SetUpdatedAt ¶
func (s *Rom) SetUpdatedAt(val OptDateTime)
SetUpdatedAt sets the value of UpdatedAt.
func (*Rom) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type RomList ¶
type RomList struct {
Items []Rom `json:"items"`
Total int `json:"total"`
Page int `json:"page"`
PageSize int `json:"page_size"`
}
Ref: #/components/schemas/RomList
func (*RomList) GetPageSize ¶
GetPageSize returns the value of PageSize.
func (*RomList) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*RomList) SetPageSize ¶
SetPageSize sets the value of PageSize.
func (*RomList) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type RomMedia ¶
type RomMedia struct {
ID uuid.UUID `json:"id"`
Type string `json:"type"`
Source OptString `json:"source"`
Path string `json:"path"`
Width OptInt `json:"width"`
Height OptInt `json:"height"`
}
Ref: #/components/schemas/RomMedia
func (*RomMedia) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*RomMedia) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type RomUpdate ¶
type RomUpdate struct {
Name OptString `json:"name"`
Summary OptString `json:"summary"`
Description OptString `json:"description"`
Category OptString `json:"category"`
IgdbID OptInt `json:"igdb_id"`
}
Ref: #/components/schemas/RomUpdate
func (*RomUpdate) GetCategory ¶
GetCategory returns the value of Category.
func (*RomUpdate) GetDescription ¶
GetDescription returns the value of Description.
func (*RomUpdate) GetSummary ¶
GetSummary returns the value of Summary.
func (*RomUpdate) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*RomUpdate) SetCategory ¶
SetCategory sets the value of Category.
func (*RomUpdate) SetDescription ¶
SetDescription sets the value of Description.
func (*RomUpdate) SetSummary ¶
SetSummary sets the value of Summary.
func (*RomUpdate) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationGroup ¶
OperationGroup returns the x-ogen-operation-group value.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type ScanRequest ¶
type ScanRequest struct {
Type ScanRequestType `json:"type"`
PlatformIds []uuid.UUID `json:"platform_ids"`
}
Ref: #/components/schemas/ScanRequest
func (*ScanRequest) Decode ¶
func (s *ScanRequest) Decode(d *jx.Decoder) error
Decode decodes ScanRequest from json.
func (*ScanRequest) Encode ¶
func (s *ScanRequest) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*ScanRequest) GetPlatformIds ¶
func (s *ScanRequest) GetPlatformIds() []uuid.UUID
GetPlatformIds returns the value of PlatformIds.
func (*ScanRequest) GetType ¶
func (s *ScanRequest) GetType() ScanRequestType
GetType returns the value of Type.
func (*ScanRequest) MarshalJSON ¶
func (s *ScanRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ScanRequest) SetPlatformIds ¶
func (s *ScanRequest) SetPlatformIds(val []uuid.UUID)
SetPlatformIds sets the value of PlatformIds.
func (*ScanRequest) SetType ¶
func (s *ScanRequest) SetType(val ScanRequestType)
SetType sets the value of Type.
func (*ScanRequest) UnmarshalJSON ¶
func (s *ScanRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ScanRequest) Validate ¶
func (s *ScanRequest) Validate() error
type ScanRequestType ¶
type ScanRequestType string
const ( ScanRequestTypeQuick ScanRequestType = "quick" ScanRequestTypeComplete ScanRequestType = "complete" ScanRequestTypeUpdate ScanRequestType = "update" ScanRequestTypeUnmatched ScanRequestType = "unmatched" ScanRequestTypeHashes ScanRequestType = "hashes" ScanRequestTypeNewPlatforms ScanRequestType = "new_platforms" )
func (ScanRequestType) AllValues ¶
func (ScanRequestType) AllValues() []ScanRequestType
AllValues returns all ScanRequestType values.
func (*ScanRequestType) Decode ¶
func (s *ScanRequestType) Decode(d *jx.Decoder) error
Decode decodes ScanRequestType from json.
func (ScanRequestType) Encode ¶
func (s ScanRequestType) Encode(e *jx.Encoder)
Encode encodes ScanRequestType as json.
func (ScanRequestType) MarshalJSON ¶
func (s ScanRequestType) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (ScanRequestType) MarshalText ¶
func (s ScanRequestType) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*ScanRequestType) UnmarshalJSON ¶
func (s *ScanRequestType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*ScanRequestType) UnmarshalText ¶
func (s *ScanRequestType) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (ScanRequestType) Validate ¶
func (s ScanRequestType) Validate() error
type SecurityHandler ¶
type SecurityHandler interface {
// HandleApiKeyAuth handles apiKeyAuth security.
HandleApiKeyAuth(ctx context.Context, operationName OperationName, t ApiKeyAuth) (context.Context, error)
// HandleBearerAuth handles bearerAuth security.
HandleBearerAuth(ctx context.Context, operationName OperationName, t BearerAuth) (context.Context, error)
// HandleCookieAuth handles cookieAuth security.
HandleCookieAuth(ctx context.Context, operationName OperationName, t CookieAuth) (context.Context, error)
}
SecurityHandler is handler for security parameters.
type SecuritySource ¶
type SecuritySource interface {
// ApiKeyAuth provides apiKeyAuth security value.
ApiKeyAuth(ctx context.Context, operationName OperationName) (ApiKeyAuth, error)
// BearerAuth provides bearerAuth security value.
BearerAuth(ctx context.Context, operationName OperationName) (BearerAuth, error)
// CookieAuth provides cookieAuth security value.
CookieAuth(ctx context.Context, operationName OperationName) (CookieAuth, error)
}
SecuritySource is provider of security values (tokens, passwords, etc.).
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, sec SecurityHandler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type Stats ¶
type Stats struct {
PlatformCount OptInt `json:"platform_count"`
RomCount OptInt `json:"rom_count"`
SaveCount OptInt `json:"save_count"`
StateCount OptInt `json:"state_count"`
TotalFileSize OptInt64 `json:"total_file_size"`
DatCoveragePct OptFloat64 `json:"dat_coverage_pct"`
RegionBreakdown OptStatsRegionBreakdown `json:"region_breakdown"`
}
Ref: #/components/schemas/Stats
func (*Stats) GetDatCoveragePct ¶
func (s *Stats) GetDatCoveragePct() OptFloat64
GetDatCoveragePct returns the value of DatCoveragePct.
func (*Stats) GetPlatformCount ¶
GetPlatformCount returns the value of PlatformCount.
func (*Stats) GetRegionBreakdown ¶
func (s *Stats) GetRegionBreakdown() OptStatsRegionBreakdown
GetRegionBreakdown returns the value of RegionBreakdown.
func (*Stats) GetRomCount ¶
GetRomCount returns the value of RomCount.
func (*Stats) GetSaveCount ¶
GetSaveCount returns the value of SaveCount.
func (*Stats) GetStateCount ¶
GetStateCount returns the value of StateCount.
func (*Stats) GetTotalFileSize ¶
GetTotalFileSize returns the value of TotalFileSize.
func (*Stats) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Stats) SetDatCoveragePct ¶
func (s *Stats) SetDatCoveragePct(val OptFloat64)
SetDatCoveragePct sets the value of DatCoveragePct.
func (*Stats) SetPlatformCount ¶
SetPlatformCount sets the value of PlatformCount.
func (*Stats) SetRegionBreakdown ¶
func (s *Stats) SetRegionBreakdown(val OptStatsRegionBreakdown)
SetRegionBreakdown sets the value of RegionBreakdown.
func (*Stats) SetRomCount ¶
SetRomCount sets the value of RomCount.
func (*Stats) SetSaveCount ¶
SetSaveCount sets the value of SaveCount.
func (*Stats) SetStateCount ¶
SetStateCount sets the value of StateCount.
func (*Stats) SetTotalFileSize ¶
SetTotalFileSize sets the value of TotalFileSize.
func (*Stats) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type StatsRegionBreakdown ¶
func (*StatsRegionBreakdown) Decode ¶
func (s *StatsRegionBreakdown) Decode(d *jx.Decoder) error
Decode decodes StatsRegionBreakdown from json.
func (StatsRegionBreakdown) Encode ¶
func (s StatsRegionBreakdown) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (StatsRegionBreakdown) MarshalJSON ¶
func (s StatsRegionBreakdown) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*StatsRegionBreakdown) UnmarshalJSON ¶
func (s *StatsRegionBreakdown) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type TaskList ¶
type TaskList struct {
Items []TaskStatus `json:"items"`
}
Ref: #/components/schemas/TaskList
func (*TaskList) GetItems ¶
func (s *TaskList) GetItems() []TaskStatus
GetItems returns the value of Items.
func (*TaskList) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*TaskList) SetItems ¶
func (s *TaskList) SetItems(val []TaskStatus)
SetItems sets the value of Items.
func (*TaskList) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type TaskStatus ¶
type TaskStatus struct {
ID string `json:"id"`
Type string `json:"type"`
Status TaskStatusStatus `json:"status"`
Progress OptFloat64 `json:"progress"`
Message OptString `json:"message"`
StartedAt OptDateTime `json:"started_at"`
CompletedAt OptDateTime `json:"completed_at"`
}
Ref: #/components/schemas/TaskStatus
func (*TaskStatus) Decode ¶
func (s *TaskStatus) Decode(d *jx.Decoder) error
Decode decodes TaskStatus from json.
func (*TaskStatus) Encode ¶
func (s *TaskStatus) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*TaskStatus) GetCompletedAt ¶
func (s *TaskStatus) GetCompletedAt() OptDateTime
GetCompletedAt returns the value of CompletedAt.
func (*TaskStatus) GetMessage ¶
func (s *TaskStatus) GetMessage() OptString
GetMessage returns the value of Message.
func (*TaskStatus) GetProgress ¶
func (s *TaskStatus) GetProgress() OptFloat64
GetProgress returns the value of Progress.
func (*TaskStatus) GetStartedAt ¶
func (s *TaskStatus) GetStartedAt() OptDateTime
GetStartedAt returns the value of StartedAt.
func (*TaskStatus) GetStatus ¶
func (s *TaskStatus) GetStatus() TaskStatusStatus
GetStatus returns the value of Status.
func (*TaskStatus) GetType ¶
func (s *TaskStatus) GetType() string
GetType returns the value of Type.
func (*TaskStatus) MarshalJSON ¶
func (s *TaskStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*TaskStatus) SetCompletedAt ¶
func (s *TaskStatus) SetCompletedAt(val OptDateTime)
SetCompletedAt sets the value of CompletedAt.
func (*TaskStatus) SetMessage ¶
func (s *TaskStatus) SetMessage(val OptString)
SetMessage sets the value of Message.
func (*TaskStatus) SetProgress ¶
func (s *TaskStatus) SetProgress(val OptFloat64)
SetProgress sets the value of Progress.
func (*TaskStatus) SetStartedAt ¶
func (s *TaskStatus) SetStartedAt(val OptDateTime)
SetStartedAt sets the value of StartedAt.
func (*TaskStatus) SetStatus ¶
func (s *TaskStatus) SetStatus(val TaskStatusStatus)
SetStatus sets the value of Status.
func (*TaskStatus) SetType ¶
func (s *TaskStatus) SetType(val string)
SetType sets the value of Type.
func (*TaskStatus) UnmarshalJSON ¶
func (s *TaskStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*TaskStatus) Validate ¶
func (s *TaskStatus) Validate() error
type TaskStatusStatus ¶
type TaskStatusStatus string
const ( TaskStatusStatusPending TaskStatusStatus = "pending" TaskStatusStatusRunning TaskStatusStatus = "running" TaskStatusStatusCompleted TaskStatusStatus = "completed" TaskStatusStatusFailed TaskStatusStatus = "failed" )
func (TaskStatusStatus) AllValues ¶
func (TaskStatusStatus) AllValues() []TaskStatusStatus
AllValues returns all TaskStatusStatus values.
func (*TaskStatusStatus) Decode ¶
func (s *TaskStatusStatus) Decode(d *jx.Decoder) error
Decode decodes TaskStatusStatus from json.
func (TaskStatusStatus) Encode ¶
func (s TaskStatusStatus) Encode(e *jx.Encoder)
Encode encodes TaskStatusStatus as json.
func (TaskStatusStatus) MarshalJSON ¶
func (s TaskStatusStatus) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (TaskStatusStatus) MarshalText ¶
func (s TaskStatusStatus) MarshalText() ([]byte, error)
MarshalText implements encoding.TextMarshaler.
func (*TaskStatusStatus) UnmarshalJSON ¶
func (s *TaskStatusStatus) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*TaskStatusStatus) UnmarshalText ¶
func (s *TaskStatusStatus) UnmarshalText(data []byte) error
UnmarshalText implements encoding.TextUnmarshaler.
func (TaskStatusStatus) Validate ¶
func (s TaskStatusStatus) Validate() error
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) CreateCollection ¶
func (UnimplementedHandler) CreateCollection(ctx context.Context, req *CollectionCreate) (r *Collection, _ error)
CreateCollection implements createCollection operation.
Create a collection.
POST /collections
func (UnimplementedHandler) CreatePlatform ¶
func (UnimplementedHandler) CreatePlatform(ctx context.Context, req *PlatformCreate) (r *Platform, _ error)
CreatePlatform implements createPlatform operation.
Create a platform.
POST /platforms
func (UnimplementedHandler) DeleteRom ¶
func (UnimplementedHandler) DeleteRom(ctx context.Context, params DeleteRomParams) error
DeleteRom implements deleteRom operation.
Delete a ROM.
DELETE /roms/{id}
func (UnimplementedHandler) DownloadRom ¶
func (UnimplementedHandler) DownloadRom(ctx context.Context, params DownloadRomParams) (r DownloadRomRes, _ error)
DownloadRom implements downloadRom operation.
Download ROM file.
GET /roms/{id}/download
func (UnimplementedHandler) GetHealth ¶
func (UnimplementedHandler) GetHealth(ctx context.Context) (r *HealthResponse, _ error)
GetHealth implements getHealth operation.
Health check.
GET /health
func (UnimplementedHandler) GetPlatform ¶
func (UnimplementedHandler) GetPlatform(ctx context.Context, params GetPlatformParams) (r GetPlatformRes, _ error)
GetPlatform implements getPlatform operation.
Get a platform by ID.
GET /platforms/{id}
func (UnimplementedHandler) GetRom ¶
func (UnimplementedHandler) GetRom(ctx context.Context, params GetRomParams) (r GetRomRes, _ error)
GetRom implements getRom operation.
Get ROM details.
GET /roms/{id}
func (UnimplementedHandler) GetStats ¶
func (UnimplementedHandler) GetStats(ctx context.Context) (r *Stats, _ error)
GetStats implements getStats operation.
Library statistics.
GET /stats
func (UnimplementedHandler) ListCollections ¶
func (UnimplementedHandler) ListCollections(ctx context.Context) (r *CollectionList, _ error)
ListCollections implements listCollections operation.
List collections.
GET /collections
func (UnimplementedHandler) ListDats ¶
func (UnimplementedHandler) ListDats(ctx context.Context) (r *DatFileList, _ error)
ListDats implements listDats operation.
List DAT files.
GET /dats
func (UnimplementedHandler) ListPlatforms ¶
func (UnimplementedHandler) ListPlatforms(ctx context.Context, params ListPlatformsParams) (r *PlatformList, _ error)
ListPlatforms implements listPlatforms operation.
List all platforms.
GET /platforms
func (UnimplementedHandler) ListRoms ¶
func (UnimplementedHandler) ListRoms(ctx context.Context, params ListRomsParams) (r *RomList, _ error)
ListRoms implements listRoms operation.
List ROMs with filtering.
GET /roms
func (UnimplementedHandler) ListTasks ¶
func (UnimplementedHandler) ListTasks(ctx context.Context) (r *TaskList, _ error)
ListTasks implements listTasks operation.
List background tasks.
GET /tasks
func (UnimplementedHandler) StartScan ¶
func (UnimplementedHandler) StartScan(ctx context.Context, req *ScanRequest) (r *TaskStatus, _ error)
StartScan implements startScan operation.
Start a library scan.
POST /scan
func (UnimplementedHandler) UpdateRom ¶
func (UnimplementedHandler) UpdateRom(ctx context.Context, req *RomUpdate, params UpdateRomParams) (r *Rom, _ error)
UpdateRom implements updateRom operation.
Update ROM metadata.
PATCH /roms/{id}
func (UnimplementedHandler) UploadDat ¶
func (UnimplementedHandler) UploadDat(ctx context.Context, req *UploadDatReq) (r *DatFile, _ error)
UploadDat implements uploadDat operation.
Upload a DAT file.
POST /dats
type UpdateRomParams ¶
UpdateRomParams is parameters of updateRom operation.
type UploadDatReq ¶
type UploadDatReq struct {
File ht.MultipartFile `json:"file"`
AutoUpdate OptBool `json:"auto_update"`
}
func (*UploadDatReq) GetAutoUpdate ¶
func (s *UploadDatReq) GetAutoUpdate() OptBool
GetAutoUpdate returns the value of AutoUpdate.
func (*UploadDatReq) GetFile ¶
func (s *UploadDatReq) GetFile() ht.MultipartFile
GetFile returns the value of File.
func (*UploadDatReq) SetAutoUpdate ¶
func (s *UploadDatReq) SetAutoUpdate(val OptBool)
SetAutoUpdate sets the value of AutoUpdate.
func (*UploadDatReq) SetFile ¶
func (s *UploadDatReq) SetFile(val ht.MultipartFile)
SetFile sets the value of File.
Source Files
¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_interfaces_gen.go
- oas_json_gen.go
- oas_labeler_gen.go
- oas_middleware_gen.go
- oas_operations_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_security_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go