model

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 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}$`)
)

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    `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
}

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 User

type User struct {
	ID          int       `db:"id"`
	CreatedAt   time.Time `db:"created_at"`
	DisplayName 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