resource_control

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 17, 2026 License: Apache-2.0 Imports: 19 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Copyright 2019 The OpenPitrix Authors. All rights reserved. Use of this source code is governed by a Apache license that can be found in the LICENSE file.

Copyright 2019 The OpenPitrix Authors. All rights reserved. Use of this source code is governed by a Apache license that can be found in the LICENSE file.

Copyright 2019 The OpenPitrix Authors. All rights reserved. Use of this source code is governed by a Apache license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAddress

func CreateAddress(ctx context.Context, addr *models.Address) (string, error)

func CreateAddressList

func CreateAddressList(ctx context.Context, addrList *models.AddressList) (string, error)

func CreateAddressListWithAddrIDs

func CreateAddressListWithAddrIDs(ctx context.Context, addrList *models.AddressList, addrIds []string) (string, error)

func DeleteAddressLists

func DeleteAddressLists(ctx context.Context, addressListIds []string) error

func DeleteAddresses

func DeleteAddresses(ctx context.Context, addressIds []string) error

func DescribeTasks

func DescribeTasks(ctx context.Context, req *pb.DescribeTasksRequest) ([]*models.Task, uint64, error)

func GetActiveAddressesByIds

func GetActiveAddressesByIds(ctx context.Context, addressIds []string) ([]*models.Address, error)

func GetActiveAddressesListsByIds

func GetActiveAddressesListsByIds(ctx context.Context, addressListIds []string) ([]*models.AddressList, error)

func GetAddressListsByIds

func GetAddressListsByIds(ctx context.Context, tx *gorm.DB, addressListIds []string) ([]*models.AddressList, error)

func GetAddressesByIdsAndStatues

func GetAddressesByIdsAndStatues(ctx context.Context, tx *gorm.DB, addressIds []string, statuses []string) ([]*models.Address, error)

func GetAddressesByListIds

func GetAddressesByListIds(ctx context.Context, listIds []string) ([]*models.Address, error)

func GetAddressesListByIds

func GetAddressesListByIds(ctx context.Context, tx *gorm.DB, addressListIds []string) ([]*models.AddressList, error)

func GetDeletedAddressListsByIds

func GetDeletedAddressListsByIds(ctx context.Context, tx *gorm.DB, addressListIds []string) ([]*models.AddressList, error)

func GetDeletedAddressesByIds

func GetDeletedAddressesByIds(ctx context.Context, tx *gorm.DB, addressIds []string) ([]*models.Address, error)

func GetEmailConfig4Modify

func GetEmailConfig4Modify(ctx context.Context, tx *gorm.DB) (*models.EmailConfig, error)

func GetEmailConfigFromDB

func GetEmailConfigFromDB(ctx context.Context) (*models.EmailConfig, error)

func GetEmailServiceConfig

func GetEmailServiceConfig() *pb.EmailServiceConfig

func GetFailedNfsByNfIds

func GetFailedNfsByNfIds(ctx context.Context, nfIds []string) ([]*models.Notification, error)

func GetNfsByNfIds

func GetNfsByNfIds(ctx context.Context, nfIds []string) ([]*models.Notification, error)

func GetTaskIdsByNfIds

func GetTaskIdsByNfIds(ctx context.Context, nfIds []string) ([]string, error)

func GetTasksByStatus

func GetTasksByStatus(ctx context.Context, notificationId string, status []string) []*models.Task

func GetTasksByTaskIds

func GetTasksByTaskIds(ctx context.Context, taskIds []string) ([]*models.Task, error)

func ModifyAddress

func ModifyAddress(ctx context.Context, addressId string, attributes map[string]interface{}) error

func ModifyAddressList

func ModifyAddressList(ctx context.Context, addressListId string, attributes map[string]interface{}) error

func ModifyAddressListWithAddrIDs

func ModifyAddressListWithAddrIDs(ctx context.Context, addressListId string, attributes map[string]interface{}, addrIds []string) error

func ModifyEmailConfig

func ModifyEmailConfig(ctx context.Context, req *pb.ServiceConfig) error

func RegisterNotification

func RegisterNotification(ctx context.Context, notification *models.Notification) error

func RegisterTask

func RegisterTask(ctx context.Context, task *models.Task) error

func ResetEmailCfg

func ResetEmailCfg(cfg *config.Config) error

func SetServiceConfig

func SetServiceConfig(req *pb.ServiceConfig)

func SplitNotificationIntoTasks

func SplitNotificationIntoTasks(ctx context.Context, notification *models.Notification) ([]*models.Task, error)

func UpdateNotificationsStatus

func UpdateNotificationsStatus(ctx context.Context, nfIds []string, status string) error

func UpdateTasksStatus

func UpdateTasksStatus(ctx context.Context, taskIds []string, status string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL