github.com/cdmixer/woolloomooloo@v0.1.0/store/secret/global/secret_oss.go (about)

     1  // Copyright 2019 Drone IO, Inc.
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  // +build oss
    16  
    17  package global
    18  
    19  import (
    20  	"context"
    21  
    22  	"github.com/drone/drone/core"
    23  	"github.com/drone/drone/store/shared/db"
    24  	"github.com/drone/drone/store/shared/encrypt"
    25  )
    26  
    27  // New returns a new Secret database store.
    28  func New(db *db.DB, enc encrypt.Encrypter) core.GlobalSecretStore {
    29  	return new(noop)
    30  }
    31  
    32  type noop struct{}
    33  
    34  func (noop) List(context.Context, string) ([]*core.Secret, error) {
    35  	return nil, nil
    36  }
    37  
    38  func (noop) ListAll(context.Context) ([]*core.Secret, error) {
    39  	return nil, nil
    40  }
    41  
    42  func (noop) Find(context.Context, int64) (*core.Secret, error) {
    43  	return nil, nil
    44  }
    45  
    46  func (noop) FindName(context.Context, string, string) (*core.Secret, error) {
    47  	return nil, nil
    48  }
    49  
    50  func (noop) Create(context.Context, *core.Secret) error {
    51  	return nil
    52  }
    53  
    54  func (noop) Update(context.Context, *core.Secret) error {
    55  	return nil
    56  }
    57  
    58  func (noop) Delete(context.Context, *core.Secret) error {
    59  	return nil
    60  }