utils

package
v0.0.0-...-5827d67 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColumnIndexToLetter

func ColumnIndexToLetter(index int) string

columnIndexToLetter convierte un índice de columna a la notación de letra de columna de Sheets (1 -> A, 2 -> B, ..., 27 -> AA, ...)

func ColumnToIndex

func ColumnToIndex(column string) int

columnToIndex convierte la letra de la columna en su índice correspondiente

func ConnectToDriveService

func ConnectToDriveService(ctx context.Context, scope ...string) *drive.Service

ConnectToDriveService uses a Context, config and 1 or more scopes to retrieve a Token then generate a Client. It uses the client to connect to the gmail api service and returns a *gmail.Service.

func ConnectToGmailService

func ConnectToGmailService(ctx context.Context, scope ...string) *gmail.Service

ConnectToGmailService uses a Context, config and 1 or more scopes to retrieve a Token then generate a Client. It uses the client to connect to the gmail api service and returns a *gmail.Service.

func ConnectToSheetsService

func ConnectToSheetsService(ctx context.Context, scope ...string) *sheets.Service

ConnectToSheetsService uses a Context, config and 1 or more scopes to retrieve a Token then generate a Client. It uses the client to connect to the gmail api service and returns a *gmail.Service.

func DefaultIfEmpty

func DefaultIfEmpty(value, defaultValue string) string

func GetMsgBody

func GetMsgBody(msg *gmail.Message) (string, error)

func GetParams

func GetParams(regEx, url string) (paramsMap map[string]string)

*

  • Parses url with the given regular expression and returns the
  • group values defined in the expression. *

func InsertAtBeginning

func InsertAtBeginning(slice [][]interface{}, value []interface{}) [][]interface{}

func ParseDateWithFormat

func ParseDateWithFormat(date string, layout ...string) (time.Time, error)

func Round

func Round(value any) float64

func SplitCellReference

func SplitCellReference(cell string) (string, int)

SplitCellReference separa una referencia de celda en sus componentes de columna y fila

func WriteFile

func WriteFile(msg *gmail.Message) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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