model

package
v0.48.0 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatementEffectAllow = "allow"
	StatementEffectDeny  = "deny"
)

Variables

View Source
var (
	ErrValidationError = errors.New("validation error")

	EntityIDRegexp = regexp.MustCompile(`^[\w+=.,@\-]{1,127}$`)
)
View Source
var (
	ErrInvalidStatementSrcFormat = errors.New("invalid statements src format")
)

Functions

func ValidateActionName

func ValidateActionName(name string) error

func ValidateArn

func ValidateArn(name string) error

func ValidateAuthEntityID

func ValidateAuthEntityID(name string) error

func ValidateStatementEffect

func ValidateStatementEffect(effect string) error

Types

type Credential

type Credential struct {
	AccessKeyID                   string    `db:"access_key_id"`
	SecretAccessKey               string    `db:"-" json:"-"`
	SecretAccessKeyEncryptedBytes []byte    `db:"secret_access_key" json:"-"`
	IssuedDate                    time.Time `db:"issued_date"`
	UserID                        int       `db:"user_id"`
}

type CredentialKeys

type CredentialKeys struct {
	AccessKeyID     string `json:"access_key_id"`
	SecretAccessKey string `json:"secret_access_key"`
}

For JSON serialization:

type Group

type Group struct {
	ID          int       `db:"id"`
	CreatedAt   time.Time `db:"created_at"`
	DisplayName string    `db:"display_name" json:"display_name"`
}

type PaginationParams

type PaginationParams struct {
	Prefix string
	After  string
	Amount int
}

type Paginator

type Paginator struct {
	Amount        int
	NextPageToken string
}

Paginator describes the parameters of a slice of data from a database.

type Policy

type Policy struct {
	ID          int        `db:"id"`
	CreatedAt   time.Time  `db:"created_at"`
	DisplayName string     `db:"display_name" json:"display_name"`
	Statement   Statements `db:"statement"`
}

type Statement

type Statement struct {
	Effect   string   `json:"Effect"`
	Action   []string `json:"Action"`
	Resource string   `json:"Resource"`
}

type Statements

type Statements []Statement

func (*Statements) Scan

func (s *Statements) Scan(src interface{}) error

func (Statements) Value

func (s Statements) Value() (driver.Value, error)

type SuperuserConfiguration

type SuperuserConfiguration struct {
	User
	AccessKeyID     string
	SecretAccessKey string
}

SuperuserConfiguration requests a particular configuration for a superuser.

type User

type User struct {
	ID        int       `db:"id"`
	CreatedAt time.Time `db:"created_at"`
	Username  string    `db:"display_name" json:"display_name"`
}

Jump to

Keyboard shortcuts

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