github.com/octohelm/storage@v0.0.0-20240516030302-1ac2cc1ea347/testdata/model/zz_generated.runtimedoc.go (about)

     1  /*
     2  Package model GENERATED BY gengo:runtimedoc
     3  DON'T EDIT THIS FILE
     4  */
     5  package model
     6  
     7  // nolint:deadcode,unused
     8  func runtimeDoc(v any, names ...string) ([]string, bool) {
     9  	if c, ok := v.(interface {
    10  		RuntimeDoc(names ...string) ([]string, bool)
    11  	}); ok {
    12  		return c.RuntimeDoc(names...)
    13  	}
    14  	return nil, false
    15  }
    16  
    17  func (Gender) RuntimeDoc(names ...string) ([]string, bool) {
    18  	return []string{}, true
    19  }
    20  func (GenderExt) RuntimeDoc(names ...string) ([]string, bool) {
    21  	return []string{}, true
    22  }
    23  func (v OperateTime) RuntimeDoc(names ...string) ([]string, bool) {
    24  	if len(names) > 0 {
    25  		switch names[0] {
    26  		case "UpdatedAt":
    27  			return []string{}, true
    28  
    29  		}
    30  
    31  		return nil, false
    32  	}
    33  	return []string{}, true
    34  }
    35  
    36  func (v OperateTimeWithDeleted) RuntimeDoc(names ...string) ([]string, bool) {
    37  	if len(names) > 0 {
    38  		switch names[0] {
    39  		case "OperateTime":
    40  			return []string{}, true
    41  		case "DeletedAt":
    42  			return []string{}, true
    43  
    44  		}
    45  		if doc, ok := runtimeDoc(v.OperateTime, names...); ok {
    46  			return doc, ok
    47  		}
    48  
    49  		return nil, false
    50  	}
    51  	return []string{}, true
    52  }
    53  
    54  func (v Org) RuntimeDoc(names ...string) ([]string, bool) {
    55  	if len(names) > 0 {
    56  		switch names[0] {
    57  		case "ID":
    58  			return []string{}, true
    59  		case "Name":
    60  			return []string{}, true
    61  		case "OperateTimeWithDeleted":
    62  			return []string{}, true
    63  
    64  		}
    65  		if doc, ok := runtimeDoc(v.OperateTimeWithDeleted, names...); ok {
    66  			return doc, ok
    67  		}
    68  
    69  		return nil, false
    70  	}
    71  	return []string{
    72  		"Org",
    73  	}, true
    74  }
    75  
    76  func (v OrgUser) RuntimeDoc(names ...string) ([]string, bool) {
    77  	if len(names) > 0 {
    78  		switch names[0] {
    79  		case "ID":
    80  			return []string{}, true
    81  		case "UserID":
    82  			return []string{}, true
    83  		case "OrgID":
    84  			return []string{}, true
    85  
    86  		}
    87  
    88  		return nil, false
    89  	}
    90  	return []string{
    91  		"OrgUser",
    92  	}, true
    93  }
    94  
    95  func (v User) RuntimeDoc(names ...string) ([]string, bool) {
    96  	if len(names) > 0 {
    97  		switch names[0] {
    98  		case "ID":
    99  			return []string{}, true
   100  		case "Name":
   101  			return []string{
   102  				"姓名",
   103  			}, true
   104  		case "Nickname":
   105  			return []string{}, true
   106  		case "Username":
   107  			return []string{}, true
   108  		case "Gender":
   109  			return []string{}, true
   110  		case "Age":
   111  			return []string{}, true
   112  		case "OperateTimeWithDeleted":
   113  			return []string{}, true
   114  
   115  		}
   116  		if doc, ok := runtimeDoc(v.OperateTimeWithDeleted, names...); ok {
   117  			return doc, ok
   118  		}
   119  
   120  		return nil, false
   121  	}
   122  	return []string{
   123  		"User",
   124  	}, true
   125  }
   126  
   127  func (v UserV2) RuntimeDoc(names ...string) ([]string, bool) {
   128  	if len(names) > 0 {
   129  		switch names[0] {
   130  		case "ID":
   131  			return []string{}, true
   132  		case "Nickname":
   133  			return []string{}, true
   134  		case "Gender":
   135  			return []string{}, true
   136  		case "Name":
   137  			return []string{}, true
   138  		case "RealName":
   139  			return []string{}, true
   140  		case "Age":
   141  			return []string{
   142  				"for modify testing",
   143  			}, true
   144  		case "Username":
   145  			return []string{}, true
   146  
   147  		}
   148  
   149  		return nil, false
   150  	}
   151  	return []string{}, true
   152  }