mirror of
https://github.com/retailcrm/mg-transport-core.git
synced 2025-02-20 06:43:14 +03:00
Update product name, cleanup annotations (#22)
This commit is contained in:
parent
cc4e3b0957
commit
2eb1b78871
@ -1,6 +1,6 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2019 RetailDriver LLC
|
||||
Copyright (c) 2019-2020 RetailDriver LLC
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
14
README.md
14
README.md
@ -1,11 +1,13 @@
|
||||
## Message Gateway Transport Library
|
||||
[](https://github.com/retailcrm/mg-transport-core/actions?query=workflow%3Aci)
|
||||
[](https://codecov.io/gh/retailcrm/mg-transport-core)
|
||||
[](https://pkg.go.dev/github.com/retailcrm/mg-transport-core/core)
|
||||
[](https://codecov.io/gh/retailcrm/mg-transport-core)
|
||||
[](https://github.com/retailcrm/mg-transport-core/releases)
|
||||
[](https://goreportcard.com/report/github.com/retailcrm/mg-transport-core)
|
||||
[](https://github.com/retailcrm/mg-transport-core/blob/master/LICENSE.md)
|
||||
[](https://golang.org/dl/)
|
||||
[](https://pkg.go.dev/github.com/retailcrm/mg-transport-core/core)
|
||||
|
||||
This library provides different functions like error-reporting, logging, localization, etc. in order to make it easier to create transports.
|
||||
|
||||
This library provides different functions like error-reporting, logging, localization, etc. in order to make it easier to create transports.
|
||||
Usage:
|
||||
```go
|
||||
package main
|
||||
@ -61,7 +63,9 @@ func main() {
|
||||
### Resource embedding
|
||||
[packr](https://github.com/gobuffalo/packr/tree/master/v2) can be used to provide resource embedding. In order to use packr you must follow
|
||||
[this instruction](https://github.com/gobuffalo/packr/tree/master/v2#library-installation), and provide boxes with templates,
|
||||
translations and assets to library. Example:
|
||||
translations and assets to library.
|
||||
|
||||
Example:
|
||||
```go
|
||||
package main
|
||||
|
||||
|
@ -108,7 +108,7 @@ func (u *Utils) GenerateToken() string {
|
||||
return fmt.Sprintf("%x", sha256.Sum256([]byte(fmt.Sprintf("%d%d", time.Now().UnixNano(), c))))
|
||||
}
|
||||
|
||||
// GetAPIClient will initialize retailCRM api client from url and key
|
||||
// GetAPIClient will initialize RetailCRM api client from url and key
|
||||
func (u *Utils) GetAPIClient(url, key string) (*v5.Client, int, error) {
|
||||
client := v5.New(url, key)
|
||||
client.Debug = u.IsDebug
|
||||
|
@ -17,7 +17,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
testCRMURL = "https://fake-uri.retailcrm.ru"
|
||||
testCRMURL = "https://fake-uri.retailcrm.pro"
|
||||
testMGURL = "https://mg-url.example.com"
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user