Created
This commit is contained in:
20
setting.go
Normal file
20
setting.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package woogo
|
||||
|
||||
import (
|
||||
"git.cloudyne.io/go/woogo/entity"
|
||||
jsoniter "github.com/json-iterator/go"
|
||||
)
|
||||
|
||||
type settingService service
|
||||
|
||||
func (s settingService) Groups() (items []entity.SettingGroup, err error) {
|
||||
resp, err := s.httpClient.R().Get("/settings")
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
if resp.IsSuccess() {
|
||||
err = jsoniter.Unmarshal(resp.Body(), &items)
|
||||
}
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user