utils

package
v0.0.0-...-aa03a8f Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2016 License: Apache-2.0, BSD-3-Clause, CC-BY-3.0, + 3 more Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Encrypt

func Encrypt(content string, salt string) string

Encrypt encrypts the content with salt

func FormatEndpoint

func FormatEndpoint(endpoint string) string

FormatEndpoint formats endpoint

func ParseEndpoint

func ParseEndpoint(endpoint string) (*url.URL, error)

ParseEndpoint parses endpoint to a URL

func ReversibleDecrypt

func ReversibleDecrypt(str string) (string, error)

ReversibleDecrypt decrypts the str with base64

func ReversibleEncrypt

func ReversibleEncrypt(str string) string

ReversibleEncrypt encrypts the str with base64

Types

type Mail

type Mail struct {
	From    string
	To      []string
	Subject string
	Message string
}

Mail holds information about content of Email

func (Mail) SendMail

func (m Mail) SendMail() error

SendMail sends Email according to the configurations

type MailConfig

type MailConfig struct {
	Identity string
	Host     string
	Port     string
	Username string
	Password string
	TLS      bool
}

MailConfig holds information about Email configurations

type Repository

type Repository struct {
	Name string
}

Repository holds information about repository

func (*Repository) GetProject

func (r *Repository) GetProject() string

GetProject parses the repository and return the name of project.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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