Search Options

Results per page
Sort
Preferred Languages
Advance

Results 391 - 400 of 1,179 for FUNC (0.02 sec)

  1. internal/logger/target/kafka/kafka.go

    // Endpoint - return kafka target
    func (h *Target) Endpoint() string {
    	return "kafka"
    }
    
    // String - kafka string
    func (h *Target) String() string {
    	return "kafka"
    }
    
    // Stats returns the target statistics.
    func (h *Target) Stats() types.TargetStats {
    	h.logChMu.RLock()
    	queueLength := len(h.logCh)
    	h.logChMu.RUnlock()
    
    	return types.TargetStats{
    		TotalMessages:  atomic.LoadInt64(&h.totalMessages),
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Sep 06 23:06:30 UTC 2024
    - 10.2K bytes
    - Viewed (0)
  2. tests/hooks_test.go

    	return
    }
    
    func (s *Product) BeforeSave(tx *gorm.DB) (err error) {
    	if s.Code == "dont_save" {
    		err = errors.New("can't save")
    	}
    	s.BeforeSaveCallTimes = s.BeforeSaveCallTimes + 1
    	return
    }
    
    func (s *Product) AfterFind(tx *gorm.DB) (err error) {
    	s.AfterFindCallTimes = s.AfterFindCallTimes + 1
    	return
    }
    
    func (s *Product) AfterCreate(tx *gorm.DB) (err error) {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Mon Jun 17 03:59:06 UTC 2024
    - 16.7K bytes
    - Viewed (0)
  3. internal/event/config_test.go

    // along with this program.  If not, see <http://www.gnu.org/licenses/>.
    
    package event
    
    import (
    	"context"
    	"encoding/xml"
    	"reflect"
    	"strings"
    	"testing"
    )
    
    func TestValidateFilterRuleValue(t *testing.T) {
    	testCases := []struct {
    		value     string
    		expectErr bool
    	}{
    		{"foo/.", true},
    		{"../foo", true},
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Dec 05 10:16:33 UTC 2023
    - 29K bytes
    - Viewed (0)
  4. internal/http/request-recorder.go

    	buf bytes.Buffer
    	// total bytes read including header size
    	bytesRead int
    }
    
    // Close is a no operation closer
    func (r *RequestRecorder) Close() error {
    	// no-op
    	return nil
    }
    
    // Read reads from the internal reader and counts/save the body in the memory
    func (r *RequestRecorder) Read(p []byte) (n int, err error) {
    	n, err = r.Reader.Read(p)
    	r.bytesRead += n
    
    	if r.LogBody {
    		r.buf.Write(p[:n])
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Apr 12 21:37:19 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  5. internal/event/arn.go

    type ARN struct {
    	TargetID
    	region string
    }
    
    // String - returns string representation.
    func (arn ARN) String() string {
    	if arn.TargetID.ID == "" && arn.TargetID.Name == "" && arn.region == "" {
    		return ""
    	}
    
    	return "arn:minio:sqs:" + arn.region + ":" + arn.TargetID.String()
    }
    
    // MarshalXML - encodes to XML data.
    func (arn ARN) MarshalXML(e *xml.Encoder, start xml.StartElement) error {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 2.1K bytes
    - Viewed (0)
  6. internal/bucket/replication/sourceselectioncriteria.go

    }
    
    // IsValid - checks whether SourceSelectionCriteria is valid or not.
    func (s SourceSelectionCriteria) IsValid() bool {
    	return s.ReplicaModifications.Status == Enabled || s.ReplicaModifications.Status == Disabled
    }
    
    // Validate source selection criteria
    func (s SourceSelectionCriteria) Validate() error {
    	if (s == SourceSelectionCriteria{}) {
    		return nil
    	}
    	if !s.IsValid() {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Jun 01 21:59:40 UTC 2021
    - 2.5K bytes
    - Viewed (0)
  7. internal/s3select/sql/aggregation.go

    	}
    
    	return err
    }
    
    func (e *AliasedExpression) aggregateRow(r Record, tableAlias string) error {
    	return e.Expression.aggregateRow(r, tableAlias)
    }
    
    func (e *Expression) aggregateRow(r Record, tableAlias string) error {
    	for _, ex := range e.And {
    		err := ex.aggregateRow(r, tableAlias)
    		if err != nil {
    			return err
    		}
    	}
    	return nil
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sat Dec 23 07:19:11 UTC 2023
    - 7.9K bytes
    - Viewed (0)
  8. schema/callbacks_test.go

    import (
    	"reflect"
    	"sync"
    	"testing"
    
    	"gorm.io/gorm"
    	"gorm.io/gorm/schema"
    )
    
    type UserWithCallback struct{}
    
    func (UserWithCallback) BeforeSave(*gorm.DB) error {
    	return nil
    }
    
    func (UserWithCallback) AfterCreate(*gorm.DB) error {
    	return nil
    }
    
    func TestCallback(t *testing.T) {
    	user, err := schema.Parse(&UserWithCallback{}, &sync.Map{}, schema.NamingStrategy{})
    	if err != nil {
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Jan 06 07:02:53 UTC 2022
    - 939 bytes
    - Viewed (0)
  9. cmd/hasher.go

    // getSHA256Hash returns SHA-256 hash in hex encoding of given data.
    func getSHA256Hash(data []byte) string {
    	return hex.EncodeToString(getSHA256Sum(data))
    }
    
    // getSHA256Hash returns SHA-256 sum of given data.
    func getSHA256Sum(data []byte) []byte {
    	hash := sha256.New()
    	hash.Write(data)
    	return hash.Sum(nil)
    }
    
    // getMD5Sum returns MD5 sum of given data.
    func getMD5Sum(data []byte) []byte {
    	hash := md5.New()
    	hash.Write(data)
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 27 13:00:19 UTC 2022
    - 1.4K bytes
    - Viewed (0)
  10. internal/config/identity/openid/ecdsa-sha3_contrib.go

    	SigningMethodES3384 *jwt.SigningMethodECDSA
    	SigningMethodES3512 *jwt.SigningMethodECDSA
    )
    
    func init() {
    	// ES256
    	SigningMethodES3256 = &jwt.SigningMethodECDSA{Name: "ES3256", Hash: crypto.SHA3_256, KeySize: 32, CurveBits: 256}
    	jwt.RegisterSigningMethod(SigningMethodES3256.Alg(), func() jwt.SigningMethod {
    		return SigningMethodES3256
    	})
    
    	// ES384
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri Nov 05 19:20:08 UTC 2021
    - 1.8K bytes
    - Viewed (0)
Back to top