deploygate

package module
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: MIT Imports: 12 Imported by: 0

README

go_deploygate

DeployGate Client for golang

Usage

check sample code

Documentation

Index

Constants

View Source
const (
	DGApiTokenEnv = "DEPLOYGATE_API_KEY"
	DGApiEndpoint = "https://deploygate.com/api"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddAppMembersRequest

type AddAppMembersRequest struct {
	Owner    string
	Platform string
	AppId    string
	Users    string
	Role     string
}

type AddAppMembersResponse

type AddAppMembersResponse struct {
	Error   bool                        `mapstructure:"error" json:"error"`
	Message string                      `mapstructure:"message" json:"message"`
	Because string                      `mapstructure:"because" json:"because"`
	Results AddAppMembersResponseResult `mapstructure:"results" json:"results"`
}

type AddAppMembersResponseResult

type AddAppMembersResponseResult struct {
	Invite  string `mapstructure:"invite" json:"invite"`
	Added   []User `mapstructure:"added" json:"added"`
	Invited []User `mapstructure:"invited" json:"invited"`
}

type AddAppSharedTeamRequest

type AddAppSharedTeamRequest struct {
	Organization string
	Platform     string
	AppId        string
	Team         string
}

type AddAppSharedTeamResponse

type AddAppSharedTeamResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
	Because string `mapstructure:"because" json:"because"`
}

type AddAppTeamRequest

type AddAppTeamRequest struct {
	Organization string
	Platform     string
	AppId        string
	Team         string
}

type AddAppTeamResponse

type AddAppTeamResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
	Because string `mapstructure:"because" json:"because"`
}

type AddEnterpriseMemberRequest

type AddEnterpriseMemberRequest struct {
	Enterprise string
	User       string
}

type AddEnterpriseMemberResponse

type AddEnterpriseMemberResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
	Because string `mapstructure:"because" json:"because"`
}

type AddEnterpriseOrganizationMemberRequest

type AddEnterpriseOrganizationMemberRequest struct {
	Enterprise   string
	Organization string
	User         string
}

type AddEnterpriseOrganizationMemberResponse

type AddEnterpriseOrganizationMemberResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
	Because string `mapstructure:"because" json:"because"`
}

type AddEnterpriseSharedTeamRequest

type AddEnterpriseSharedTeamRequest struct {
	Enterprise  string
	SharedTeam  string
	Description string
}

type AddEnterpriseSharedTeamResponse

type AddEnterpriseSharedTeamResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
	Because string `mapstructure:"because" json:"because"`
}

type AddOrganizationMemberByEmailRequest

type AddOrganizationMemberByEmailRequest struct {
	Organization string
	Email        string
}

type AddOrganizationMemberByUserNameRequest

type AddOrganizationMemberByUserNameRequest struct {
	Organization string
	UserName     string
}

type AddOrganizationMemberResponse

type AddOrganizationMemberResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
}

type AddOrganizationTeamMemberRequest

type AddOrganizationTeamMemberRequest struct {
	Organization string
	Team         string
	User         string
}

type AddOrganizationTeamMemberResponse

type AddOrganizationTeamMemberResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
}

type Application added in v1.0.2

type Application struct {
	Name             string      `mapstructure:"name" json:"name"`
	PackageName      string      `mapstructure:"package_name" json:"package_name"`
	Labels           interface{} `mapstructure:"labels" json:"labels"`
	OsName           string      `mapstructure:"os_name" json:"os_name"`
	Path             string      `mapstructure:"path" json:"path"`
	UpdatedAt        uint        `mapstructure:"updated_at" json:"updated_at"`
	VersionCode      string      `mapstructure:"version_code" json:"version_code"`
	VersionName      string      `mapstructure:"version_name" json:"version_name"`
	SdkVersion       uint        `mapstructure:"sdk_version" json:"sdk_version"`
	RawSdkVersion    string      `mapstructure:"raw_sdk_version" json:"raw_sdk_version"`
	TargetSdkVersion uint        `mapstructure:"target_sdk_version" json:"target_sdk_version"`
	Signature        string      `mapstructure:"signature" json:"signature"`
	Md5              string      `mapstructure:"md5" json:"md5"`
	Revision         uint        `mapstructure:"revision" json:"revision"`
	File_Size        string      `mapstructure:"file_size" json:"file_size"`
	Icon             string      `mapstructure:"icon" json:"icon"`
	Message          string      `mapstructure:"message" json:"message"`
	File             string      `mapstructure:"file" json:"file"`
	User             struct {
		ID          uint   `mapstructure:"id" json:"id"`
		Name        string `mapstructure:"name" json:"name"`
		ProfileIcon string `mapstructure:"profile_icon" json:"profile_icon"`
	} `mapstructure:"user" json:"user"`
}

