CDN

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AwsxCdnCmd = &cobra.Command{
	Use:   "getCdnList",
	Short: "getCdnList command gets list of cdn functions of an aws account",
	Long:  `getCdnList command gets list of cdn functions of an aws account`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("executing getCdnList command")
		var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd)
		if err != nil {
			log.Printf("error during authentication: %v\n", err)
			err := cmd.Help()
			if err != nil {
				return
			}
			return
		}
		if authFlag {
			resp, err := CdnDistributionConfigWithTagList(clientAuth, nil)
			if err != nil {
				log.Println("error getting getCdnList: ", err)
				return
			}
			fmt.Println(resp)
		}
	},
}
View Source
var AwsxCdnFunctionListCmd = &cobra.Command{
	Use:   "getCdnFunctionList",
	Short: "getCdnFunctionList command gets list of cdn functions of an aws account",
	Long:  `getCdnFunctionList command gets list of cdn functions of an aws account`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("executing getCdnFunctionList command")
		var authFlag, clientAuth, err = authenticate.AuthenticateCommand(cmd)
		if err != nil {
			log.Printf("error during authentication: %v\n", err)
			err := cmd.Help()
			if err != nil {
				return
			}
			return
		}
		if authFlag {
			resp, err := ListCdnFunctionInstances(clientAuth, nil)
			if err != nil {
				log.Println("error getting getCdnFunctionList: ", err)
				return
			}
			fmt.Println(resp)
		}
	},
}

Functions

func CloudFrontDistributionList

func CloudFrontDistributionList(clientAuth *model.Auth, client *cloudfront.CloudFront) (*cloudfront.ListDistributionsOutput, error)

func ListCdnFunctionInstances

func ListCdnFunctionInstances(clientAuth *model.Auth, client *cloudfront.CloudFront) (*cloudfront.ListFunctionsOutput, error)

Types

type Cdn

type Cdn struct {
	Distribution       interface{} `json:"distribution"`
	DistributionConfig interface{} `json:"distribution_config"`
	Tags               interface{} `json:"tags"`
}

func CdnDistributionConfigWithTagList

func CdnDistributionConfigWithTagList(clientAuth *model.Auth, client *cloudfront.CloudFront) ([]Cdn, error)

Jump to

Keyboard shortcuts

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