mirror of
				https://codeberg.org/forgejo/forgejo.git
				synced 2025-10-31 06:21:11 +00:00 
			
		
		
		
	cherry-pick from the forgefriends fork, except for the F3 API for mirroring which is a functional change that is not safe enough to introduce in Forgejo.
Refs: 3aad1f4e64
---
The motivation is to keep up-to-date with the rather large refactor of gof3. The changes are syntactic only and test is provided by the compliance suite.
Co-authored-by: limiting-factor <limiting-factor@posteo.com>
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/7258
Reviewed-by: Michael Kriese <michael.kriese@gmx.de>
		
	
			
		
			
				
	
	
		
			49 lines
		
	
	
	
		
			961 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			49 lines
		
	
	
	
		
			961 B
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Copyright Earl Warren <contact@earl-warren.org>
 | |
| // Copyright Loïc Dachary <loic@dachary.org>
 | |
| // SPDX-License-Identifier: MIT
 | |
| 
 | |
| package driver
 | |
| 
 | |
| import (
 | |
| 	"context"
 | |
| 
 | |
| 	f3_kind "code.forgejo.org/f3/gof3/v3/kind"
 | |
| 	"code.forgejo.org/f3/gof3/v3/tree/generic"
 | |
| )
 | |
| 
 | |
| type common struct {
 | |
| 	generic.NullDriver
 | |
| }
 | |
| 
 | |
| func (o *common) GetHelper() any {
 | |
| 	panic("not implemented")
 | |
| }
 | |
| 
 | |
| func (o *common) ListPage(ctx context.Context, page int) generic.ChildrenSlice {
 | |
| 	return generic.NewChildrenSlice(0)
 | |
| }
 | |
| 
 | |
| func (o *common) GetNativeID() string {
 | |
| 	return ""
 | |
| }
 | |
| 
 | |
| func (o *common) SetNative(native any) {
 | |
| }
 | |
| 
 | |
| func (o *common) getTree() generic.TreeInterface {
 | |
| 	return o.GetNode().GetTree()
 | |
| }
 | |
| 
 | |
| func (o *common) getPageSize() int {
 | |
| 	return o.getTreeDriver().GetPageSize()
 | |
| }
 | |
| 
 | |
| func (o *common) getKind() f3_kind.Kind {
 | |
| 	return o.GetNode().GetKind()
 | |
| }
 | |
| 
 | |
| func (o *common) getTreeDriver() *treeDriver {
 | |
| 	return o.GetTreeDriver().(*treeDriver)
 | |
| }
 | |
| 
 | |
| func (o *common) IsNull() bool { return false }
 |