service

package
v0.0.0-...-a69af8b Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2019 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NextIDUser     = "exec dbo.get_users_sequence;"
	InsertUser     = "exec dbo.insert_user @ID = '%v', @Username = '%v', @Email = '%v', @Password = '%v', @Question = '%v', @Answer = '%v';"
	GetUsers       = "select * from dbo.get_users;"
	GetUser        = "exec dbo.get_user @Username = '%v'"
	UpdatePassword = "exec dbo.update_password @Username = '%v', @Password = '%v';"
	DeleteUser     = "exec dbo.delete_user @Username = '%v';"

	NextIDLog = "exec dbo.get_logs_sequence;"
	InsertLog = "exec dbo.insert_log @ID = '%v', @Username = '%v', @Date = '%v', @Code = '%v', @Detail = '%v';"
	GetLogs   = "select * from dbo.get_logs;"

	NextIDError = "exec dbo.get_errors_sequence;"
	InsertError = "exec dbo.insert_error @ID = '%v', @Username = '%v', @Date = '%v', @Detail = '%v';"
	GetErrors   = "select * from dbo.get_errors;"

	NextIDRole = "exec dbo.get_roles_sequence;"
	InsertRole = "exec dbo.insert_role @ID = '%v', @Name = '%v';"
	GetRoles   = "select * from dbo.get_roles;"

	NextIDType = "exec dbo.get_consecutives_types_sequence;"
	InsertType = "exec dbo.insert_consecutive_type @ID = '%v', @Name = '%v';"
	GetTypes   = "select * from dbo.get_consecutives_types;"

	NextIDConsecutive = "exec dbo.get_consecutives_sequence;"
	InsertConsecutive = "" /* 159-byte string literal not displayed */
	GetConsecutives   = "select * from dbo.get_consecutives;"

	NextIDClients = "exec dbo.get_clients_sequence;"
	InsertClient  = "" /* 143-byte string literal not displayed */
	GetClients    = "select * from dbo.get_clients;"
	GetClient     = "exec dbo.get_client @Sub = '%v';"

	NextIDGrants = "exec dbo.get_grants_sequence;"
	InsertGrant  = "exec dbo.insert_grant @ID = '%v', @User = '%v', @Role = '%v';"
	GetGrant     = "exec dbo.get_grant @Username = '%v';"
	RemoveGrant  = "exec dbo.remove_grant @User = '%v', @Role = '%v';"

	NextIDActivity = "exec dbo.get_activities_sequence;"
	InsertActivity = "exec dbo.insert_activity @ID = '%v', @Consecutive = '%v', @Name = '%v', @Description = '%v', @Image = '%v';"
	GetActivities  = "select * from dbo.get_activities;"
	RemoveActivity = "exec dbo.delete_activity @ID = '%v';"

	NextIDProductType = "exec dbo.get_product_type_sequence;"
	InsertProductType = "exec dbo.insert_product_type @ID = '%v', @Name = '%v';"
	GetProductTypes   = "select * from dbo.get_product_types"

	NextIDProduct = "exec dbo.get_product_sequence;"
	InsertProduct = "exec dbo.insert_product @ID = '%v', @Consecutive = '%v', @Type = '%v', @Name = '%v';"
	GetProducts   = "select * from dbo.get_products;"
	RemoveProduct = "exec dbo.delete_product @ID = '%v';"

	NextIDRoomType = "exec dbo.get_rooms_type_sequence;"
	InsertRoomType = "exec dbo.insert_room_type @ID = '%v', @Name = '%v';"
	GetRoomsTypes  = "select * from dbo.get_rooms_types;"

	NextIDRooms = "exec dbo.get_rooms_sequence;"
	InsertRoom  = "" /* 142-byte string literal not displayed */
	GetRooms    = "select * from dbo.get_rooms;"
	RemoveRoom  = "exec dbo.delete_room @ID = '%v';"

	NextIDReservations = "exec dbo.get_reservations_sequence;"
	InsertReservation  = "" /* 178-byte string literal not displayed */
	GetReservations    = "select * from dbo.get_reservations;"
)

.

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(cypher string) string

Decrypt ...

func EncodeToken

func EncodeToken(username string) (string, error)

EncodeToken ...

func Encrypt

func Encrypt(data string) string

Encrypt ....

func Load

func Load(path string) error

Load ...

func Pool

func Pool() *sql.DB

Pool .

func Upload

func Upload(file, bucket, object string) (string, error)

Upload ...

Types

type Claims

type Claims struct {
	Username string `json:"username"`
	jwt.StandardClaims
}

Claims ...

func DecodeToken

func DecodeToken(tokenString string) (*Claims, error)

DecodeToken ...

type SQL

type SQL struct {
	Server   string
	Port     int
	User     string
	Password string
	Database string
}

SQL ...

func (*SQL) StartTheConnection

func (s *SQL) StartTheConnection() error

StartTheConnection ...

Jump to

Keyboard shortcuts

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