Documentation ¶
Index ¶
- Constants
- Variables
- func Begin(ctx context.Context, db Client, opt ...options.Option) context.Context
- func DelayedDelete(ctx context.Context, keys ...foundations.WriteItemFunc)
- func DelayedPut(ctx context.Context, keys ...foundations.WriteItemFunc)
- func DelayedUpdate(ctx context.Context, keys ...foundations.WriteItemFunc)
- func Delete(ctx context.Context, keys ...foundations.WriteItemFunc)
- func FailSafe() options.Option
- func Limit(limit int) options.Option
- func Put(ctx context.Context, keys ...foundations.WriteItemFunc)
- func Run(ctx context.Context, opt ...options.Option) (*dynamodb.TransactWriteItemsOutput, error)
- func Update(ctx context.Context, keys ...foundations.WriteItemFunc)
- func With(ctx context.Context, f func(t *Builder))
- type Builder
- func (builder *Builder) DelayedDelete(keys ...foundations.WriteItemFunc) *Builder
- func (builder *Builder) DelayedPut(keys ...foundations.WriteItemFunc) *Builder
- func (builder *Builder) DelayedUpdate(keys ...foundations.WriteItemFunc) *Builder
- func (builder *Builder) Delete(keys ...foundations.WriteItemFunc) *Builder
- func (builder *Builder) Error() error
- func (builder *Builder) HasError() bool
- func (builder *Builder) Monitor(monitor Monitor) *Builder
- func (builder *Builder) Put(keys ...foundations.WriteItemFunc) *Builder
- func (builder *Builder) Run(ctx context.Context, cli Client) (out *dynamodb.TransactWriteItemsOutput, err error)
- func (builder *Builder) Update(keys ...foundations.WriteItemFunc) *Builder
- type Client
- type Context
- type GetBuilder
- type Monitor
- type Transaction
Constants ¶
View Source
const (
MaxGetItems = 100
)
View Source
const (
MaxItems = 100
)
Variables ¶
View Source
var NotBegan = errors.New("Transaction not began")
Functions ¶
func DelayedDelete ¶ added in v0.1.13
func DelayedDelete(ctx context.Context, keys ...foundations.WriteItemFunc)
func DelayedPut ¶ added in v0.1.13
func DelayedPut(ctx context.Context, keys ...foundations.WriteItemFunc)
func DelayedUpdate ¶ added in v0.1.13
func DelayedUpdate(ctx context.Context, keys ...foundations.WriteItemFunc)
func Delete ¶ added in v0.1.13
func Delete(ctx context.Context, keys ...foundations.WriteItemFunc)
func Put ¶ added in v0.1.13
func Put(ctx context.Context, keys ...foundations.WriteItemFunc)
func Update ¶ added in v0.1.13
func Update(ctx context.Context, keys ...foundations.WriteItemFunc)
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
func (*Builder) DelayedDelete ¶ added in v0.1.9
func (builder *Builder) DelayedDelete(keys ...foundations.WriteItemFunc) *Builder
func (*Builder) DelayedPut ¶ added in v0.1.9
func (builder *Builder) DelayedPut(keys ...foundations.WriteItemFunc) *Builder
func (*Builder) DelayedUpdate ¶ added in v0.1.9
func (builder *Builder) DelayedUpdate(keys ...foundations.WriteItemFunc) *Builder
func (*Builder) Delete ¶
func (builder *Builder) Delete(keys ...foundations.WriteItemFunc) *Builder
Delete 削除用
func (*Builder) Put ¶
func (builder *Builder) Put(keys ...foundations.WriteItemFunc) *Builder
Put 追加用
func (*Builder) Update ¶
func (builder *Builder) Update(keys ...foundations.WriteItemFunc) *Builder
Update 更新用
type Client ¶
type Client interface { TransactWriteItems(ctx context.Context, params *dynamodb.TransactWriteItemsInput, optFns ...func(*dynamodb.Options)) (*dynamodb.TransactWriteItemsOutput, error) TransactGetItems(ctx context.Context, params *dynamodb.TransactGetItemsInput, optFns ...func(*dynamodb.Options)) (*dynamodb.TransactGetItemsOutput, error) }
type Context ¶ added in v0.1.13
type Context struct { *Builder `json:"-" dynamodbav:"-"` // contains filtered or unexported fields }
type GetBuilder ¶ added in v0.0.9
type GetBuilder struct {
// contains filtered or unexported fields
}
func Get ¶ added in v0.0.9
func Get(keys ...foundations.GetItemFunc) *GetBuilder
func (*GetBuilder) HasError ¶ added in v0.0.9
func (builder *GetBuilder) HasError() bool
func (*GetBuilder) Run ¶ added in v0.0.9
func (builder *GetBuilder) Run(ctx context.Context, cli Client, fetch foundations.FetchItemFunc) (out *dynamodb.TransactGetItemsOutput, err error)
type Monitor ¶ added in v0.1.15
type Monitor func(items []types.TransactWriteItem, err error)
type Transaction ¶
type Transaction interface { PutItem(ctx context.Context, expiredAt ...time.Time) foundations.WriteItemFunc DeleteItem(ctx context.Context) foundations.WriteItemFunc UpdateItem(ctx context.Context, fields ...foundations.UpdateField) foundations.WriteItemFunc }
Click to show internal directories.
Click to hide internal directories.