library

package module
v1.1.22 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 7 Imported by: 0

README

platform-service-library

아름다운 가게 golang backend service를 위한 공통 라이브러리

  1. conversion, format 체크등을 위한 공통 라이브러리
  2. aws/sns : aws sns 서비스에 메세지를 publish 하기 위한 라이브러리
  3. logging : echo framework을 기반으로 한 미들웨어에서 사용하기 위한 로깅 라이브러리
    • logging 정보 : trace id, service id, parent service id, service name, query param, path param, body 정보 등 다양한 로깅 정보 저장
    • 기존 로깅 서비스와 연계한 service 내 behavior에 대한 stack trace 저장
    • trace 정보에서 sql query 별도 관리 가능
    • msa 서비스간 tracking을 위한 trace id, service id, parent service id 관리
    • console output 및 aws sns를 기반으로 한 db saving 기능
    • db saving : aws sns를 이용한 서비스 분리 현재 서비스와 별도 서비스로 로깅 분리 - async 작업으로 기존 서비스에 영향주지 않음 behavior_logs 테이블 및 behavior_log_details 저장

Installation

go get -u github.com/beautiful-store/platform-service-library

Add your files

cd existing_repo
git remote add origin https://gitlab.com/beautifulstore/platform-service-library.git

Documentation

Index

Constants

View Source
const (
	DateLayout8     = "20060102"
	DateLayout10    = "2006-01-02"
	DateLayout19    = "2006-01-02 15:04:05"
	DateLayoutMilli = "2006-01-02T15:04:05.000Z07:00"
	DateLayoutNano  = time.RFC3339Nano
)

Variables

This section is empty.

Functions

func Byte2Map added in v1.0.12

func Byte2Map(b []byte) (*map[string]interface{}, error)

func Byte2Struct

func Byte2Struct(b []byte, obj interface{}) error

func Contains

func Contains(items []string, key string) bool

func CreatedToMap

func CreatedToMap(val interface{}) (*map[string]interface{}, error)

func GetAsiaSeoulTimeLocation added in v1.0.64

func GetAsiaSeoulTimeLocation() *time.Location

func GetDefaultLogLocalDateTimeMilli added in v1.0.76

func GetDefaultLogLocalDateTimeMilli() string

func GetTimeLocation added in v1.0.64

func GetTimeLocation(region string) *time.Location

func Int64ArrayToString

func Int64ArrayToString(list []int64, delim string) string

func IsEmailFormat

func IsEmailFormat(email string) bool

func Map2Byte

func Map2Byte(mapData map[string]interface{}) ([]byte, error)

func Map2Struct

func Map2Struct(mapData map[string]interface{}, object interface{}) error

func String2Struct added in v1.0.3

func String2Struct(str string, obj interface{}) error

func StringToInt64Array

func StringToInt64Array(ids string, delim string) ([]int64, error)

func Struct2Byte

func Struct2Byte(s interface{}) ([]byte, error)

func Struct2Json

func Struct2Json(s interface{}) (string, error)

func Struct2Map

func Struct2Map(s interface{}) (map[string]interface{}, error)

Types

This section is empty.

Directories

Path Synopsis
aws
sns
logging
sns

Jump to

Keyboard shortcuts

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