mirror of
https://github.com/speatzle/nfsense.git
synced 2025-09-13 15:19:08 +00:00
Seperate Definitions by Sub System
This commit is contained in:
parent
14c8da64cc
commit
72bf96295d
31 changed files with 120 additions and 108 deletions
|
@ -4,11 +4,11 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"nfsense.net/nfsense/internal/definitions"
|
||||
"nfsense.net/nfsense/internal/definitions/object"
|
||||
)
|
||||
|
||||
type GetAddressesResult struct {
|
||||
Addresses map[string]definitions.Address
|
||||
Addresses map[string]object.Address
|
||||
}
|
||||
|
||||
func (f *Object) GetAddresses(ctx context.Context, params struct{}) (GetAddressesResult, error) {
|
||||
|
@ -19,7 +19,7 @@ func (f *Object) GetAddresses(ctx context.Context, params struct{}) (GetAddresse
|
|||
|
||||
type CreateAddressParameters struct {
|
||||
Name string
|
||||
Address definitions.Address
|
||||
Address object.Address
|
||||
}
|
||||
|
||||
func (f *Object) CreateAddress(ctx context.Context, params CreateAddressParameters) (struct{}, error) {
|
||||
|
@ -37,7 +37,7 @@ func (f *Object) CreateAddress(ctx context.Context, params CreateAddressParamete
|
|||
|
||||
type UpdateAddressParameters struct {
|
||||
Name string
|
||||
Address definitions.Address
|
||||
Address object.Address
|
||||
}
|
||||
|
||||
func (f *Object) UpdateAddress(ctx context.Context, params UpdateAddressParameters) (struct{}, error) {
|
||||
|
|
|
@ -4,11 +4,11 @@ import (
|
|||
"context"
|
||||
"fmt"
|
||||
|
||||
"nfsense.net/nfsense/internal/definitions"
|
||||
"nfsense.net/nfsense/internal/definitions/object"
|
||||
)
|
||||
|
||||
type GetServicesResult struct {
|
||||
Services map[string]definitions.Service
|
||||
Services map[string]object.Service
|
||||
}
|
||||
|
||||
func (f *Object) GetServices(ctx context.Context, params struct{}) (GetServicesResult, error) {
|
||||
|
@ -19,7 +19,7 @@ func (f *Object) GetServices(ctx context.Context, params struct{}) (GetServicesR
|
|||
|
||||
type CreateServiceParameters struct {
|
||||
Name string
|
||||
Service definitions.Service
|
||||
Service object.Service
|
||||
}
|
||||
|
||||
func (f *Object) CreateService(ctx context.Context, params CreateServiceParameters) (struct{}, error) {
|
||||
|
@ -37,7 +37,7 @@ func (f *Object) CreateService(ctx context.Context, params CreateServiceParamete
|
|||
|
||||
type UpdateServiceParameters struct {
|
||||
Name string
|
||||
Service definitions.Service
|
||||
Service object.Service
|
||||
}
|
||||
|
||||
func (f *Object) UpdateService(ctx context.Context, params UpdateServiceParameters) (struct{}, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue