Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 18 for readonly (0.19 sec)

  1. tests/customize_field_test.go

    		t.Fatalf("Should failed to find result")
    	}
    
    	if err := DB.Table("customize_field_structs").Where("1 = 1").UpdateColumn("field_readonly", "readonly").Error; err != nil {
    		t.Fatalf("failed to update field_readonly column")
    	}
    
    	if err := DB.Where(CustomizeFieldStruct{Name: create.Name, FieldReadonly: "readonly", FieldIgnore: create.FieldIgnore}).First(&CustomizeFieldStruct{}).Error; err != nil {
    		t.Fatalf("Should find result")
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Fri Sep 11 09:33:31 GMT 2020
    - 6.9K bytes
    - Viewed (0)
  2. tests/embedded_struct_test.go

    	"errors"
    	"reflect"
    	"testing"
    	"time"
    
    	"gorm.io/gorm"
    	. "gorm.io/gorm/utils/tests"
    )
    
    func TestEmbeddedStruct(t *testing.T) {
    	type ReadOnly struct {
    		ReadOnly *bool
    	}
    
    	type BasePost struct {
    		Id    int64
    		Title string
    		URL   string
    		ReadOnly
    	}
    
    	type Author struct {
    		ID    string
    		Name  string
    		Email string
    	}
    
    	type HNPost struct {
    		BasePost
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Thu Oct 26 03:58:13 GMT 2023
    - 7.3K bytes
    - Viewed (0)
  3. cmd/sts-handlers_test.go

    "2012-10-17","Statement":[{"Effect":"Allow","Action":["admin:Prometheus","admin:Profiling","admin:ServerTrace","admin:ConsoleLog","admin:ServerInfo","admin:TopLocksInfo","admin:OBDInfo","admin:BandwidthMonitor"],"Resource":["arn:aws:s3:::*"]}]},"readonly":{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":["s3:GetBucketLocation","s3:GetObject"],"Resource":["arn:aws:s3:::*"]}]},"readwrite":{"Version":"2012-10-17","Statement":[{"Effect":"Allow","Action":["s3:*"],"Resource":["arn:aws:s...
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 15:50:16 GMT 2024
    - 85.7K bytes
    - Viewed (0)
  4. cmd/xl-storage_noatime_supported.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package cmd
    
    import (
    	"os"
    )
    
    var (
    	// Disallow updating access times
    	readMode = os.O_RDONLY | 0x40000 // O_NOATIME
    
    	// Write with data sync only used only for `xl.meta` writes
    	writeMode = 0x1000 // O_DSYNC
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Aug 19 01:35:22 GMT 2021
    - 1K bytes
    - Viewed (0)
  5. internal/ioutil/append-file_windows.go

    	appendFile, err := lock.Open(dst, os.O_WRONLY|os.O_APPEND|os.O_CREATE, 0o666)
    	if err != nil {
    		return err
    	}
    	defer appendFile.Close()
    
    	srcFile, err := lock.Open(src, os.O_RDONLY, 0o666)
    	if err != nil {
    		return err
    	}
    	defer srcFile.Close()
    	_, err = io.Copy(appendFile, srcFile)
    	return err
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  6. internal/lock/lock.go

    	}, nil
    }
    
    // RLockedOpenFile - returns a wrapped read locked file, if the file
    // doesn't exist at path returns an error.
    func RLockedOpenFile(path string) (*RLockedFile, error) {
    	lkFile, err := LockedOpenFile(path, os.O_RDONLY, 0o666)
    	if err != nil {
    		return nil, err
    	}
    
    	return newRLockedFile(lkFile)
    }
    
    // LockedFile represents a locked file
    type LockedFile struct {
    	*os.File
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sun Jan 02 17:15:06 GMT 2022
    - 2.5K bytes
    - Viewed (0)
  7. internal/lock/lock_nix.go

    )
    
    // Internal function implements support for both
    // blocking and non blocking lock type.
    func lockedOpenFile(path string, flag int, perm os.FileMode, lockType int) (*LockedFile, error) {
    	switch flag {
    	case syscall.O_RDONLY:
    		lockType |= syscall.LOCK_SH
    	case syscall.O_WRONLY:
    		fallthrough
    	case syscall.O_RDWR:
    		fallthrough
    	case syscall.O_WRONLY | syscall.O_CREAT:
    		fallthrough
    	case syscall.O_RDWR | syscall.O_CREAT:
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Aug 19 01:35:22 GMT 2021
    - 2.8K bytes
    - Viewed (0)
  8. internal/lock/lock_windows.go

    // acquire a write lock.
    func TryLockedOpenFile(path string, flag int, perm os.FileMode) (*LockedFile, error) {
    	var lockType uint32 = lockFileFailImmediately | lockFileExclusiveLock
    	if flag == syscall.O_RDONLY {
    		// https://docs.microsoft.com/en-us/windows/desktop/api/fileapi/nf-fileapi-lockfileex
    		//lint:ignore SA4016 Reasons
    		lockType = lockFileFailImmediately // Set this to enable shared lock and fail immediately.
    	}
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed Oct 18 18:08:15 GMT 2023
    - 7.9K bytes
    - Viewed (0)
  9. internal/ioutil/read_file_noatime_notsupported.go

    //
    // You should have received a copy of the GNU Affero General Public License
    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package ioutil
    
    import "os"
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Aug 19 01:35:22 GMT 2021
    - 893 bytes
    - Viewed (0)
  10. cmd/os_unix.go

    			return osErrToFileErr(err)
    		}
    		// There may be permission error when dirPath
    		// is at the root of the disk mount that may
    		// not have the permissions to avoid 'noatime'
    		fd, err = openFileWithFD(dirPath, os.O_RDONLY, 0o666)
    		if err != nil {
    			if osErrToFileErr(err) == errFileNotFound {
    				return nil
    			}
    			return osErrToFileErr(err)
    		}
    
    	}
    	defer syscall.Close(fd)
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 9.3K bytes
    - Viewed (0)
Back to top