Code Review
/
src
/
xds
/
xds-server.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Refit source files to have a public xs-apiv1 lib package.
[src/xds/xds-server.git]
/
lib
/
xdsserver
/
folder-st-disable.go
diff --git
a/lib/folder/folder-st-disable.go
b/lib/xdsserver/folder-st-disable.go
similarity index 75%
rename from
lib/folder/folder-st-disable.go
rename to
lib/xdsserver/folder-st-disable.go
index
e936494
..
64b1efc
100644
(file)
--- a/
lib/folder/folder-st-disable.go
+++ b/
lib/xdsserver/folder-st-disable.go
@@
-1,7
+1,7
@@
-package
fold
er
+package
xdsserv
er
import (
import (
- "github.com/iotbzh/xds-server/lib/x
dsconfig
"
+ "github.com/iotbzh/xds-server/lib/x
sapiv1
"
uuid "github.com/satori/go.uuid"
)
uuid "github.com/satori/go.uuid"
)
@@
-11,14
+11,14
@@
import (
// STFolderDisable .
type STFolderDisable struct {
// STFolderDisable .
type STFolderDisable struct {
- globalConfig *xdsconfig.Config
- config
FolderConfig
+ *Context
+ config
xsapiv1.
FolderConfig
}
// NewFolderSTDisable Create a new instance of STFolderDisable
}
// NewFolderSTDisable Create a new instance of STFolderDisable
-func NewFolderSTDisable(
gc *xdsconfig.Config
) *STFolderDisable {
+func NewFolderSTDisable(
ctx *Context
) *STFolderDisable {
f := STFolderDisable{
f := STFolderDisable{
-
globalConfig: gc
,
+
Context: ctx
,
}
return &f
}
}
return &f
}
@@
-33,15
+33,15
@@
func (f *STFolderDisable) NewUID(suffix string) string {
}
// Add a new folder
}
// Add a new folder
-func (f *STFolderDisable) Add(cfg
FolderConfig) (*
FolderConfig, error) {
+func (f *STFolderDisable) Add(cfg
xsapiv1.FolderConfig) (*xsapiv1.
FolderConfig, error) {
f.config = cfg
f.config = cfg
- f.config.Status = StatusDisable
+ f.config.Status =
xsapiv1.
StatusDisable
f.config.IsInSync = false
return &f.config, nil
}
// GetConfig Get public part of folder config
f.config.IsInSync = false
return &f.config, nil
}
// GetConfig Get public part of folder config
-func (f *STFolderDisable) GetConfig() FolderConfig {
+func (f *STFolderDisable) GetConfig()
xsapiv1.
FolderConfig {
return f.config
}
return f.config
}
@@
-66,12
+66,12
@@
func (f *STFolderDisable) Remove() error {
}
// Update update some fields of a folder
}
// Update update some fields of a folder
-func (f *STFolderDisable) Update(cfg
FolderConfig) (*
FolderConfig, error) {
+func (f *STFolderDisable) Update(cfg
xsapiv1.FolderConfig) (*xsapiv1.
FolderConfig, error) {
return nil, nil
}
// RegisterEventChange requests registration for folder change event
return nil, nil
}
// RegisterEventChange requests registration for folder change event
-func (f *STFolderDisable) RegisterEventChange(cb *
EventCB, data *
EventCBData) error {
+func (f *STFolderDisable) RegisterEventChange(cb *
FolderEventCB, data *Folder
EventCBData) error {
return nil
}
return nil
}