Documentation ¶
Index ¶
- Constants
- type Bool
- type Condition
- type Conditions
- type Document
- type PolicyBuilder
- type Principals
- func (p *Principals) AWS() ([]string, Range)
- func (p *Principals) All() (bool, Range)
- func (p *Principals) CanonicalUsers() ([]string, Range)
- func (p *Principals) Federated() ([]string, Range)
- func (p Principals) MarshalJSON() ([]byte, error)
- func (p *Principals) Service() ([]string, Range)
- func (p *Principals) UnmarshalJSONWithMetadata(node jfather.Node) error
- type Range
- type Statement
- func (s *Statement) Actions() ([]string, Range)
- func (s *Statement) Conditions() ([]Condition, Range)
- func (s *Statement) Effect() (string, Range)
- func (s Statement) MarshalJSON() ([]byte, error)
- func (s *Statement) NotActions() ([]string, Range)
- func (s *Statement) NotPrincipals() (Principals, Range)
- func (s *Statement) NotResource() ([]string, Range)
- func (s *Statement) Principals() (Principals, Range)
- func (s *Statement) Range() Range
- func (s *Statement) Resources() ([]string, Range)
- func (s *Statement) SID() (string, Range)
- func (s *Statement) UnmarshalJSONWithMetadata(node jfather.Node) error
- type StatementBuilder
- func (s *StatementBuilder) Build() Statement
- func (s *StatementBuilder) WithAWSPrincipals(aws []string, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithActions(actions []string, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithAllPrincipals(all bool, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithCanonicalUsersPrincipals(cu []string, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithCondition(operator string, key string, value []string, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithEffect(effect string, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithFederatedPrincipals(federated []string, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithNotAWSPrincipals(aws []string, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithNotActions(actions []string, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithNotAllPrincipals(all bool, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithNotCanonicalUsersPrincipals(cu []string, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithNotFederatedPrincipals(federated []string, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithNotResources(resources []string, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithNotServicePrincipals(service []string, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithRange(start, end int) *StatementBuilder
- func (s *StatementBuilder) WithResources(resources []string, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithServicePrincipals(service []string, lines ...int) *StatementBuilder
- func (s *StatementBuilder) WithSid(sid string, lines ...int) *StatementBuilder
- type Statements
- type String
- type Strings
Constants ¶
View Source
const ( EffectAllow = "Allow" EffectDeny = "Deny" )
View Source
const ( VersionUndefined = "" Version20121017 = "2012-10-17" Version20181017 = "2008-10-17" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conditions ¶
type Conditions struct {
// contains filtered or unexported fields
}
func (Conditions) MarshalJSON ¶
func (c Conditions) MarshalJSON() ([]byte, error)
func (*Conditions) UnmarshalJSONWithMetadata ¶
func (c *Conditions) UnmarshalJSONWithMetadata(node jfather.Node) error
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
func ParseString ¶
func (*Document) MarshalJSON ¶
func (*Document) Statements ¶
func (*Document) UnmarshalJSONWithMetadata ¶
type PolicyBuilder ¶
type PolicyBuilder struct {
// contains filtered or unexported fields
}
func NewPolicyBuilder ¶
func NewPolicyBuilder() *PolicyBuilder
func PolicyBuilderFromDocument ¶ added in v0.0.4
func PolicyBuilderFromDocument(doc Document) *PolicyBuilder
func (*PolicyBuilder) Build ¶
func (p *PolicyBuilder) Build() Document
func (*PolicyBuilder) WithId ¶
func (p *PolicyBuilder) WithId(id string, lines ...int) *PolicyBuilder
func (*PolicyBuilder) WithStatement ¶
func (p *PolicyBuilder) WithStatement(s Statement, lines ...int) *PolicyBuilder
func (*PolicyBuilder) WithVersion ¶
func (p *PolicyBuilder) WithVersion(version string, lines ...int) *PolicyBuilder
type Principals ¶
type Principals struct {
// contains filtered or unexported fields
}
func (*Principals) AWS ¶
func (p *Principals) AWS() ([]string, Range)
func (*Principals) All ¶
func (p *Principals) All() (bool, Range)
func (*Principals) CanonicalUsers ¶
func (p *Principals) CanonicalUsers() ([]string, Range)
func (*Principals) Federated ¶
func (p *Principals) Federated() ([]string, Range)
func (Principals) MarshalJSON ¶
func (p Principals) MarshalJSON() ([]byte, error)
func (*Principals) Service ¶
func (p *Principals) Service() ([]string, Range)
func (*Principals) UnmarshalJSONWithMetadata ¶
func (p *Principals) UnmarshalJSONWithMetadata(node jfather.Node) error
type Statement ¶
type Statement struct {
// contains filtered or unexported fields
}
func (*Statement) Conditions ¶
func (Statement) MarshalJSON ¶
func (*Statement) NotActions ¶
func (*Statement) NotPrincipals ¶
func (s *Statement) NotPrincipals() (Principals, Range)
func (*Statement) NotResource ¶
func (*Statement) Principals ¶
func (s *Statement) Principals() (Principals, Range)
type StatementBuilder ¶
type StatementBuilder struct {
// contains filtered or unexported fields
}
func NewStatementBuilder ¶
func NewStatementBuilder() *StatementBuilder
func (*StatementBuilder) Build ¶
func (s *StatementBuilder) Build() Statement
func (*StatementBuilder) WithAWSPrincipals ¶
func (s *StatementBuilder) WithAWSPrincipals(aws []string, lines ...int) *StatementBuilder
func (*StatementBuilder) WithActions ¶
func (s *StatementBuilder) WithActions(actions []string, lines ...int) *StatementBuilder
func (*StatementBuilder) WithAllPrincipals ¶
func (s *StatementBuilder) WithAllPrincipals(all bool, lines ...int) *StatementBuilder
func (*StatementBuilder) WithCanonicalUsersPrincipals ¶
func (s *StatementBuilder) WithCanonicalUsersPrincipals(cu []string, lines ...int) *StatementBuilder
func (*StatementBuilder) WithCondition ¶
func (s *StatementBuilder) WithCondition(operator string, key string, value []string, lines ...int) *StatementBuilder
func (*StatementBuilder) WithEffect ¶
func (s *StatementBuilder) WithEffect(effect string, lines ...int) *StatementBuilder
func (*StatementBuilder) WithFederatedPrincipals ¶
func (s *StatementBuilder) WithFederatedPrincipals(federated []string, lines ...int) *StatementBuilder
func (*StatementBuilder) WithNotAWSPrincipals ¶
func (s *StatementBuilder) WithNotAWSPrincipals(aws []string, lines ...int) *StatementBuilder
func (*StatementBuilder) WithNotActions ¶
func (s *StatementBuilder) WithNotActions(actions []string, lines ...int) *StatementBuilder
func (*StatementBuilder) WithNotAllPrincipals ¶
func (s *StatementBuilder) WithNotAllPrincipals(all bool, lines ...int) *StatementBuilder
func (*StatementBuilder) WithNotCanonicalUsersPrincipals ¶
func (s *StatementBuilder) WithNotCanonicalUsersPrincipals(cu []string, lines ...int) *StatementBuilder
func (*StatementBuilder) WithNotFederatedPrincipals ¶
func (s *StatementBuilder) WithNotFederatedPrincipals(federated []string, lines ...int) *StatementBuilder
func (*StatementBuilder) WithNotResources ¶
func (s *StatementBuilder) WithNotResources(resources []string, lines ...int) *StatementBuilder
func (*StatementBuilder) WithNotServicePrincipals ¶
func (s *StatementBuilder) WithNotServicePrincipals(service []string, lines ...int) *StatementBuilder
func (*StatementBuilder) WithRange ¶
func (s *StatementBuilder) WithRange(start, end int) *StatementBuilder
func (*StatementBuilder) WithResources ¶
func (s *StatementBuilder) WithResources(resources []string, lines ...int) *StatementBuilder
func (*StatementBuilder) WithServicePrincipals ¶
func (s *StatementBuilder) WithServicePrincipals(service []string, lines ...int) *StatementBuilder
func (*StatementBuilder) WithSid ¶
func (s *StatementBuilder) WithSid(sid string, lines ...int) *StatementBuilder
type Statements ¶
type Statements struct {
// contains filtered or unexported fields
}
func (Statements) MarshalJSON ¶
func (s Statements) MarshalJSON() ([]byte, error)
func (*Statements) UnmarshalJSONWithMetadata ¶
func (s *Statements) UnmarshalJSONWithMetadata(node jfather.Node) error
type String ¶
type String struct {
// contains filtered or unexported fields
}
func (String) MarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.