type Client

type Client struct {
	HttpClient *http.Client // Http client for using http request
	// contains filtered or unexported fields
}

func DefaultClient

func DefaultClient() (*Client, error)

func NewClient

func NewClient(conf ClientConfig) (*Client, error)

func (*Client) AddAppMembers

func (c *Client) AddAppMembers(req *AddAppMembersRequest) (*AddAppMembersResponse, error)

func (*Client) AddAppSharedTeam

func (c *Client) AddAppSharedTeam(req *AddAppSharedTeamRequest) (*AddAppSharedTeamResponse, error)

func (*Client) AddAppTeam

func (c *Client) AddAppTeam(req *AddAppTeamRequest) (*AddAppTeamResponse, error)

func (*Client) AddEnterpriseMember

func (c *Client) AddEnterpriseMember(req *AddEnterpriseMemberRequest) (*AddEnterpriseMemberResponse, error)

func (*Client) AddEnterpriseSharedTeam

func (c *Client) AddEnterpriseSharedTeam(req *AddEnterpriseSharedTeamRequest) (*AddEnterpriseSharedTeamResponse, error)

func (*Client) AddOrganizationMemberByEmail

func (c *Client) AddOrganizationMemberByEmail(req *AddOrganizationMemberByEmailRequest) (*AddOrganizationMemberResponse, error)

func (*Client) AddOrganizationMemberByUserName

func (c *Client) AddOrganizationMemberByUserName(req *AddOrganizationMemberByUserNameRequest) (*AddOrganizationMemberResponse, error)

func (*Client) CreateOrganization

func (c *Client) CreateOrganization(req *CreateOrganizationRequest) (*CreateOrganizationResponse, error)

func (*Client) Decode

func (c *Client) Decode(resp *http.Response, out interface{}) error

func (*Client) Delete

func (c *Client) Delete(httpRequest *HttpRequest) (*http.Response, error)

func (*Client) DeleteDistributionsPage

func (c *Client) DeleteDistributionsPage(req *DeleteDistributionsPageRequest) (*DeleteDistributionsPageResponse, error)

func (*Client) DeleteOrganization

func (c *Client) DeleteOrganization(req *DeleteOrganizationRequest) (*DeleteOrganizationResponse, error)

func (*Client) DisableAppProtection

func (c *Client) DisableAppProtection(req *DisableAppProtectionRequest) (*DisableAppProtectionResponse, error)

func (*Client) EnableAppProtection

func (c *Client) EnableAppProtection(req *EnableAppProtectionRequest) (*EnableAppProtectionResponse, error)

func (*Client) Get

func (c *Client) Get(httpRequest *HttpRequest) (*http.Response, error)

func (*Client) GetAppMembers

func (c *Client) GetAppMembers(req *GetAppMembersRequest) (*GetAppMembersResponse, error)

func (*Client) GetOrganization

func (c *Client) GetOrganization(req *GetOrganizationRequest) (*GetOrganizationResponse, error)

func (*Client) ListAppSharedTeams

func (c *Client) ListAppSharedTeams(req *ListAppSharedTeamsRequest) (*ListAppSharedTeamsResponse, error)

func (*Client) ListAppTeams

func (c *Client) ListAppTeams(req *ListAppTeamsRequest) (*ListAppTeamsResponse, error)

func (*Client) ListEnterpriseMembers

func (c *Client) ListEnterpriseMembers(req *ListEnterpriseMembersRequest) (*ListEnterpriseMembersResponse, error)

func (*Client) ListOrganizationMembers

func (c *Client) ListOrganizationMembers(req *ListOrganizationMembersRequest) (*ListOrganizationMembersResponse, error)

func (*Client) ListOrganizations

func (c *Client) ListOrganizations() (*ListOrganizationsResponse, error)

func (*Client) NewRequest

func (c *Client) NewRequest(httpRequest *HttpRequest) (*http.Response, error)

func (*Client) Patch

func (c *Client) Patch(httpRequest *HttpRequest) (*http.Response, error)

func (*Client) Post

func (c *Client) Post(httpRequest *HttpRequest) (*http.Response, error)

