KINESIS

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AwsxKinesisConfigCmd = &cobra.Command{
	Use:   "getKinesisConfig",
	Short: "getKinesisConfig command gets kinesis configuration",
	Long:  `getKinesisConfig command gets kinesis configuration`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("executing getKinesisConfig 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 {
			streamName, _ := cmd.Flags().GetString("streamName")
			if streamName == "" {
				log.Printf("kinesis stream name missing")
				err := cmd.Help()
				if err != nil {
					return
				}
				return
			}
			if streamName != "" {
				instances, err := GetKinesisInstanceByStreamName(streamName, clientAuth, nil)
				if err != nil {
					log.Println("error getting getKinesisConfig by instance id: ", err)
					return
				}
				fmt.Println(instances)
			}
		}
	},
}
View Source
var AwsxKinesisListCmd = &cobra.Command{
	Use:   "getKinesisList",
	Short: "getKinesisList command gets list of kinesis instances of an aws account",
	Long:  `getKinesisList command gets list of kinesis instances of an aws account`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("executing getKinesisList 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 := ListKinesisInstances(clientAuth, nil)
			if err != nil {
				log.Println("error getting getKinesisList: ", err)
				return
			}
			fmt.Println(resp)
		}
	},
}
View Source
var AwsxKinesisRecordListCmd = &cobra.Command{
	Use:   "getKinesisRecordList",
	Short: "getKinesisRecordList command gets list of kinesis instances of an aws account",
	Long:  `getKinesisRecordList command gets list of kinesis instances of an aws account`,

	Run: func(cmd *cobra.Command, args []string) {
		fmt.Println("executing getKinesisRecordList 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 := ListKinesisRecordInstances(clientAuth, nil)
			if err != nil {
				log.Println("error getting getKinesisRecordList: ", err)
				return
			}
			fmt.Println(resp)
		}
	},
}

Functions

func GetKinesisInstanceByStreamName

func GetKinesisInstanceByStreamName(streamName string, clientAuth *model.Auth, client *kinesis.Kinesis) (*kinesis.DescribeStreamOutput, error)

func GetKinesisStreamList

func GetKinesisStreamList(clientAuth *model.Auth, client *kinesis.Kinesis) (*kinesis.ListStreamsOutput, error)

func ListKinesisRecordInstances

func ListKinesisRecordInstances(clientAuth *model.Auth, client *kinesis.Kinesis) ([]*kinesis.Record, error)

Types

type KinesysObj

type KinesysObj struct {
	Stream interface{} `json:"stream"`
	Tags   interface{} `json:"tags"`
}

func ListKinesisInstances

func ListKinesisInstances(clientAuth *model.Auth, client *kinesis.Kinesis) ([]KinesysObj, error)

Jump to

Keyboard shortcuts

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