You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: whitelist.go
    path of file: ./repos/stash/internal/dlna
    
    the code of the file until where you have to start completion: package dlna

import (
	"sync"
	"time"

	"github.com/stashapp/stash/pkg/sliceutil"
)

// only keep the 10 most recent IP addresses
const recentListLength = 10

const wildcard = "*"

type tempIPWhitelist struct {
	pattern string
	until   *time.Time
}

type ipWhitelistManager struct {
	recentIPAddresses []string
	config            Config
	tempWhitelist     []tem
    
func (m *ipWhitelistManager) getTempAllowed() []*Dlnaip {
	m.mutex.Lock()
	defer m.mutex.Unlock()

	var ret []*Dlnaip

	now := time.Now()
	removeExpired := false
	for _, a := range m.tempWhitelist {
		if a.until != nil && now.After(*a.until) {
			removeExpired = true
			continue
		}

		ret = append(ret, &Dlnaip{
			IPAddress: a.pattern,
			Until:     a.until,
		})
	}

	if removeExpired {
		m.removeExpiredWhitelists()
	}

	return ret
}