func (*Client) RemoveAppMembers

func (c *Client) RemoveAppMembers(req *RemoveAppMembersRequest) (*RemoveAppMembersResponse, error)

func (*Client) RemoveAppSharedTeam

func (c *Client) RemoveAppSharedTeam(req *RemoveAppSharedTeamRequest) (*RemoveAppSharedTeamResponse, error)

func (*Client) RemoveAppTeam

func (c *Client) RemoveAppTeam(req *RemoveAppTeamRequest) (*RemoveAppTeamResponse, error)

func (*Client) RemoveEnterpriseMember

func (c *Client) RemoveEnterpriseMember(req *RemoveEnterpriseMemberRequest) (*RemoveEnterpriseMemberResponse, error)

func (*Client) UpdateOrganization

func (c *Client) UpdateOrganization(req *UpdateOrganizationRequest) (*UpdateOrganizationResponse, error)

func (*Client) UploadApps

func (c *Client) UploadApps(req *UploadAppsRequest) (*UploadAppsResponse, error)

type ClientConfig added in v1.0.11

type ClientConfig struct {
	ApiKey      string
	ApiEndpoint *string
}

type CreateOrganizationRequest

type CreateOrganizationRequest struct {
	Name        string
	Description string
}

type CreateOrganizationResponse

type CreateOrganizationResponse struct {
	Error        bool         `mapstructure:"error" json:"error"`
	Message      string       `mapstructure:"message" json:"message"`
	Organization Organization `mapstructure:"organization" json:"organization"`
}

type DeleteAppDistributionsPageRequest

type DeleteAppDistributionsPageRequest struct {
	Owner            string
	Platform         string
	AppId            string
	DistributionName string
}

type DeleteAppDistributionsPageResponse

type DeleteAppDistributionsPageResponse struct {
	Error   bool    `mapstructure:"error" json:"error"`
	Message string  `mapstructure:"message" json:"message"`
	Results Results `mapstructure:"results" json:"results"`
}

type DeleteDistributionsPageRequest

type DeleteDistributionsPageRequest struct {
	Distribution string
}

type DeleteDistributionsPageResponse

type DeleteDistributionsPageResponse struct {
	Error   bool    `mapstructure:"error" json:"error"`
	Message string  `mapstructure:"message" json:"message"`
	Results Results `mapstructure:"results" json:"results"`
}

type DeleteOrganizationRequest

type DeleteOrganizationRequest struct {
	Name string
}

type DeleteOrganizationResponse

type DeleteOrganizationResponse struct {
	Error   bool    `mapstructure:"error" json:"error"`
	Message string  `mapstructure:"message" json:"message"`
	Results Results `mapstructure:"results" json:"results"`
}

type DisableAppProtectionRequest

type DisableAppProtectionRequest struct {
	Owner    string
	Platform string
	AppId    string
	Revision int32
}

type DisableAppProtectionResponse

type DisableAppProtectionResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
	Results string `mapstructure:"results" json:"results"`
}

type EnableAppProtectionRequest

type EnableAppProtectionRequest struct {
	Owner    string
	Platform string
	AppId    string
	Revision int32
}

type EnableAppProtectionResponse

type EnableAppProtectionResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
	Results string `mapstructure:"results" json:"results"`
}

type EnterpriseMember added in v1.0.2

type EnterpriseMember struct {
	Type         string `mapstructure:"type" json:"type"`
	Name         string `mapstructure:"name" json:"name"`
	IconUrl      string `mapstructure:"icon_url" json:"icon_url"`
	Url          string `mapstructure:"url" json:"url"`
	FullName     string `mapstructure:"full_name" json:"full_name"`
	Email        string `mapstructure:"email" json:"email"`
	Role         string `mapstructure:"role" json:"role"`
	CreatedAt    string `mapstructure:"created_at" json:"created_at"`
	LastAccessAt string `mapstructure:"last_access_at" json:"last_access_at"`
}

type GetAppMembersRequest

type GetAppMembersRequest struct {
	Owner    string
	Platform string
	AppId    string
}

type GetAppMembersResponse

type GetAppMembersResponse struct {
	Error   bool                        `mapstructure:"error" json:"error"`
	Results GetAppMembersResponseResult `mapstructure:"results" json:"results"`
}

type GetAppMembersResponseResult

type GetAppMembersResponseResult struct {
	Usage Usage  `mapstructure:"usage" json:"usage"`
	Users []User `mapstructure:"users" json:"users"`
}

