Documentation ¶
Overview ¶
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright © 2021-2023 Nikita Ivanovski info@slnt-opp.xyz
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func AccessLevel(ctx context.Context, db driver.Database, account string, ...) (bool, access.Level)
- func DeleteByDocID(ctx context.Context, db driver.Database, id driver.DocumentID) error
- func DeleteEdge(ctx context.Context, db driver.Database, ...) error
- func DeleteRecursive(ctx context.Context, db driver.Database, id driver.DocumentID) error
- func EdgeExist(ctx context.Context, db driver.Database, ...) (bool, error)
- func GetEnsureCollection(log *zap.Logger, ctx context.Context, db driver.Database, name string) driver.Collection
- func GetWithAccess[T Accessible](ctx context.Context, db driver.Database, id driver.DocumentID) (T, error)
- func GraphGetEdgeEnsure(log *zap.Logger, ctx context.Context, graph driver.Graph, ...) driver.Collection
- func GraphGetEnsure(log *zap.Logger, ctx context.Context, db driver.Database, name string) driver.Graph
- func GraphGetVertexEnsure(log *zap.Logger, ctx context.Context, db driver.Database, graph driver.Graph, ...) (col driver.Collection)
- func HasAccess(ctx context.Context, db driver.Database, account string, ...) bool
- func ListCredentialsAndEdges(ctx context.Context, db driver.Database, account driver.DocumentID) (nodes []string, err error)
- func ListOwnedDeep(ctx context.Context, db driver.Database, id driver.DocumentID) (res *access.Nodes, err error)
- func ListWithAccess[T Accessible](ctx context.Context, log *zap.Logger, db driver.Database, ...) ([]T, error)
- type Access
- type Accessible
- type Account
- func (acc *Account) Delete(ctx context.Context, db driver.Database) error
- func (acc *Account) JoinNamespace(ctx context.Context, edge driver.Collection, ns Namespace, level access.Level, ...) error
- func (acc *Account) LinkNamespace(ctx context.Context, edge driver.Collection, ns Namespace, level access.Level, ...) error
- type AccountsController
- func (ctrl *AccountsController) Authorize(ctx context.Context, auth_type string, args ...string) (Account, bool)
- func (ctrl *AccountsController) Create(ctx context.Context, acc pb.Account) (Account, error)
- func (ctrl *AccountsController) Delete(ctx context.Context, id string) error
- func (ctrl *AccountsController) EnsureRootExists(passwd string) (err error)
- func (ctrl *AccountsController) Exists(ctx context.Context, id string) (bool, error)
- func (ctrl *AccountsController) Get(ctx context.Context, id string) (Account, error)
- func (ctrl *AccountsController) GetCredentials(ctx context.Context, edge_col driver.Collection, acc Account, auth_type string) (key string, has_credentials bool)
- func (ctrl *AccountsController) List(ctx context.Context, requestor Account, req_depth int32) ([]Account, error)
- func (ctrl *AccountsController) SetCredentials(ctx context.Context, acc Account, edge driver.Collection, ...) error
- func (ctrl *AccountsController) Update(ctx context.Context, acc Account, patch map[string]interface{}) (err error)
- func (ctrl *AccountsController) UpdateCredentials(ctx context.Context, cred string, c credentials.Credentials) (err error)
- type BillingPlan
- type BillingPlansController
- func (ctrl *BillingPlansController) Create(ctx context.Context, plan *pb.Plan) (*BillingPlan, error)
- func (ctrl *BillingPlansController) Delete(ctx context.Context, plan *pb.Plan) (err error)
- func (ctrl *BillingPlansController) Get(ctx context.Context, plan *pb.Plan) (*BillingPlan, error)
- func (ctrl *BillingPlansController) List(ctx context.Context, spUuid string) ([]*BillingPlan, error)
- func (ctrl *BillingPlansController) Update(ctx context.Context, plan *pb.Plan) (*BillingPlan, error)
- type CurrencyController
- func (c *CurrencyController) Convert(ctx context.Context, from pb.Currency, to pb.Currency, amount float64) (float64, error)
- func (c *CurrencyController) CreateExchangeRate(ctx context.Context, from pb.Currency, to pb.Currency, rate float64) error
- func (c *CurrencyController) DeleteExchangeRate(ctx context.Context, from pb.Currency, to pb.Currency) error
- func (c *CurrencyController) GetCurrencies(ctx context.Context) ([]pb.Currency, error)
- func (c *CurrencyController) GetExchangeRate(ctx context.Context, from pb.Currency, to pb.Currency) (float64, error)
- func (c *CurrencyController) GetExchangeRateDirect(ctx context.Context, from pb.Currency, to pb.Currency) (float64, error)
- func (c *CurrencyController) GetExchangeRates(ctx context.Context) ([]*pb.GetExchangeRateResponse, error)
- func (c *CurrencyController) UpdateExchangeRate(ctx context.Context, from pb.Currency, to pb.Currency, rate float64) error
- type GroupWithSP
- type Instance
- type InstancesController
- func (ctrl *InstancesController) Create(ctx context.Context, group driver.DocumentID, sp string, i *pb.Instance) error
- func (ctrl *InstancesController) Delete(ctx context.Context, group string, i *pb.Instance) error
- func (ctrl *InstancesController) GetGroup(ctx context.Context, i string) (*GroupWithSP, error)
- func (ctrl *InstancesController) SetStatus(ctx context.Context, inst *pb.Instance, status pb.InstanceStatus) (err error)
- func (ctrl *InstancesController) Update(ctx context.Context, sp string, inst, oldInst *pb.Instance) error
- func (ctrl *InstancesController) ValidateBillingPlan(ctx context.Context, spUuid string, i *pb.Instance) error
- type InstancesGroup
- type InstancesGroupsController
- func (ctrl *InstancesGroupsController) Create(ctx context.Context, service driver.DocumentID, g *pb.InstancesGroup) error
- func (ctrl *InstancesGroupsController) Delete(ctx context.Context, service string, g *pb.InstancesGroup) error
- func (ctrl *InstancesGroupsController) GetServiceEdge(ctx context.Context, ig string) (string, error)
- func (ctrl *InstancesGroupsController) Instances() *InstancesController
- func (ctrl *InstancesGroupsController) Provide(ctx context.Context, group, sp string) error
- func (ctrl *InstancesGroupsController) SetStatus(ctx context.Context, ig *pb.InstancesGroup, status pb.InstanceStatus) (err error)
- func (ctrl *InstancesGroupsController) Transfer(ctx context.Context, oldSrvEdge string, newSrv driver.DocumentID, ...) error
- func (ctrl *InstancesGroupsController) Update(ctx context.Context, ig, oldIg *pb.InstancesGroup) error
- type Namespace
- type NamespacesController
- func (ctrl *NamespacesController) Create(ctx context.Context, title string) (Namespace, error)
- func (ctrl *NamespacesController) Delete(ctx context.Context, id string) error
- func (ctrl *NamespacesController) Get(ctx context.Context, id string) (Namespace, error)
- func (ctrl *NamespacesController) Join(ctx context.Context, acc Account, ns Namespace, access access.Level, ...) error
- func (ctrl *NamespacesController) Link(ctx context.Context, acc Account, ns Namespace, access access.Level, ...) error
- func (ctrl *NamespacesController) List(ctx context.Context, requestor Account, req_depth int32) ([]*namespaces.Namespace, error)
- type Node
- type Provision
- type Record
- type RecordsController
- type Service
- type ServicesController
- func (ctrl *ServicesController) Create(ctx context.Context, service *pb.Service) (*pb.Service, error)
- func (ctrl *ServicesController) Delete(ctx context.Context, s *pb.Service) (err error)
- func (ctrl *ServicesController) Get(ctx context.Context, acc, key string) (*pb.Service, error)
- func (ctrl *ServicesController) GetServiceInstancesUuids(key string) ([]string, error)
- func (ctrl *ServicesController) IGController() *InstancesGroupsController
- func (ctrl *ServicesController) Join(ctx context.Context, service *pb.Service, ns *Namespace, access access.Level, ...) error
- func (ctrl *ServicesController) List(ctx context.Context, requestor string, request *pb.ListRequest) ([]*pb.Service, error)
- func (ctrl *ServicesController) SetStatus(ctx context.Context, s *pb.Service, status pb.ServiceStatus) (err error)
- func (ctrl *ServicesController) Update(ctx context.Context, service *pb.Service, hash bool) error
- type ServicesProvider
- type ServicesProvidersController
- func (ctrl *ServicesProvidersController) BindPlan(ctx context.Context, uuid, planUuid string) error
- func (ctrl *ServicesProvidersController) Create(ctx context.Context, sp *ServicesProvider) (err error)
- func (ctrl *ServicesProvidersController) Delete(ctx context.Context, id string) (err error)
- func (ctrl *ServicesProvidersController) Get(ctx context.Context, id string) (r *ServicesProvider, err error)
- func (ctrl *ServicesProvidersController) List(ctx context.Context, requestor string) ([]*ServicesProvider, error)
- func (ctrl *ServicesProvidersController) ListDeployments(ctx context.Context, sp *ServicesProvider, includeInstances bool) ([]*ipb.InstancesGroup, error)
- func (ctrl *ServicesProvidersController) Update(ctx context.Context, sp *pb.ServicesProvider) error
- type Transaction
- type TransactionsController
Constants ¶
const (
INSTANCES_COL = "Instances"
)
const (
INSTANCES_GROUPS_COL = "InstancesGroups"
)
Variables ¶
This section is empty.
Functions ¶
func AccessLevel ¶
func AccessLevel(ctx context.Context, db driver.Database, account string, node driver.DocumentID) (bool, access.Level)
account - Account Key, node - DocumentID
func DeleteByDocID ¶
func DeleteEdge ¶
func DeleteRecursive ¶
func GetEnsureCollection ¶
func GetWithAccess ¶
func GetWithAccess[T Accessible](ctx context.Context, db driver.Database, id driver.DocumentID) (T, error)
func GraphGetEdgeEnsure ¶
func GraphGetEnsure ¶
func GraphGetVertexEnsure ¶
func HasAccess ¶
func HasAccess(ctx context.Context, db driver.Database, account string, node driver.DocumentID, level access.Level) bool
account - Account Key, node - DocumentID
func ListCredentialsAndEdges ¶
func ListOwnedDeep ¶
func ListWithAccess ¶
Types ¶
type Accessible ¶
type Account ¶
func Authorisable ¶
func Authorisable(ctx context.Context, cred *credentials.Credentials, db driver.Database) (Account, bool)
Return Account authorisable by this Credentials
type AccountsController ¶
type AccountsController struct {
// contains filtered or unexported fields
}
func NewAccountsController ¶
func NewAccountsController(logger *zap.Logger, db driver.Database) AccountsController
func (*AccountsController) Delete ¶
func (ctrl *AccountsController) Delete(ctx context.Context, id string) error
func (*AccountsController) EnsureRootExists ¶
func (ctrl *AccountsController) EnsureRootExists(passwd string) (err error)
func (*AccountsController) GetCredentials ¶
func (*AccountsController) SetCredentials ¶
func (ctrl *AccountsController) SetCredentials(ctx context.Context, acc Account, edge driver.Collection, c credentials.Credentials, role string) error
Set Account Credentials, ensure account has only one credentials document linked per credentials type
func (*AccountsController) UpdateCredentials ¶
func (ctrl *AccountsController) UpdateCredentials(ctx context.Context, cred string, c credentials.Credentials) (err error)
type BillingPlan ¶
type BillingPlansController ¶
type BillingPlansController struct {
// contains filtered or unexported fields
}
func NewBillingPlansController ¶
func NewBillingPlansController(logger *zap.Logger, db driver.Database) BillingPlansController
func (*BillingPlansController) Create ¶
func (ctrl *BillingPlansController) Create(ctx context.Context, plan *pb.Plan) (*BillingPlan, error)
func (*BillingPlansController) Get ¶
func (ctrl *BillingPlansController) Get(ctx context.Context, plan *pb.Plan) (*BillingPlan, error)
func (*BillingPlansController) List ¶
func (ctrl *BillingPlansController) List(ctx context.Context, spUuid string) ([]*BillingPlan, error)
func (*BillingPlansController) Update ¶
func (ctrl *BillingPlansController) Update(ctx context.Context, plan *pb.Plan) (*BillingPlan, error)
type CurrencyController ¶
type CurrencyController struct {
// contains filtered or unexported fields
}
func NewCurrencyController ¶
func NewCurrencyController(log *zap.Logger, db driver.Database) *CurrencyController
func (*CurrencyController) CreateExchangeRate ¶
func (*CurrencyController) DeleteExchangeRate ¶
func (*CurrencyController) GetCurrencies ¶ added in v0.0.18
func (*CurrencyController) GetExchangeRate ¶
func (*CurrencyController) GetExchangeRateDirect ¶ added in v0.0.18
func (*CurrencyController) GetExchangeRates ¶ added in v0.0.18
func (c *CurrencyController) GetExchangeRates(ctx context.Context) ([]*pb.GetExchangeRateResponse, error)
type GroupWithSP ¶
type GroupWithSP struct { Group *pb.InstancesGroup `json:"group"` SP *sppb.ServicesProvider `json:"sp"` }
type InstancesController ¶
type InstancesController struct {
// contains filtered or unexported fields
}
func NewInstancesController ¶
func NewInstancesController(log *zap.Logger, db driver.Database) *InstancesController
func (*InstancesController) GetGroup ¶
func (ctrl *InstancesController) GetGroup(ctx context.Context, i string) (*GroupWithSP, error)
func (*InstancesController) SetStatus ¶
func (ctrl *InstancesController) SetStatus(ctx context.Context, inst *pb.Instance, status pb.InstanceStatus) (err error)
func (*InstancesController) ValidateBillingPlan ¶
type InstancesGroup ¶ added in v0.0.18
type InstancesGroup struct { driver.DocumentMeta *pb.InstancesGroup }
type InstancesGroupsController ¶
type InstancesGroupsController struct {
// contains filtered or unexported fields
}
func NewInstancesGroupsController ¶
func NewInstancesGroupsController(log *zap.Logger, db driver.Database) *InstancesGroupsController
func (*InstancesGroupsController) Create ¶
func (ctrl *InstancesGroupsController) Create(ctx context.Context, service driver.DocumentID, g *pb.InstancesGroup) error
func (*InstancesGroupsController) Delete ¶
func (ctrl *InstancesGroupsController) Delete(ctx context.Context, service string, g *pb.InstancesGroup) error
func (*InstancesGroupsController) GetServiceEdge ¶
func (*InstancesGroupsController) Instances ¶
func (ctrl *InstancesGroupsController) Instances() *InstancesController
func (*InstancesGroupsController) Provide ¶
func (ctrl *InstancesGroupsController) Provide(ctx context.Context, group, sp string) error
func (*InstancesGroupsController) SetStatus ¶
func (ctrl *InstancesGroupsController) SetStatus(ctx context.Context, ig *pb.InstancesGroup, status pb.InstanceStatus) (err error)
func (*InstancesGroupsController) Transfer ¶
func (ctrl *InstancesGroupsController) Transfer(ctx context.Context, oldSrvEdge string, newSrv driver.DocumentID, ig driver.DocumentID) error
func (*InstancesGroupsController) Update ¶
func (ctrl *InstancesGroupsController) Update(ctx context.Context, ig, oldIg *pb.InstancesGroup) error
type Namespace ¶
type Namespace struct { *namespaces.Namespace driver.DocumentMeta }
type NamespacesController ¶
type NamespacesController struct {
// contains filtered or unexported fields
}
func NewNamespacesController ¶
func NewNamespacesController(logger *zap.Logger, db driver.Database) NamespacesController
func (*NamespacesController) Delete ¶
func (ctrl *NamespacesController) Delete(ctx context.Context, id string) error
func (*NamespacesController) List ¶
func (ctrl *NamespacesController) List(ctx context.Context, requestor Account, req_depth int32) ([]*namespaces.Namespace, error)
type Provision ¶
type Provision struct { From driver.DocumentID `json:"_from"` To driver.DocumentID `json:"_to"` Group string `json:"group"` driver.DocumentMeta }
type RecordsController ¶
type RecordsController struct {
// contains filtered or unexported fields
}
func NewRecordsController ¶
func NewRecordsController(logger *zap.Logger, db driver.Database) RecordsController
func (*RecordsController) CheckOverlapping ¶
type ServicesController ¶
type ServicesController struct {
// contains filtered or unexported fields
}
func NewServicesController ¶
func NewServicesController(log *zap.Logger, db driver.Database) ServicesController
func (*ServicesController) Create ¶
func (ctrl *ServicesController) Create(ctx context.Context, service *pb.Service) (*pb.Service, error)
Create Service and underlaying entities and store in DB
func (*ServicesController) GetServiceInstancesUuids ¶
func (ctrl *ServicesController) GetServiceInstancesUuids(key string) ([]string, error)
func (*ServicesController) IGController ¶
func (ctrl *ServicesController) IGController() *InstancesGroupsController
func (*ServicesController) Join ¶
func (ctrl *ServicesController) Join(ctx context.Context, service *pb.Service, ns *Namespace, access access.Level, role string) error
Join Service into Namespace
func (*ServicesController) List ¶
func (ctrl *ServicesController) List(ctx context.Context, requestor string, request *pb.ListRequest) ([]*pb.Service, error)
List Services in DB
func (*ServicesController) SetStatus ¶
func (ctrl *ServicesController) SetStatus(ctx context.Context, s *pb.Service, status pb.ServiceStatus) (err error)
type ServicesProvider ¶
type ServicesProvider struct { *pb.ServicesProvider driver.DocumentMeta }
type ServicesProvidersController ¶
type ServicesProvidersController struct {
// contains filtered or unexported fields
}
func NewServicesProvidersController ¶
func NewServicesProvidersController(logger *zap.Logger, db driver.Database) ServicesProvidersController
func (*ServicesProvidersController) BindPlan ¶
func (ctrl *ServicesProvidersController) BindPlan(ctx context.Context, uuid, planUuid string) error
func (*ServicesProvidersController) Create ¶
func (ctrl *ServicesProvidersController) Create(ctx context.Context, sp *ServicesProvider) (err error)
func (*ServicesProvidersController) Delete ¶
func (ctrl *ServicesProvidersController) Delete(ctx context.Context, id string) (err error)
func (*ServicesProvidersController) Get ¶
func (ctrl *ServicesProvidersController) Get(ctx context.Context, id string) (r *ServicesProvider, err error)
func (*ServicesProvidersController) List ¶
func (ctrl *ServicesProvidersController) List(ctx context.Context, requestor string) ([]*ServicesProvider, error)
List Services Providers in DB
func (*ServicesProvidersController) ListDeployments ¶
func (ctrl *ServicesProvidersController) ListDeployments(ctx context.Context, sp *ServicesProvider, includeInstances bool) ([]*ipb.InstancesGroup, error)
func (*ServicesProvidersController) Update ¶
func (ctrl *ServicesProvidersController) Update(ctx context.Context, sp *pb.ServicesProvider) error
Update ServicesProvider in DB
type Transaction ¶
type Transaction struct { *pb.Transaction driver.DocumentMeta }
type TransactionsController ¶
type TransactionsController struct {
// contains filtered or unexported fields
}
func NewTransactionsController ¶
func NewTransactionsController(logger *zap.Logger, db driver.Database) TransactionsController
func (*TransactionsController) Create ¶
func (ctrl *TransactionsController) Create(ctx context.Context, tx *pb.Transaction) (*Transaction, error)
func (*TransactionsController) Get ¶
func (ctrl *TransactionsController) Get(ctx context.Context, uuid string) (*pb.Transaction, error)