common

package
v0.0.0-...-e0c7ee5 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTableWithCheck

func AddTableWithCheck(t *storage.MetaTransaction, projectID, party string, table storage.TableMeta) error

func AskInfoByChecksumResult

func AskInfoByChecksumResult(session *application.Session, compRes pb.ChecksumCompareResult, tables []core.DbTable, targetParty string) (askInfoTriggered bool, err error)

use this function if you know table owner

func AskProjectInfoFromParties

func AskProjectInfoFromParties(app *application.App, projectID string, tableNames []string, cclDestParties []string, sourceParties []string) (err error)

use this function if you don't know table owner and set source parties as project members except self

func CheckInvitationCompatibleWithProj

func CheckInvitationCompatibleWithProj(invitation storage.Invitation, proj storage.Project) error

Check Archived/ProjectConf/Creator

func CheckMemberExistInProject

func CheckMemberExistInProject(manager *storage.MetaManager, projectID string, member string) error

check project exist and current party is member

func DropTableWithCheck

func DropTableWithCheck(t *storage.MetaTransaction, projectID, party string, tableId storage.TableIdentifier) (exist bool, err error)

if table not exist, return false, nil if table exist and drop it successfully return true, nil

func FeedResponse

func FeedResponse(c *gin.Context, response proto.Message, err error, encodingType message.ContentEncodingType)

func GrantColumnConstraintsWithCheck

func GrantColumnConstraintsWithCheck(t *storage.MetaTransaction, projectID string, privs []storage.ColumnPriv, columnOwnerChecker OwnerChecker) error

func LogWithError

func LogWithError(logEntry *logutil.BrokerMonitorLogEntry, err error)

func PostSyncInfo

func PostSyncInfo(app *application.App, projectID string, action pb.ChangeEntry_Action, data any, targetParties []string) (err error)

func RevokeColumnConstraintsWithCheck

func RevokeColumnConstraintsWithCheck(t *storage.MetaTransaction, projectID, party string, privIDs []storage.ColumnPrivIdentifier) error

func VerifyProjectID

func VerifyProjectID(projectID string) error

func VerifyTableMeta

func VerifyTableMeta(meta storage.TableMeta) error

Types

type InfoAskerAndUpdater

type InfoAskerAndUpdater struct {
	// contains filtered or unexported fields
}

type OwnerChecker

type OwnerChecker struct {
	Owner          string
	SkipOwnerCheck bool
}

Jump to

Keyboard shortcuts

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