type GetOrganizationRequest

type GetOrganizationRequest struct {
	Name string
}

type GetOrganizationResponse

type GetOrganizationResponse struct {
	Error        bool             `mapstructure:"error" json:"error"`
	Message      string           `mapstructure:"message" json:"message"`
	Organization OrganizationInfo `mapstructure:"organization" json:"organization"`
}
type Header struct {
	// contains filtered or unexported fields
}

type HttpRequest

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

type ListAppSharedTeamsRequest

type ListAppSharedTeamsRequest struct {
	Organization string
	Platform     string
	AppId        string
}

type ListAppSharedTeamsResponse

type ListAppSharedTeamsResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
	Because string `mapstructure:"because" json:"because"`
	Teams   []Team `mapstructure:"teams" json:"teams"`
}

type ListAppTeamsRequest

type ListAppTeamsRequest struct {
	Organization string
	Platform     string
	AppId        string
}

type ListAppTeamsResponse

type ListAppTeamsResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
	Because string `mapstructure:"because" json:"because"`
	Teams   []Team `mapstructure:"teams" json:"teams"`
}

type ListEnterpriseMembersRequest

type ListEnterpriseMembersRequest struct {
	Enterprise string
}

type ListEnterpriseMembersResponse

type ListEnterpriseMembersResponse struct {
	Error   bool               `mapstructure:"error" json:"error"`
	Message string             `mapstructure:"message" json:"message"`
	Because string             `mapstructure:"because" json:"because"`
	Users   []EnterpriseMember `mapstructure:"users" json:"users"`
}

type ListEnterpriseOrganizationMembersRequest

type ListEnterpriseOrganizationMembersRequest struct {
	Enterprise   string
	Organization string
}

type ListEnterpriseOrganizationMembersResponse

type ListEnterpriseOrganizationMembersResponse struct {
	Error   bool     `mapstructure:"error" json:"error"`
	Message string   `mapstructure:"message" json:"message"`
	Because string   `mapstructure:"because" json:"because"`
	Users   []Member `mapstructure:"users" json:"users"`
}

type ListEnterpriseSharedTeamsRequest

type ListEnterpriseSharedTeamsRequest struct {
	Enterprise string
}

type ListEnterpriseSharedTeamsResponse

type ListEnterpriseSharedTeamsResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
	Because string `mapstructure:"because" json:"because"`
	Teams   []Team `mapstructure:"teams" json:"teams"`
}

type ListOrganizationMembersRequest

type ListOrganizationMembersRequest struct {
	Organization string
}

type ListOrganizationMembersResponse

type ListOrganizationMembersResponse struct {
	Error   bool     `mapstructure:"error" json:"error"`
	Message string   `mapstructure:"message" json:"message"`
	Members []Member `mapstructure:"members" json:"members"`
}

type ListOrganizationTeamMembersRequest

type ListOrganizationTeamMembersRequest struct {
	Organization string
	Team         string
}

type ListOrganizationTeamMembersResponse

type ListOrganizationTeamMembersResponse struct {
	Error   bool     `mapstructure:"error" json:"error"`
	Message string   `mapstructure:"message" json:"message"`
	Users   []Member `mapstructure:"users" json:"users"`
}

type ListOrganizationsResponse

type ListOrganizationsResponse struct {
	Error         bool           `mapstructure:"error" json:"error"`
	Message       string         `mapstructure:"message" json:"message"`
	Organizations []Organization `mapstructure:"organizations" json:"organizations"`
}

type Member

type Member struct {
	Type    string `mapstructure:"type" json:"type"`
	Name    string `mapstructure:"name" json:"name"`
	IconUrl string `mapstructure:"icon_url" json:"icon_url"`
	Url     string `mapstructure:"url" json:"url"`
}

type Organization

type Organization struct {
	Type        string `mapstructure:"type" json:"type"`
	Name        string `mapstructure:"name" json:"name"`
	Description string `mapstructure:"description" json:"description"`
	Url         string `mapstructure:"url" json:"url"`
}

type OrganizationInfo added in v1.0.2

type OrganizationInfo struct {
	Type         string        `mapstructure:"type" json:"type"`
	Name         string        `mapstructure:"name" json:"name"`
	Description  string        `mapstructure:"description" json:"description"`
	Url          string        `mapstructure:"url" json:"url"`
	Teams        []Team        `mapstructure:"teams" json:"teams"`
	Applications []Application `mapstructure:"applications" json:"applications"`
	Members      []Member      `mapstructure:"members" json:"members"`
}

