// CreateAlias mocks base method
195526
func (m *MockLambdaAPI) CreateAlias(arg0 *lambda.CreateAliasInput) (*lambda.AliasConfiguration, error) {
	ret := m.ctrl.Call(m, "CreateAlias", arg0)
	ret0, _ := ret[0].(*lambda.AliasConfiguration)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
1023400
func (m *MockLambdaAPI) GetAliasRequest(arg0 *lambda.GetAliasInput) (*request.Request, *lambda.AliasConfiguration) {
	ret := m.ctrl.Call(m, "GetAliasRequest", arg0)
	ret0, _ := ret[0].(*request.Request)
	ret1, _ := ret[1].(*lambda.AliasConfiguration)
	return ret0, ret1
}
155446
func (s *DistributionSummary) SetAliases(v *Aliases) *DistributionSummary {
	s.Aliases = v
	return s
}
551246
func (m *MockGeneration) CreatedBy() string {
	ret := m.ctrl.Call(m, "CreatedBy")
	ret0, _ := ret[0].(string)
	return ret0
}
210402
func (m *MockEnviron) Create(arg0 context.ProviderCallContext, arg1 environs.CreateParams) error {
	ret := m.ctrl.Call(m, "Create", arg0, arg1)
	ret0, _ := ret[0].(error)
	return ret0
}
509459
func (s *DescribeAliasOutput) SetAlias(v *Alias) *DescribeAliasOutput {
	s.Alias = v
	return s
}
193860
func (s *IndicesRolloverService) Alias(alias string) *IndicesRolloverService {
	s.alias = alias
	return s
}
979665
func NewIndexAlias(indexes ...Index) *indexAliasImpl {
	return &indexAliasImpl{
		name:    "alias",
		indexes: indexes,
		open:    true,
	}
}
298695
func (s *CreateAliasInput) SetAlias(v string) *CreateAliasInput {
	s.Alias = &v
	return s
}
74961
func GetAlias(ctx context.Context) string {
	a, ok := ctx.Value(ctxKeyAlias).(string)
	if !ok {
		return ""
	}
	return a
}
559709
func (ar AliasesResult) IndicesByAlias(aliasName string) []string {
	var indices []string
	for indexName, indexInfo := range ar.Indices {
		for _, aliasInfo := range indexInfo.Aliases {
			if aliasInfo.AliasName == aliasName {
				indices = append(indices, indexName)
			}
		}
	}
	return indices
}
184204
func (m *MockLambdaAPI) CreateAliasWithContext(arg0 aws.Context, arg1 *lambda.CreateAliasInput, arg2 ...request.Option) (*lambda.AliasConfiguration, error) {
	varargs := []interface{}{arg0, arg1}
	for _, a := range arg2 {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "CreateAliasWithContext", varargs...)
	ret0, _ := ret[0].(*lambda.AliasConfiguration)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
233758
func (m *MockCluster) CreatePair(arg0 *api.ClusterPairCreateRequest) (*api.ClusterPairCreateResponse, error) {
	ret := m.ctrl.Call(m, "CreatePair", arg0)
	ret0, _ := ret[0].(*api.ClusterPairCreateResponse)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}
572238
func LoadAliases(dbpath string) (*Aliases, error) {
	err := os.MkdirAll(path.Dir(dbpath), os.ModePerm)
	if os.IsNotExist(err) {
		return nil, err
	}

	db, err := bolt.Open(dbpath, 0660, nil)
	if err != nil {
		return nil, err
	}

	if err := db.Update(func(tx *bolt.Tx) error {
		if _, lerr := tx.CreateBucketIfNotExists([]byte(bucketName)); lerr != nil {
			return lerr
		}
		return nil
	}); err != nil {
		return nil, err
	}

	return &Aliases{
		mtx: &sync.Mutex{},
		db:  db,
	}, nil
}
716207
func CreateOptionMyAlias(alias string) EndpointOption {
	return func(ep *endpoint) {
		ep.myAliases = append(ep.myAliases, alias)
	}
}
1271792
func (m *MockLambdaAPI) DeleteAliasRequest(arg0 *lambda.DeleteAliasInput) (*request.Request, *lambda.DeleteAliasOutput) {
	ret := m.ctrl.Call(m, "DeleteAliasRequest", arg0)
	ret0, _ := ret[0].(*request.Request)
	ret1, _ := ret[1].(*lambda.DeleteAliasOutput)
	return ret0, ret1
}
839016
func (m *MockServiceAccountInterface) CreateToken(arg0 string, arg1 *v1.TokenRequest) (*v1.TokenRequest, error) {
	ret := m.ctrl.Call(m, "CreateToken", arg0, arg1)
	ret0, _ := ret[0].(*v1.TokenRequest)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}