github.com/mattermosttest/mattermost-server/v5@v5.0.0-20200917143240-9dfa12e121f9/plugin/checker/internal/test/valid/valid.go (about)

     1  // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
     2  // See LICENSE.txt for license information.
     3  
     4  package valid
     5  
     6  type API interface {
     7  	// ValidMethod is a fake method for testing the
     8  	// plugin comment checker with a valid comment.
     9  	//
    10  	// Minimum server version: 1.2.3
    11  	ValidMethod()
    12  
    13  	// Minimum server version: 1.5
    14  	NewerValidMethod()
    15  }
    16  
    17  type Helpers interface {
    18  	// Minimum server version: 1.2.3
    19  	ValidHelperMethod()
    20  
    21  	// Minimum server version: 1.5
    22  	NewerValidHelperMethod()
    23  
    24  	// Minimum server version: 1.5
    25  	IndirectReferenceMethod()
    26  }
    27  
    28  type HelpersImpl struct {
    29  	api API
    30  }
    31  
    32  func (h *HelpersImpl) ValidHelperMethod() {
    33  	h.api.ValidMethod()
    34  }
    35  
    36  func (h *HelpersImpl) NewerValidHelperMethod() {
    37  	h.api.NewerValidMethod()
    38  	h.api.ValidMethod()
    39  }
    40  
    41  func (h *HelpersImpl) IndirectReferenceMethod() {
    42  	a := h.api
    43  	a.NewerValidMethod()
    44  }