Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckMutationAllowed

func CheckMutationAllowed(checks []bool)

    CheckMutationAllowed will exit if any check in checks is false.

    Types

    type ChillEffect

    type ChillEffect struct {
    	Config *cycler_pb.ChillEffectConfiguration `json:"ChillEffectConfiguration"`
    	// contains filtered or unexported fields
    }

      ChillEffect runtime and configuration state.

      func (ChillEffect) DefaultActor

      func (ce ChillEffect) DefaultActor() interface{}

      func (*ChillEffect) Enact

      func (ce *ChillEffect) Enact(ctx context.Context, client *storage.Client, attr *storage.ObjectAttrs) (EffectResult, error)

        Enact does the move operation on the attr, _this deletes the old object_!

        func (*ChillEffect) Initialize

        func (ce *ChillEffect) Initialize(config interface{}, actor interface{}, checks ...bool)

          Init the chill effect.

          type ChillResult

          type ChillResult struct {
          	// contains filtered or unexported fields
          }

            ChillResult defines all outputs of a move effect.

            func (ChillResult) HasActed

            func (cr ChillResult) HasActed() bool

              HasActed is true if the effect was applied.

              func (ChillResult) JSONResult

              func (cr ChillResult) JSONResult() string

                JSONResult is the JSON result.

                func (ChillResult) TextResult

                func (cr ChillResult) TextResult() string

                  TextResult is the unformatted text result.

                  type DeleteEffect

                  type DeleteEffect struct {
                  	Config *cycler_pb.DeleteEffectConfiguration `json:"DeleteEffectConfiguration"`
                  	// contains filtered or unexported fields
                  }

                    DeleteEffect runtime and configuration state.

                    func (DeleteEffect) DefaultActor

                    func (de DeleteEffect) DefaultActor() interface{}

                    func (*DeleteEffect) Enact

                    func (de *DeleteEffect) Enact(ctx context.Context, client *storage.Client, attr *storage.ObjectAttrs) (EffectResult, error)

                      Enact does the delete operation on the attr.

                      func (*DeleteEffect) Initialize

                      func (de *DeleteEffect) Initialize(config interface{}, actor interface{}, checks ...bool)

                        Init the DeleteEffect

                        type DeleteResult

                        type DeleteResult struct {
                        	// contains filtered or unexported fields
                        }

                          DeleteResult defines all outputs of a delet eeffect.

                          func (DeleteResult) HasActed

                          func (dr DeleteResult) HasActed() bool

                            HasActed is true if the effect was applied.

                            func (DeleteResult) JSONResult

                            func (dr DeleteResult) JSONResult() string

                              JSONResult is the JSON result.

                              func (DeleteResult) TextResult

                              func (dr DeleteResult) TextResult() string

                                TextResult is the unformatted text result.

                                type DuplicateEffect

                                type DuplicateEffect struct {
                                	Config *cycler_pb.DuplicateEffectConfiguration `json:"DuplicateEffectConfiguration"`
                                	// contains filtered or unexported fields
                                }

                                  DuplicateEffect runtime and configuration state.

                                  func (DuplicateEffect) DefaultActor

                                  func (de DuplicateEffect) DefaultActor() interface{}

                                  func (*DuplicateEffect) Enact

                                    Enact does the duplicate operation on the attr, does not mutate existing object.

                                    func (*DuplicateEffect) Initialize

                                    func (de *DuplicateEffect) Initialize(config interface{}, actor interface{}, checks ...bool)

                                      Init the DuplicateEffect, duplicate doesn't mutate so skip checks.

                                      type DuplicateResult

                                      type DuplicateResult struct {
                                      	// contains filtered or unexported fields
                                      }

                                        DuplicateResult defines all outputs of an echo effect.

                                        func (DuplicateResult) HasActed

                                        func (dr DuplicateResult) HasActed() bool

                                          HasActed is true if the effect was applied.

                                          func (DuplicateResult) JSONResult

                                          func (dr DuplicateResult) JSONResult() string

                                            JSONResult is the JSON result.

                                            func (DuplicateResult) TextResult

                                            func (dr DuplicateResult) TextResult() string

                                              TextResult is the unformatted text result.

                                              type Effect

                                              type Effect interface {
                                              	// interface{} assumed to be corresponding config struct, checks all must be
                                              	// true to Initialize, and this is used with the mutation allowed parameter at the moment.
                                              	DefaultActor() interface{}
                                              	Initialize(config interface{}, actor interface{}, checks ...bool)
                                              	Enact(ctx context.Context, client *storage.Client, attr *storage.ObjectAttrs) (EffectResult, error)
                                              }

                                                Effect defines something that a policy might enact on an individual *attr.

                                                type EffectResult

                                                type EffectResult interface {
                                                	HasActed() bool
                                                	JSONResult() string
                                                	TextResult() string
                                                }

                                                  EffectResult contains the sideproducts of an executed effect.

                                                  type MoveEffect

                                                  type MoveEffect struct {
                                                  	Config *cycler_pb.MoveEffectConfiguration `json:"MoveEffectConfiguration"`
                                                  	// contains filtered or unexported fields
                                                  }

                                                    MoveEffect runtime and configuration state.

                                                    func (MoveEffect) DefaultActor

                                                    func (me MoveEffect) DefaultActor() interface{}

                                                    func (*MoveEffect) Enact

                                                    func (me *MoveEffect) Enact(ctx context.Context, client *storage.Client, attr *storage.ObjectAttrs) (EffectResult, error)

                                                      Enact does the move operation on the attr, _this deletes the old object_!

                                                      func (*MoveEffect) Initialize

                                                      func (me *MoveEffect) Initialize(config interface{}, actor interface{}, checks ...bool)

                                                        Init the move effect with a config and an actor (mock or real function).

                                                        type MoveEffectConfig

                                                        type MoveEffectConfig struct {
                                                        	DestinationBucket string `json:"DestinationBucket"`
                                                        	DestinationPrefix string `json:"DestinationPrefix"`
                                                        }

                                                          MoveEffectConfig configuration.

                                                          type MoveResult

                                                          type MoveResult struct {
                                                          	// contains filtered or unexported fields
                                                          }

                                                            MoveResult defines all outputs of a move effect.

                                                            func (MoveResult) HasActed

                                                            func (mr MoveResult) HasActed() bool

                                                              HasActed is true if the effect was applied.

                                                              func (MoveResult) JSONResult

                                                              func (mr MoveResult) JSONResult() string

                                                                JSONResult is the JSON result.

                                                                func (MoveResult) TextResult

                                                                func (mr MoveResult) TextResult() string

                                                                  TextResult is the unformatted text result.

                                                                  type NoopEffect

                                                                  type NoopEffect struct {
                                                                  	Config *cycler_pb.NoopEffectConfiguration `json:"NoopEffectConfiguration"`
                                                                  }

                                                                    NoopEffect runtime and configuration state.

                                                                    func (NoopEffect) DefaultActor

                                                                    func (ne NoopEffect) DefaultActor() interface{}

                                                                    func (*NoopEffect) Enact

                                                                    func (ne *NoopEffect) Enact(ctx context.Context, client *storage.Client, attr *storage.ObjectAttrs) (EffectResult, error)

                                                                      Enact nothing.

                                                                      func (*NoopEffect) Initialize

                                                                      func (ne *NoopEffect) Initialize(config interface{}, actor interface{}, checks ...bool)

                                                                        Init nothing.

                                                                        type NoopResult

                                                                        type NoopResult struct {
                                                                        	// contains filtered or unexported fields
                                                                        }

                                                                          NoopResult defines all outputs of an echo effect.

                                                                          func (NoopResult) HasActed

                                                                          func (nr NoopResult) HasActed() bool

                                                                            HasActed is true if the effect was applied.

                                                                            func (NoopResult) JSONResult

                                                                            func (nr NoopResult) JSONResult() string

                                                                              JSONResult is the JSON result.

                                                                              func (NoopResult) TextResult

                                                                              func (nr NoopResult) TextResult() string

                                                                                TextResult is the unformatted text result.