capgo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CapgoController

type CapgoController struct {
	// contains filtered or unexported fields
}

func NewCapgoController

func NewCapgoController() *CapgoController

func (*CapgoController) RegisterChannel

func (ctrl *CapgoController) RegisterChannel(ctx *gin.Context)

func (*CapgoController) Stats

func (ctrl *CapgoController) Stats(ctx *gin.Context)

func (*CapgoController) UnregisterChannel

func (ctrl *CapgoController) UnregisterChannel(ctx *gin.Context)

func (*CapgoController) Updates

func (ctrl *CapgoController) Updates(ctx *gin.Context)

type CapgoErrorResponse

type CapgoErrorResponse struct {
	Error string `json:"error"`
}

type CapgoIncorrectWithMessageResponse

type CapgoIncorrectWithMessageResponse struct {
	Message string `json:"message"`
}

type UpdateBreakingChangeVersionResponse

type UpdateBreakingChangeVersionResponse struct {
	// Message is a message to show to user about new major breaking change version.
	Message string `json:"message"`
	// Major is true if this is a major breaking change version. In most case, it is true.
	Major bool `json:"major"`
	//Version is a new major breaking change version.
	Version string `json:"version"`
}

type UpdateRequest

type UpdateRequest struct {
	Platform string `json:"platform"`
	DeviceID string `json:"device_id"`
	AppID    string `json:"app_id"`
	CustomID string `json:"custom_id"`

	// VersionBuild from application. For Android, it is same as <manifest versionName="...">
	VersionBuild string `json:"version_build"`

	// VersionCode from application. For Android, it is same as <manifest versionCode="...">
	VersionCode string `json:"version_code"`

	VersionOS      string `json:"version_os"`
	VersionName    string `json:"version_name"`
	PluginVersion  string `json:"plugin_version"`
	IsEmulator     bool   `json:"is_emulator"`
	IsProd         bool   `json:"is_prod"`
	DefaultChannel string `json:"defaultChannel"`
}

func (*UpdateRequest) GetPlatform

func (c *UpdateRequest) GetPlatform() db.Platform

func (*UpdateRequest) IsValid

func (c *UpdateRequest) IsValid() bool

type UpdateWithNewMinorVersionResponse

type UpdateWithNewMinorVersionResponse struct {
	// Version is a new version string. Capgo will download from URL if this version string doesn't equal to current version
	Version string `json:"version"`
	// URL is a zipped bundle download url
	URL string `json:"url"`
	// SessionKey is Base64 IV + Cipher AES key. Use for decrypt the bundle (encrypted with private key embedded in the app). Can be empty if not use
	SessionKey string `json:"sessionKey"`
	//Checksum is CRC checksum of the bundle
	Checksum string `json:"checksum"`
	//Signature is a signature of the bundle, signed with SHA512 RSA public key that configured in the app. Can be empty if not use
	Signature string `json:"signature"`
}

Jump to

Keyboard shortcuts

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