model

package
v0.32.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	StatementEffectAllow = models.StatementEffectAllow
	StatementEffectDeny  = models.StatementEffectDeny
)

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"`
	AccessSecretKey               string    `db:"-" json:"-"`
	AccessSecretKeyEncryptedBytes []byte    `db:"access_secret_key" json:"-"`
	IssuedDate                    time.Time `db:"issued_date"`
	UserID                        int       `db:"user_id"`
}

type CredentialKeys

type CredentialKeys struct {
	AccessKeyID     string `json:"access_key_id"`
	AccessSecretKey string `json:"access_secret_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 {
	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 added in v0.17.0

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