arvan

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MapToQueryString added in v0.1.3

func MapToQueryString(queryParams map[string]string) string

Types

type APIClient

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

func NewClient added in v0.1.3

func NewClient() *APIClient

func (*APIClient) AddDNSRecord

func (client *APIClient) AddDNSRecord(domain, name, ip string) []byte

func (*APIClient) CreateDomain

func (client *APIClient) CreateDomain(domain string) []byte

func (*APIClient) CurlGet

func (client *APIClient) CurlGet(url string, queryParams map[string]string) []byte

func (*APIClient) CurlPatch

func (client *APIClient) CurlPatch(url string, data interface{}) []byte

func (*APIClient) CurlPost

func (client *APIClient) CurlPost(url string, data interface{}) []byte

func (*APIClient) GetDomainInfo

func (client *APIClient) GetDomainInfo(domain string) DomainInfo

func (*APIClient) GetReports added in v0.1.3

func (client *APIClient) GetReports(domain string) DomainTrafficReport

func (*APIClient) UpdateSSLConfig

func (client *APIClient) UpdateSSLConfig(domain string)

type AddDNSRecordPayload

type AddDNSRecordPayload struct {
	// ID				string	`json:"id"`
	Type          string           `json:"type"`
	Name          string           `json:"name"`
	Cloud         bool             `json:"cloud"`
	UpStreamHTTPS string           `json:"upstream_https"`
	Values        []RecordValue    `json:"value"`
	IPFilterMode  RecordFilterMode `json:"ip_filter_mode"`
	TTL           int              `json:"ttl"`
}

Add DNS Record - Not Completed

type CreateDomainPayload

type CreateDomainPayload struct {
	Domain string `json:"domain"`
}

Create Domain

type DomainInfo

type DomainInfo struct {
	ID          string    `json:"id"`
	UserID      string    `json:"user_id"`
	Name        string    `json:"name"`
	PlanLevel   int       `json:"plan_level"`
	NSKeys      [2]string `json:"ns_keys"`
	CurrentNS   [2]string `json:"current_ns"`
	TargetCName string    `json:"target_cname"`
	CustomCName string    `json:"custom_cname"`
	Type        string    `json:"type"`
	Status      string    `json:"status"`
	DNSCloud    bool      `json:"dns_cloud"`
	Restriction []string  `json:"restriction"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

Domain Info

type DomainInfoResponse

type DomainInfoResponse struct {
	Data    DomainInfo `json:"data"`
	Message string     `json:"message"`
}

type DomainListResponse

type DomainListResponse struct {
	Data    []DomainInfo
	Message string
}

DomainsList

type DomainTrafficReport added in v0.1.3

type DomainTrafficReport struct {
	Data ReportData `json:"data"`
}

Traffic Usage

type IAMClient

type IAMClient struct {
}

type RecordFilterMode

type RecordFilterMode struct {
	Count     string `json:"count"`
	GeoFilter string `json:"geo_filter"`
	Order     string `json:"order"`
}

type RecordValue

type RecordValue struct {
	Country string `json:"country"`
	IP      string `json:"ip"`
	Port    any    `json:"port"`
	Weight  any    `json:"weight"`
}

type ReportData added in v0.1.3

type ReportData struct {
	Statistics ReportStatistics `json:"statistics"`
}

type ReportStatistics added in v0.1.3

type ReportStatistics struct {
	Traffics TrafficsReport `json:"traffics"`
}

type SSLConfigPayload

type SSLConfigPayload struct {
	Certificate   string `json:"certificate"`
	TLSVersion    string `json:"tls_version"`
	HTTPSRedirect bool   `json:"https_redirect"`
	SSLStatus     bool   `json:"ssl_status"`
}

HTTPS Settings

type TrafficsReport added in v0.1.3

type TrafficsReport struct {
	Total int64 `json:"total"`
}

Jump to

Keyboard shortcuts

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