model

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CDKAuthResponse added in v0.9.0

type CDKAuthResponse struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

type CreateResourceParam

type CreateResourceParam struct {
	ID          string
	Name        string
	Description string
	UpdateType  string
}

type CreateResourceRequest

type CreateResourceRequest struct {
	ID          string `json:"id" validate:"required,min=3,max=64,slug"`
	Name        string `json:"name" validate:"required"`
	Description string `json:"description" validate:"max=255"`
	UpdateType  string `json:"update_type" validate:"omitempty,oneof=full incremental"`
}

type CreateResourceResponseData

type CreateResourceResponseData struct {
	ID          string `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
}

type CreateVersionCallBackParam added in v0.5.0

type CreateVersionCallBackParam struct {
	ResourceID string `json:"resource_id"`
	Name       string `json:"name"`
	OS         string `json:"os"`
	Arch       string `json:"arch"`
	Channel    string `json:"channel"`
	Key        string `json:"key"`
}

type CreateVersionCallBackRequest added in v0.6.0

type CreateVersionCallBackRequest struct {
	Name    string `json:"name" form:"name" validate:"required"`
	OS      string `json:"os" form:"os"`
	Arch    string `json:"arch" form:"arch"`
	Channel string `json:"channel" form:"channel"`
	Key     string `json:"key" form:"key" validate:"required"`
}

type CreateVersionParam

type CreateVersionParam struct {
	ResourceID string
	Name       string
	OS         string
	Arch       string
	Channel    string
	Filename   string
}

type CreateVersionRequest added in v0.6.0

type CreateVersionRequest struct {
	Name     string `json:"name" form:"name" validate:"required"`
	OS       string `json:"os" form:"os"`
	Arch     string `json:"arch" form:"arch"`
	Channel  string `json:"channel" form:"channel"`
	Filename string `json:"filename" form:"filename" validate:"required"`
}

type CreateVersionResponseData

type CreateVersionResponseData struct {
	Name   string `json:"name"`
	Number uint64 `json:"number"`
	OS     string `json:"os,omitempty"`
	Arch   string `json:"arch,omitempty"`
}

type DistributeInfo added in v0.4.1

type DistributeInfo struct {
	UA       string `json:"ua,omitempty"`
	IP       string `json:"ip,omitempty"`
	CDK      string `json:"cdk"`
	Resource string `json:"resource,omitempty"`
	Version  string `json:"version,omitempty"`
	Filesize int64  `json:"filesize,omitempty"`
	RelPath  string `json:"rel_path"`
}

type DownloadValidateCDKRequest added in v0.9.0

type DownloadValidateCDKRequest struct {
	CDK      string `json:"cdk"`
	Resource string `json:"resource"`
	UA       string `json:"ua"`
	IP       string `json:"ip"`
	Version  string `json:"version"`
	Filesize int64  `json:"filesize"`
}

type ExistVersionNameWithOSAndArchParam added in v0.4.0

type ExistVersionNameWithOSAndArchParam struct {
	ResourceId  string
	VersionName string
	OS          string
	Arch        string
}

type FileDetectResult added in v0.12.0

type FileDetectResult struct {
	Valid    bool
	FileType types.FileType
}

type GetLatestVersionRequest

type GetLatestVersionRequest struct {
	ResourceID     string
	CurrentVersion string `query:"current_version"`
	OS             string `query:"os"`
	Arch           string `query:"arch"`
	Channel        string `query:"channel"`
	CDK            string `query:"cdk"`
	UserAgent      string `query:"user_agent"`
}

type GetVersionByNameParam

type GetVersionByNameParam struct {
	ResourceID  string
	VersionName string
}

type IncrementalUpdateInfo added in v0.5.0

type IncrementalUpdateInfo struct {
	Storage *ent.Storage
}

type LatestVersionInfo added in v0.5.0

type LatestVersionInfo struct {
	// by logic injection
	ResourceUpdateType types.Update
	VersionId          int            `db:"version_id"`
	VersionName        string         `db:"version_name"`
	VersionNumber      uint64         `db:"version_number"`
	ReleaseNote        string         `db:"release_note"`
	CustomData         string         `db:"custom_data"`
	OS                 string         `db:"os"`
	Arch               string         `db:"arch"`
	Channel            string         `db:"channel"`
	PackageHash        sql.NullString `db:"package_hash_sha256"`
	PackagePath        sql.NullString `db:"package_path"`
	CreatedAt          time.Time      `db:"created_at"`
	VersionSerial      int            `db:"version_serial"`
}

type MultiVersionInfo added in v0.5.0

type MultiVersionInfo struct {
	LatestVersionInfo *LatestVersionInfo
}

type PatchInfoTuple added in v0.12.0

type PatchInfoTuple struct {
	SrcPackage  string
	DestPackage string
	FileType    string
}

type PatchTaskExecuteParam added in v0.5.0

type PatchTaskExecuteParam struct {
	ResourceId           string
	TargetOriginPackage  string
	TargetVersionId      int
	CurrentVersionId     int
	TargetFileType       string
	CurrentFileType      string
	TargetStorageHashes  map[string]string
	CurrentStorageHashes map[string]string
	OS                   string
	Arch                 string
}

type PatchTaskPayload added in v0.5.0

type PatchTaskPayload struct {
	ResourceId       string
	CurrentVersionId int
	TargetVersionId  int
	OS               string
	Arch             string
}

type QueryLatestResponseData

type QueryLatestResponseData struct {
	VersionName   string `json:"version_name"`
	VersionNumber uint64 `json:"version_number"`
	Url           string `json:"url,omitempty"`
	SHA256        string `json:"sha256,omitempty"`
	Channel       string `json:"channel"`
	OS            string `json:"os"`
	Arch          string `json:"arch"`
	// UpdateType is the type of the update, it can be "full" or "incremental"
	UpdateType     string `json:"update_type,omitempty"`
	CustomData     string `json:"custom_data,omitempty"`
	ReleaseNote    string `json:"release_note"`
	Filesize       int64  `json:"filesize,omitempty"`
	CDKExpiredTime int64  `json:"cdk_expired_time,omitempty"`
}

type ResourcePurgeInfo added in v0.5.1

type ResourcePurgeInfo struct {
	VersionName   string `db:"version_name"`
	Channel       string `db:"channel"`
	ResourceId    string `db:"resource_id"`
	VersionId     int    `db:"version_id"`
	StorageId     int    `db:"storage_id"`
	OS            string `db:"os"`
	Arch          string `db:"arch"`
	VersionSerial int    `db:"version_serial"`
}

type StorageInfoCreatePayload added in v0.5.2

type StorageInfoCreatePayload struct {
	ResourceId  string
	Dest        string
	VersionId   int
	VersionName string

	OS         string
	Arch       string
	Channel    string
	FileHashes map[string]string

	IncrementalType types.FileType
}

type UpdateCustomDataRequest added in v0.5.0

type UpdateCustomDataRequest struct {
	VersionName string `json:"version_name"`
	Channel     string `json:"channel"`
	Content     string `json:"content"`
}

type UpdateInfo added in v0.4.1

type UpdateInfo struct {
	RelPath    string
	SHA256     string
	UpdateType string
	Filesize   int64
}

type UpdateInfoTuple added in v0.5.0

type UpdateInfoTuple struct {
	PackageHash string
	PackagePath string
	UpdateType  string
}

type UpdateReleaseNoteDetailParam added in v0.4.0

type UpdateReleaseNoteDetailParam struct {
	VersionID         int
	ReleaseNoteDetail string
}

type UpdateReleaseNoteRequest added in v0.5.0

type UpdateReleaseNoteRequest struct {
	VersionName string `json:"version_name"`
	Channel     string `json:"channel"`
	Content     string `json:"content"`
}

type UpdateReleaseNoteSummaryParam added in v0.4.0

type UpdateReleaseNoteSummaryParam struct {
	VersionID          int
	ReleaseNoteSummary string
}

type UpdateRequestParam added in v0.5.0

type UpdateRequestParam struct {
	ResourceId         string
	CurrentVersionName string
	TargetVersionInfo  *LatestVersionInfo
}

type ValidateCDKRequest

type ValidateCDKRequest struct {
	CDK      string `json:"cdk"`
	Resource string `json:"resource"`
	UA       string `json:"ua"`
	IP       string `json:"ip"`
}

type ValidateResponse added in v0.9.0

type ValidateResponse struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
	Data int64  `json:"data"`
}

type ValidateUploaderResponse

type ValidateUploaderResponse struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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