twilio

package
v3.82.10 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Code generated by go generate; DO NOT EDIT.

Index

Constants

View Source
const (
	AUTHENTICATED_NO_PERMISSION = 70051
	INVALID_CREDENTIALS         = 20003
)

Variables

View Source
var (
	PermissionStrings = map[Permission]string{
		AccountManagementRead:        "account_management:read",
		AccountManagementWrite:       "account_management:write",
		SubaccountConfigurationRead:  "subaccount_configuration:read",
		SubaccountConfigurationWrite: "subaccount_configuration:write",
		KeyManagementRead:            "key_management:read",
		KeyManagementWrite:           "key_management:write",
		ServiceVerificationRead:      "service_verification:read",
		ServiceVerificationWrite:     "service_verification:write",
		SmsRead:                      "sms:read",
		SmsWrite:                     "sms:write",
		VoiceRead:                    "voice:read",
		VoiceWrite:                   "voice:write",
		MessagingRead:                "messaging:read",
		MessagingWrite:               "messaging:write",
		CallManagementRead:           "call_management:read",
		CallManagementWrite:          "call_management:write",
	}

	StringToPermission = map[string]Permission{
		"account_management:read":        AccountManagementRead,
		"account_management:write":       AccountManagementWrite,
		"subaccount_configuration:read":  SubaccountConfigurationRead,
		"subaccount_configuration:write": SubaccountConfigurationWrite,
		"key_management:read":            KeyManagementRead,
		"key_management:write":           KeyManagementWrite,
		"service_verification:read":      ServiceVerificationRead,
		"service_verification:write":     ServiceVerificationWrite,
		"sms:read":                       SmsRead,
		"sms:write":                      SmsWrite,
		"voice:read":                     VoiceRead,
		"voice:write":                    VoiceWrite,
		"messaging:read":                 MessagingRead,
		"messaging:write":                MessagingWrite,
		"call_management:read":           CallManagementRead,
		"call_management:write":          CallManagementWrite,
	}

	PermissionIDs = map[Permission]int{
		AccountManagementRead:        1,
		AccountManagementWrite:       2,
		SubaccountConfigurationRead:  3,
		SubaccountConfigurationWrite: 4,
		KeyManagementRead:            5,
		KeyManagementWrite:           6,
		ServiceVerificationRead:      7,
		ServiceVerificationWrite:     8,
		SmsRead:                      9,
		SmsWrite:                     10,
		VoiceRead:                    11,
		VoiceWrite:                   12,
		MessagingRead:                13,
		MessagingWrite:               14,
		CallManagementRead:           15,
		CallManagementWrite:          16,
	}

	IdToPermission = map[int]Permission{
		1:  AccountManagementRead,
		2:  AccountManagementWrite,
		3:  SubaccountConfigurationRead,
		4:  SubaccountConfigurationWrite,
		5:  KeyManagementRead,
		6:  KeyManagementWrite,
		7:  ServiceVerificationRead,
		8:  ServiceVerificationWrite,
		9:  SmsRead,
		10: SmsWrite,
		11: VoiceRead,
		12: VoiceWrite,
		13: MessagingRead,
		14: MessagingWrite,
		15: CallManagementRead,
		16: CallManagementWrite,
	}
)

Functions

func AnalyzeAndPrintPermissions added in v3.80.5

func AnalyzeAndPrintPermissions(cfg *config.Config, sid, secret string)

func AnalyzePermissions

func AnalyzePermissions(cfg *config.Config, sid, secret string) (*secretInfo, error)

Types

type Analyzer added in v3.80.5

type Analyzer struct {
	Cfg *config.Config
}

func (*Analyzer) Analyze added in v3.80.5

func (a *Analyzer) Analyze(ctx context.Context, credentialInfo map[string]string) (*analyzers.AnalyzerResult, error)

func (*Analyzer) Type added in v3.80.5

func (a *Analyzer) Type() analyzerpb.AnalyzerType

type Permission added in v3.80.5

type Permission int
const (
	Invalid                      Permission = iota
	AccountManagementRead        Permission = iota
	AccountManagementWrite       Permission = iota
	SubaccountConfigurationRead  Permission = iota
	SubaccountConfigurationWrite Permission = iota
	KeyManagementRead            Permission = iota
	KeyManagementWrite           Permission = iota
	ServiceVerificationRead      Permission = iota
	ServiceVerificationWrite     Permission = iota
	SmsRead                      Permission = iota
	SmsWrite                     Permission = iota
	VoiceRead                    Permission = iota
	VoiceWrite                   Permission = iota
	MessagingRead                Permission = iota
	MessagingWrite               Permission = iota
	CallManagementRead           Permission = iota
	CallManagementWrite          Permission = iota
)

func PermissionFromID added in v3.80.5

func PermissionFromID(id int) (Permission, error)

PermissionFromID converts an ID to its Permission enum

func PermissionFromString added in v3.80.5

func PermissionFromString(s string) (Permission, error)

PermissionFromString converts a string representation to its Permission enum

func (Permission) ToID added in v3.80.5

func (p Permission) ToID() (int, error)

ToID converts a Permission enum to its ID

func (Permission) ToString added in v3.80.5

func (p Permission) ToString() (string, error)

ToString converts a Permission enum to its string representation

Jump to

Keyboard shortcuts

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