Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for sourceDir (0.1 sec)

  1. utils/utils.go

    	"unicode"
    )
    
    var gormSourceDir string
    
    func init() {
    	_, file, _, _ := runtime.Caller(0)
    	// compatible solution to get gorm source directory with various operating systems
    	gormSourceDir = sourceDir(file)
    }
    
    func sourceDir(file string) string {
    	dir := filepath.Dir(file)
    	dir = filepath.Dir(dir)
    
    	s := filepath.Dir(dir)
    	if filepath.Base(s) != "gorm.io" {
    		s = dir
    	}
    	return filepath.ToSlash(s) + "/"
    }
    
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Aug 22 11:03:42 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  2. utils/utils_windows_test.go

    			want: `C:/go/work/proj/gorm_alias/`,
    		},
    		{
    			file: `C:/go/work/proj/my.gorm.io/gorm@v1.2.3/utils/utils.go`,
    			want: `C:/go/work/proj/my.gorm.io/gorm@v1.2.3/`,
    		},
    	}
    	for _, c := range cases {
    		s := sourceDir(c.file)
    		if s != c.want {
    			t.Fatalf("%s: expected %s, got %s", c.file, c.want, s)
    		}
    	}
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Nov 21 02:48:13 UTC 2022
    - 715 bytes
    - Viewed (0)
  3. utils/utils_unix_test.go

    			want: "/go/work/proj/gorm_alias/",
    		},
    		{
    			file: "/go/work/proj/my.gorm.io/gorm@v1.2.3/utils/utils.go",
    			want: "/go/work/proj/my.gorm.io/gorm@v1.2.3/",
    		},
    	}
    	for _, c := range cases {
    		s := sourceDir(c.file)
    		if s != c.want {
    			t.Fatalf("%s: expected %s, got %s", c.file, c.want, s)
    		}
    	}
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Nov 21 02:48:13 UTC 2022
    - 731 bytes
    - Viewed (0)
  4. cmd/policy_test.go

    		AccountName: "Q3AM3UQ867SPQQA43P2F",
    		Action:      policy.PutObjectAction,
    		BucketName:  "mybucket",
    		ConditionValues: map[string][]string{
    			"x-amz-copy-source": {"mybucket/myobject"},
    			"SourceIp":          {"192.168.1.10"},
    		},
    		ObjectName: "myobject",
    	}
    
    	anonGetObjectActionArgs := policy.BucketPolicyArgs{
    		AccountName:     "Q3AM3UQ867SPQQA43P2F",
    		Action:          policy.GetObjectAction,
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  5. docs/iam/access-management-plugin.md

          "EpochTime": [
            "1651948301"
          ],
          "Prefix": [
            ""
          ],
          "Referer": [
            ""
          ],
          "SecureTransport": [
            "false"
          ],
          "SourceIp": [
            "127.0.0.1"
          ],
          "User-Agent": [
            "MinIO (linux; amd64) minio-go/v7.0.24 mc/DEVELOPMENT.2022-04-20T23-07-53Z"
          ],
          "UserAgent": [
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Dec 13 22:28:48 UTC 2022
    - 4.4K bytes
    - Viewed (0)
  6. cmd/bucket-policy.go

    	}
    
    	args := map[string][]string{
    		"CurrentTime":      {currTime.Format(time.RFC3339)},
    		"EpochTime":        {strconv.FormatInt(currTime.Unix(), 10)},
    		"SecureTransport":  {strconv.FormatBool(r.TLS != nil)},
    		"SourceIp":         {handlers.GetSourceIPRaw(r)},
    		"UserAgent":        {r.UserAgent()},
    		"Referer":          {r.Referer()},
    		"principaltype":    {principalType},
    		"userid":           {username},
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 8K bytes
    - Viewed (0)
Back to top