type RemoveAppMembersRequest

type RemoveAppMembersRequest struct {
	Owner    string
	Platform string
	AppId    string
	Users    string
}

type RemoveAppMembersResponse

type RemoveAppMembersResponse struct {
	Error   bool                           `mapstructure:"error" json:"error"`
	Message string                         `mapstructure:"message" json:"message"`
	Because string                         `mapstructure:"because" json:"because"`
	Results RemoveAppMembersResponseResult `mapstructure:"results" json:"results"`
}

type RemoveAppMembersResponseResult

type RemoveAppMembersResponseResult struct {
	Invite string `mapstructure:"invite" json:"invite"`
}

type RemoveAppSharedTeamRequest

type RemoveAppSharedTeamRequest struct {
	Organization string
	Platform     string
	AppId        string
	Team         string
}

type RemoveAppSharedTeamResponse

type RemoveAppSharedTeamResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
	Because string `mapstructure:"because" json:"because"`
}

type RemoveAppTeamRequest

type RemoveAppTeamRequest struct {
	Organization string
	Platform     string
	AppId        string
	Team         string
}

type RemoveAppTeamResponse

type RemoveAppTeamResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
	Because string `mapstructure:"because" json:"because"`
}

type RemoveEnterpriseMemberRequest

type RemoveEnterpriseMemberRequest struct {
	Enterprise string
	User       string
}

type RemoveEnterpriseMemberResponse

type RemoveEnterpriseMemberResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
	Because string `mapstructure:"because" json:"because"`
}

type RemoveEnterpriseOrganizationMemberRequest

type RemoveEnterpriseOrganizationMemberRequest struct {
	Enterprise   string
	Organization string
	User         string
}

type RemoveEnterpriseOrganizationMemberResponse

type RemoveEnterpriseOrganizationMemberResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
	Because string `mapstructure:"because" json:"because"`
}

type RemoveEnterpriseSharedTeamRequest

type RemoveEnterpriseSharedTeamRequest struct {
	Enterprise string
	SharedTeam string
}

type RemoveEnterpriseSharedTeamResponse

type RemoveEnterpriseSharedTeamResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
	Because string `mapstructure:"because" json:"because"`
}

type RemoveOrganizationMemberByEmailRequest

type RemoveOrganizationMemberByEmailRequest struct {
	Organization string
	Email        string
}

type RemoveOrganizationMemberByUserNameRequest

type RemoveOrganizationMemberByUserNameRequest struct {
	Organization string
	UserName     string
}

type RemoveOrganizationMemberResponse

type RemoveOrganizationMemberResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
}

type RemoveOrganizationTeamMemberRequest

type RemoveOrganizationTeamMemberRequest struct {
	Organization string
	Team         string
	User         string
}

type RemoveOrganizationTeamMemberResponse

type RemoveOrganizationTeamMemberResponse struct {
	Error   bool   `mapstructure:"error" json:"error"`
	Message string `mapstructure:"message" json:"message"`
}

type Results

type Results struct {
	Message string `mapstructure:"message" json:"message"`
}

type Team added in v1.0.2

type Team struct {
	Name        string `mapstructure:"name" json:"name"`
	Role        string `mapstructure:"role" json:"role"`
	MemberCount uint   `mapstructure:"member_count" json:"member_count"`
}

type UpdateOrganizationRequest

type UpdateOrganizationRequest struct {
	Name        string
	Description string
}

type UpdateOrganizationResponse

type UpdateOrganizationResponse struct {
	Error        bool         `mapstructure:"error" json:"error"`
	Message      string       `mapstructure:"message" json:"message"`
	Organization Organization `mapstructure:"organization" json:"organization"`
}

type UploadAppsRequest

type UploadAppsRequest struct {
	Owner    string
	Platform string
	AppId    string
	File     string
}

type UploadAppsResponse

type UploadAppsResponse struct {
	Error   bool        `mapstructure:"error" json:"error"`
	Message string      `mapstructure:"message" json:"message"`
	Because string      `mapstructure:"because" json:"because"`
	Results Application `mapstructure:"results" json:"results"`
}

type Usage

type Usage struct {
	Used uint `mapstructure:"used" json:"used"`
	Max  uint `mapstructure:"max" json:"max"`
}

type User

type User struct {
	Name string `mapstructure:"name" json:"name"`
	Role uint   `mapstructure:"role" json:"role"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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