appetize

package
v0.0.0-...-8364b2f Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IOS     Platform = "ios"
	Android Platform = "android"
	Unknown Platform = "unknown"

	ZIP Extension = ".zip"
	APP Extension = ".app"
	GZ  Extension = ".gz"
	APK Extension = ".apk"
)

const

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact

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

Artifact ...

func NewArtifact

func NewArtifact(filePath string) (Artifact, error)

NewArtifact checks the extension for the given file. For iOS platform the accepted extensions: .app, .zip, .tar.gz. For Android platform the accepted extension: .apk. Returns a new Artifact with the platform of the provided file [iOS, Android] and it's extension. **If the extension is not .app, .zip, .tar.gz. or .apk it will return an error.**

func (Artifact) EnsureExtension

func (a Artifact) EnsureExtension() (string, error)

EnsureExtension checks the extension for the given platform. For iOS platform the accepted extensions: .app, .zip, .tar.gz. For Android platform the accepted extension: .apk. Returns the path of the file if the extension is valid. **If the platorm is iOS and the given file's extension is .app it creates a new .zip and returns the .zip's path.**

func (Artifact) Ext

func (a Artifact) Ext() Extension

Ext returns the artifact's extension

func (Artifact) Path

func (a Artifact) Path() string

Path returns the artifact's path

func (Artifact) Platform

func (a Artifact) Platform() Platform

Platform returns the artifact's platform

func (Artifact) String

func (a Artifact) String() string

type Client

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

Client ...

func NewClient

func NewClient(token string, appPath string, artifact Artifact, publicKey string, apiEndPoint string) *Client

NewClient ...

func (*Client) DirectFileUpload

func (client *Client) DirectFileUpload() (Response, error)

DirectFileUpload ...

type Extension

type Extension string

Extension [.zip, .app, .gz, .apk]

func (Extension) String

func (e Extension) String() string

type Platform

type Platform string

Platform [IOS, Android, Unknown]

func (Platform) String

func (p Platform) String() string

type Response

type Response struct {
	PublicKey      string        `json:"publicKey"`
	PrivateKey     string        `json:"privateKey"`
	Updated        time.Time     `json:"updated"`
	Email          string        `json:"email"`
	Platform       string        `json:"platform"`
	VersionCode    int           `json:"versionCode"`
	Created        time.Time     `json:"created"`
	Architectures  []interface{} `json:"architectures"`
	AppPermissions struct {
	} `json:"appPermissions"`
	PublicURL string `json:"publicURL"`
	AppURL    string `json:"appURL"`
	ManageURL string `json:"manageURL"`
}

Response ...

Jump to

Keyboard shortcuts

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