Documentation ¶
Index ¶
- type AuditEvent
- type AuditEventData
- type AuditEventUserIdentity
- type AuditLog
- type AuditUser
- type BadRequest
- type DynamoClientAPI
- type FieldValidation
- type FilterField
- type Forbidden
- type Group
- type History
- type NotFound
- type Permissions
- type PermittedEndpoint
- type Record
- type Request
- type RequestUser
- type ScanType
- type Unauthorized
- type User
- type UserData
- type ValidationInput
- type ValidationOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditEvent ¶
type AuditEvent struct {
EventData AuditEventData `json:"eventData"`
}
type AuditEventData ¶
type AuditEventData struct { Version string `json:"version"` UserIdentity AuditEventUserIdentity `json:"userIdentity"` UserAgent string `json:"userAgent"` EventSource string `json:"eventSource"` EventName string `json:"eventName"` EventTime time.Time `json:"eventTime"` UID string `json:"UID"` RequestParameters map[string]interface{} `json:"requestParameters"` ResponseElements map[string]interface{} `json:"responseElements"` ErrorCode string `json:"errorCode"` ErrorMessage string `json:"errorMessage"` SourceIPAddress string `json:"sourceIPAddress"` RecipientAccountId string `json:"recipientAccountId"` AdditionalEventData map[string]interface{} `json:"additionalEventData"` }
type AuditEventUserIdentity ¶
type AuditLog ¶
type AuditLog struct { Time string `json:"time"` User AuditUser `json:"user"` Action string `json:"action"` Method string `json:"method"` Path string `json:"path"` ExpireTime int64 `json:"expire_time,omitempty"` QueryParams map[string][]string `json:"query_params,omitempty"` Resource map[string]interface{} `json:"resource,omitempty"` Body interface{} `json:"body,omitempty"` }
AuditLog : Audit log object
type AuditUser ¶
type AuditUser struct { ID string `json:"id"` Username string `json:"username"` Name string `json:"name"` Email string `json:"email"` SourceIP string `json:"source_ip,omitempty"` UserAgent string `json:"user_agent,omitempty"` }
AuditUser : User object used in audit logs
type BadRequest ¶
type BadRequest baseError
BadRequest : User submitted a bad request
func (*BadRequest) Error ¶
func (e *BadRequest) Error() string
type DynamoClientAPI ¶
type DynamoClientAPI interface { GetItem(context.Context, *dynamodb.GetItemInput, ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error) PutItem(context.Context, *dynamodb.PutItemInput, ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error) UpdateItem(context.Context, *dynamodb.UpdateItemInput, ...func(*dynamodb.Options)) (*dynamodb.UpdateItemOutput, error) DeleteItem(context.Context, *dynamodb.DeleteItemInput, ...func(*dynamodb.Options)) (*dynamodb.DeleteItemOutput, error) Scan(context.Context, *dynamodb.ScanInput, ...func(*dynamodb.Options)) (*dynamodb.ScanOutput, error) Query(context.Context, *dynamodb.QueryInput, ...func(*dynamodb.Options)) (*dynamodb.QueryOutput, error) DescribeTable(context.Context, *dynamodb.DescribeTableInput, ...func(*dynamodb.Options)) (*dynamodb.DescribeTableOutput, error) }
type FieldValidation ¶
type FieldValidation func(input *ValidationInput, ch chan ValidationOutput)
type FilterField ¶
type FilterField struct { Field string `json:"field"` Operator string `json:"operator"` Value interface{} `json:"value"` }
FilterField: Filter field object
type Permissions ¶
type Permissions struct { PermittedEndpoints []PermittedEndpoint `json:"permitted_endpoints"` ReadFilters []FilterField `json:"read_filters"` CreateFilters []FilterField `json:"create_filters"` UpdateFilters []FilterField `json:"update_filters"` DeleteFilters []FilterField `json:"delete_filters"` ExcludeFields []string `json:"exclude_fields"` UpdateFieldsPermitted []string `json:"update_fields_permitted"` UpdateFieldsRestricted []string `json:"update_fields_restricted"` }
Permissions: Permissions struct
type PermittedEndpoint ¶
PermittedEndpoint : An endpoint
type Request ¶
type Request struct { User RequestUser Method string Path string Body interface{} SourceIP string UserAgent string PathParams map[string]string QueryParams map[string][]string }
Request : simple request
type Unauthorized ¶
type Unauthorized baseError
Unauthorized : User is not authenticated
func (*Unauthorized) Error ¶
func (e *Unauthorized) Error() string
type User ¶
type User struct { ID string `json:"id"` Username string `json:"username"` Name string `json:"name"` Email string `json:"email"` Groups []string `json:"groups"` Permissions }
User : User object
type UserData ¶
type UserData struct { Username string `json:"username"` Name string `json:"name"` Email string `json:"email"` Entitlements []string `json:"entitlements"` }
UserData : User data object
type ValidationInput ¶
type ValidationOutput ¶
type ValidationOutput struct { Input *ValidationInput Result bool Message string Error error }
Click to show internal directories.
Click to hide internal directories.