Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for createSpy (0.23 sec)

  1. schema/relationship_test.go

    	type User struct {
    		ID        int32 `gorm:"primaryKey"`
    		Name      string
    		CreatedBy *int32
    		Creator   *User `gorm:"foreignKey:CreatedBy;references:ID"`
    	}
    
    	checkStructRelation(t, &User{}, Relation{
    		Name: "Creator", Type: schema.BelongsTo, Schema: "User", FieldSchema: "User",
    		References: []Reference{{"ID", "User", "CreatedBy", "User", "", false}},
    	})
    }
    
    func TestBelongsToWithMixin(t *testing.T) {
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Apr 15 03:20:20 GMT 2024
    - 25.5K bytes
    - Viewed (0)
  2. internal/kms/kms.go

    	// List returns an array of local KMS Names
    	List() []kes.KeyInfo
    
    	// Metrics returns a KMS metric snapshot.
    	Metrics(ctx context.Context) (kes.Metric, error)
    
    	// CreateKey creates a new key at the KMS with the given key ID.
    	CreateKey(ctx context.Context, keyID string) error
    
    	// GenerateKey generates a new data encryption key using the
    	// key referenced by the key ID.
    	//
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  3. internal/kms/single-key.go

    	return kes.Metric{}, Error{
    		HTTPStatusCode: http.StatusNotImplemented,
    		APICode:        "KMS.NotImplemented",
    		Err:            errors.New("metrics are not supported"),
    	}
    }
    
    func (kms secretKey) CreateKey(_ context.Context, keyID string) error {
    	if keyID == kms.keyID {
    		return nil
    	}
    	return Error{
    		HTTPStatusCode: http.StatusNotImplemented,
    		APICode:        "KMS.NotImplemented",
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 7.9K bytes
    - Viewed (0)
  4. cmd/common-main.go

    		// to create keys - just to generate/decrypt data encryption keys.
    		if _, err = KMS.GenerateKey(GlobalContext, env.Get(kms.EnvKESKeyName, ""), kms.Context{}); err != nil && errors.Is(err, kes.ErrKeyNotFound) {
    			if err = KMS.CreateKey(GlobalContext, env.Get(kms.EnvKESKeyName, "")); err != nil && !errors.Is(err, kes.ErrKeyExists) && !errors.Is(err, kes.ErrNotAllowed) {
    				logger.Fatal(err, "Unable to initialize a connection to KES as specified by the shell environment")
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Apr 24 04:08:47 GMT 2024
    - 35.5K bytes
    - Viewed (2)
  5. cmd/kms-handlers.go

    	PolicyName string      `json:"policyName"`
    	Identity   string      `json:"identity"`
    	IsAdmin    bool        `json:"isAdmin"`
    	CreatedAt  time.Time   `json:"createdAt"`
    	CreatedBy  string      `json:"createdBy"`
    }
    
    // KMSDescribeSelfIdentityHandler - GET /minio/kms/v1/identity/describe-self
    func (a kmsAPIHandlers) KMSDescribeSelfIdentityHandler(w http.ResponseWriter, r *http.Request) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 20.7K bytes
    - Viewed (0)
  6. internal/kms/key-manager.go

    package kms
    
    import (
    	"context"
    
    	"github.com/minio/kms-go/kes"
    )
    
    // KeyManager is the generic interface that handles KMS key operations
    type KeyManager interface {
    	// CreateKey creates a new key at the KMS with the given key ID.
    	CreateKey(ctx context.Context, keyID string) error
    
    	// DeleteKey deletes a key at the KMS with the given key ID.
    	// Please note that is a dangerous operation.
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 1.9K bytes
    - Viewed (0)
  7. internal/kms/kes.go

    	return c.client.APIs(ctx)
    }
    
    // CreateKey tries to create a new key at the KMS with the
    // given key ID.
    //
    // If the a key with the same keyID already exists then
    // CreateKey returns kes.ErrKeyExists.
    func (c *kesClient) CreateKey(ctx context.Context, keyID string) error {
    	c.lock.RLock()
    	defer c.lock.RUnlock()
    
    	return c.client.CreateKey(ctx, keyID)
    }
    
    Go
    - Registered: Sun Apr 21 19:28:08 GMT 2024
    - Last Modified: Tue Apr 16 15:43:39 GMT 2024
    - 14.9K bytes
    - Viewed (0)
  8. cmd/admin-handlers.go

    	if objectAPI == nil {
    		return
    	}
    
    	if GlobalKMS == nil {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrKMSNotConfigured), r.URL)
    		return
    	}
    
    	if err := GlobalKMS.CreateKey(ctx, r.Form.Get("key-id")); err != nil {
    		writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    		return
    	}
    	writeSuccessResponseHeadersOnly(w)
    }
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Sun Apr 21 11:43:18 GMT 2024
    - 97.3K bytes
    - Viewed (2)
  9. schema/model_test.go

    	RegisteredAt mytime
    	DeletedAt    *mytime
    	Active       mybool
    	Admin        *mybool
    }
    
    type BaseModel struct {
    	ID        uint
    	CreatedAt time.Time
    	CreatedBy *int
    	Created   *VersionUser `gorm:"foreignKey:CreatedBy"`
    	UpdatedAt time.Time
    	DeletedAt gorm.DeletedAt `gorm:"index"`
    }
    
    type VersionModel struct {
    	BaseModel
    	Version int
    }
    
    type VersionUser struct {
    	VersionModel
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Jan 06 07:02:53 GMT 2022
    - 1.1K bytes
    - Viewed (0)
  10. schema/schema_test.go

    		{Name: "ID", DBName: "id", BindNames: []string{"VersionModel", "BaseModel", "ID"}, DataType: schema.Uint, PrimaryKey: true, Size: 64, HasDefaultValue: true, AutoIncrement: true},
    		{Name: "CreatedBy", DBName: "created_by", BindNames: []string{"VersionModel", "BaseModel", "CreatedBy"}, DataType: schema.Uint, Size: 64},
    		{Name: "Version", DBName: "version", BindNames: []string{"VersionModel", "Version"}, DataType: schema.Int, Size: 64},
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Dec 15 08:31:23 GMT 2023
    - 12.9K bytes
    - Viewed (0)
Back to top