clsgo

package module
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2022 License: MIT Imports: 1 Imported by: 0

README

clsgo

Go API Reference Code Status Static Analysis Build Result codecov

CLSGO packages is a collection of excellent open source components for Golang learning and development, a step-by-step sample library for the learning phase, and a project template for rapid development for engineering development. Most implement ideas comes from Viper, GFrame etc.

Multi-Platform

Ubuntu Mac OS Windows

Fetures

  • 🟩Protobuf support
  • ✅MQ support, MQTT client/server, rabbitmq publish and consume routine
  • ✅HTTP static file server
  • ✅HTTP RESTFUL API server
  • ✅TCP protocol plugin
  • ✅TCP client/server
  • ✅File rotate logger
  • ✅Terminal logger
  • ✅Storage, Cache support, such as gorm, gredis
  • ✅Utils library package
  • ✅Viper config support, config manager

Quick start


# Install latest clsmt from https://github.com/lovelacelee/mirror-tools/releases/latest
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
# Test
clsmt run check test
# Import 
go get github.com/lovelacelee/clsgo

Credits

License

The MIT License (MIT) - see LICENSE for more details.

Documentation

Overview

Package clsgo provides some common used functions. Use of this source code is governed by a MIT-style license that can be found in the LICENSE file.

Installation

Install the whole package

go get github.com/lovelacelee/clsgo

Or separately

go get github.com/lovelacelee/clsgo/v1/config

Supported Features

Currently, clsgo supports the following quick-start functions.

+-------------------------------------------------------------------+
|pkg          | package                                             |
|-------------|-----------------------------------------------------|
|config       | github.com/lovelacelee/clsgo/v1/config              |
|crlf         | github.com/lovelacelee/clsgo/v1/crlf                |
|crypto       | github.com/lovelacelee/clsgo/v1/crypto              |
|database     | github.com/lovelacelee/clsgo/v1/database            |
|http         | github.com/lovelacelee/clsgo/v1/http                |
|log          | github.com/lovelacelee/clsgo/v1/log                 |
|mqtt         | github.com/lovelacelee/clsgo/v1/mqtt                |
|net          | github.com/lovelacelee/clsgo/v1/net                 |
|protobuf     | github.com/lovelacelee/clsgo/v1/protobuf            |
|rabbitmq     | github.com/lovelacelee/clsgo/v1/rabbitmq            |
|redis        | github.com/lovelacelee/clsgo/v1/redis               |
|utils        | github.com/lovelacelee/clsgo/v1/utils               |
|wraapper     | github.com/lovelacelee/clsgo/v1/wraapper            |
+-------------------------------------------------------------------+

Usage

The CLSGO package is designed to function separately so that the functionality of each subpackage is as independent as possible, if you only need to use logging and configuration then log and config packages are all you need.

import (
	"github.com/lovelacelee/clsgo/v1/config"
	"github.com/lovelacelee/clsgo/v1/log"
)

See the documentation of each pkg for more details.

Index

Constants

This section is empty.

Variables

View Source
var CLSGO_VERSION = version.Version

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
pkg
v1
config
Package config provides functions while implemented by Viper and gcfg.
Package config provides functions while implemented by Viper and gcfg.
crlf
The crlf package helps in dealing with files that have DOS-style CR/LF line endings.
The crlf package helps in dealing with files that have DOS-style CR/LF line endings.
crypto
Package pkcs7 implements data padding as specified by the PKCS #7 standard.
Package pkcs7 implements data padding as specified by the PKCS #7 standard.
database
Package database wraps gorm for convenience, we don't use goframe-gdb because of it's commitment of NEVER-SUPPORT-MIGRATE-SPECIALITY.
Package database wraps gorm for convenience, we don't use goframe-gdb because of it's commitment of NEVER-SUPPORT-MIGRATE-SPECIALITY.
http
Simple http web server support apis and static files both.
Simple http web server support apis and static files both.
log
Package log provides glog functions.
Package log provides glog functions.
mqtt
Package mqtt wraps github.com/eclipse/paho.mqtt.golang
Package mqtt wraps github.com/eclipse/paho.mqtt.golang
net
Package net provides basic network functions, TCP/UDP/WebSocket quick implements.
Package net provides basic network functions, TCP/UDP/WebSocket quick implements.
protobuf
Package protobuf wraps github.com/golang/protobuf
Package protobuf wraps github.com/golang/protobuf
rabbitmq
Package rabbitmq exports a RabbitMQ Client object that wraps the official go library.
Package rabbitmq exports a RabbitMQ Client object that wraps the official go library.
redis
Package redis use gofame-gredis implement common-usage redis functions.
Package redis use gofame-gredis implement common-usage redis functions.
utils
Package utils provides some utility functions for internal usage.
Package utils provides some utility functions for internal usage.

Jump to

Keyboard shortcuts

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