<commit_before>package mock

import (
	"context"

	"github.com/influxdata/platform"
)

var _ platform.UserResourceMappingService = &UserResourceMappingService{}

type UserResourceMappingService struct {
	FindMappingsFn  func(context.Context, platform.UserResourceMappingFilter) ([]*platform.UserResourceMapping, int, error)
	CreateMappingFn func(context.Context, *platform.UserResourceMapping) error
	DeleteMappingFn func(context.Context, platform.ID, platform.ID) error
}

// NewUserResourceMappingService returns a mock of UserResourceMappingService
// where its methods will return zero values.
func NewUserResourceMappingService() *UserResourceMappingService {
	return &UserResourceMappingService{
		FindMappingsFn: func(context.Context, platform.UserResourceMappingFilter) ([]*platform.UserResourceMapping, int, error) {
			return nil, 0, nil
		},
		CreateMappingFn: func(context.Context, *platform.UserResourceMapping) error { return nil },
		DeleteMappingFn: func(context.Context, platform.ID, platform.ID) error { return nil },
	}
}

func (s *UserResourceMappingService) FindUserResourceMappings(ctx context.Context, filter platform.UserResourceMappingFilter, opt ...platform.FindOptions) ([]*platform.UserResourceMapping, int, error) {
	return s.FindMappingsFn(ctx, filter)
}

func (s *UserResourceMappingService) CreateUserResourceMapping(ctx context.Context, m *platform.UserResourceMapping) error {
	return s.CreateMappingFn(ctx, m)
}

func (s *UserResourceMappingService) DeleteUserResourceMapping(ctx context.Context, resourceID platform.ID, userID platform.ID) error {
	return s.DeleteMappingFn(ctx, resourceID, userID)
}<commit_msg>fix(mock): add comments for userresourcemappingservice mock fns<commit_after>package mock

import (
	"context"

	"github.com/influxdata/platform"
)

var _ platform.UserResourceMappingService = &UserResourceMappingService{}

// UserResourceMappingService is a mock implementation of platform.UserResourceMappingService
type UserResourceMappingService struct {
	FindMappingsFn  func(context.Context, platform.UserResourceMappingFilter) ([]*platform.UserResourceMapping, int, error)
	CreateMappingFn func(context.Context, *platform.UserResourceMapping) error
	DeleteMappingFn func(context.Context, platform.ID, platform.ID) error
}

// NewUserResourceMappingService returns a mock of UserResourceMappingService
// where its methods will return zero values.
func NewUserResourceMappingService() *UserResourceMappingService {
	return &UserResourceMappingService{
		FindMappingsFn: func(context.Context, platform.UserResourceMappingFilter) ([]*platform.UserResourceMapping, int, error) {
			return nil, 0, nil
		},
		CreateMappingFn: func(context.Context, *platform.UserResourceMapping) error { return nil },
		DeleteMappingFn: func(context.Context, platform.ID, platform.ID) error { return nil },
	}
}

// FindUserResourceMappings finds mappings that match a given filter.
func (s *UserResourceMappingService) FindUserResourceMappings(ctx context.Context, filter platform.UserResourceMappingFilter, opt ...platform.FindOptions) ([]*platform.UserResourceMapping, int, error) {
	return s.FindMappingsFn(ctx, filter)
}

// CreateUserResourceMapping creates a new UserResourceMapping.
func (s *UserResourceMappingService) CreateUserResourceMapping(ctx context.Context, m *platform.UserResourceMapping) error {
	return s.CreateMappingFn(ctx, m)
}

// DeleteUserResourceMapping removes a UserResourceMapping.
func (s *UserResourceMappingService) DeleteUserResourceMapping(ctx context.Context, resourceID platform.ID, userID platform.ID) error {
	return s.DeleteMappingFn(ctx, resourceID, userID)
}
{'fraction_non_alphanumeric': 0.09053384700055035, 'fraction_numerical': 0.000550357732526142, 'mean_word_length': 7.168539325842697, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7134113', 'n_tokens_mistral': 987, 'n_tokens_neox': 962, 'n_words': 244}